コード例 #1
0
 @Override
 public void onCreate(final Bundle savedInstanceState) {
   super.onCreate(savedInstanceState, R.layout.sl_header_market);
   setTitle(getString(R.string.sl_market));
   setSubTitle(getString(R.string.sl_market_description));
   getImageView().setImageResource(R.drawable.sl_header_icon_market);
   addObservedKeys(
       Constant.FEATURED_GAME,
       Constant.FEATURED_GAME_NAME,
       Constant.FEATURED_GAME_IMAGE_URL,
       Constant.FEATURED_GAME_PUBLISHER);
   _gamesController = new GamesController(getRequestControllerObserver());
   _gamesController.setRangeLength(1);
 }
コード例 #2
0
  @Override
  public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState, R.layout.sl_header_default);
    setCaption(getGame().getName());

    final Integer mode = getActivityArguments().getValue(PaymentConstant.GAME_ITEMS_MODE);
    if (mode == PaymentConstant.GAME_ITEMS_MODE_GAME_ITEM) {

      getImageView().setImageDrawable(getResources().getDrawable(R.drawable.sl_header_icon_shop));
      setTitle(getResources().getString(R.string.sl_shop));

      if (ScoreloopManagerSingleton.get()
          .getSupportedPaymentProviderKinds()
          .contains("game_currency")) {

        final ImageView icon = (ImageView) findViewById(R.id.sl_control_icon);
        icon.setImageResource(R.drawable.sl_button_add_coins);
        icon.setEnabled(true);
        icon.setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(final View view) {
                if (getSession().isAuthenticated()) {
                  display(getFactory().createChallengePaymentScreenDescription());
                }
              }
            });

        displayBalance = true;
      }
    } else if (mode == PaymentConstant.GAME_ITEMS_MODE_COIN_PACK) {
      getImageView().setImageDrawable(getResources().getDrawable(R.drawable.sl_button_add_coins));
      setTitle(getResources().getString(R.string.sl_add_coins));
      displayBalance = true;
    }

    if (displayBalance) {
      addObservedKeys(ValueStore.concatenateKeys(Constant.USER_VALUES, Constant.USER_BALANCE));
    }
  }
コード例 #3
0
 @Override
 protected void onResume() {
   super.onResume();
   _gamesController.loadRangeForFeatured();
 }
コード例 #4
0
 @Override
 protected void onResume() {
   super.onResume();
   setNeedsRefresh();
 }
コード例 #5
0
 @Override
 public void onCreate(final Bundle savedInstanceState) {
   super.onCreate(savedInstanceState, R.layout.sl_header_game);
 }
コード例 #6
0
 @Override
 public void onStart() {
   super.onStart();
   getUserValues().setDirty(Constant.USER_BALANCE);
 }