コード例 #1
0
 @Override
 public void requestControllerDidReceiveResponseSafe(final RequestController aRequestController) {
   final List<Game> featuredGames = _gamesController.getGames();
   if (featuredGames.size() > 0) {
     final ValueStore store = getScreenValues();
     final Game game = featuredGames.get(0);
     store.putValue(Constant.FEATURED_GAME, game);
     store.putValue(Constant.FEATURED_GAME_NAME, game.getName());
     store.putValue(Constant.FEATURED_GAME_PUBLISHER, game.getPublisherName());
     store.putValue(Constant.FEATURED_GAME_IMAGE_URL, game.getImageUrl());
     showControlIcon(R.drawable.sl_button_arrow);
   }
 }
コード例 #2
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);
 }
コード例 #3
0
 @Override
 protected void onResume() {
   super.onResume();
   _gamesController.loadRangeForFeatured();
 }