Пример #1
0
 public void initializeData() {
   mGetScenesNetworkHelper = new NetworkHelper(this);
   mCurrentFriend = (Friend) getIntent().getSerializableExtra(IntentExtraParams.FRIEND);
   mHistoryList = HistoryCache.getInstance(this).getHistoryList(mCurrentFriend);
   SceneCache sceneCache = SceneCache.getInstance(this);
   if (sceneCache.getList().size() > 0) {
     mSceneList = sceneCache.getList();
   } else {
     mGetScenesNetworkHelper.sendGetRequest(UrlParams.GET_SCENES_URL, mParams);
   }
   BackColorFactory backColorFactory = new BackColorFactory(this);
   mSceneHorizonAdapter = new SceneHorizonAdapter(this, mSceneList, backColorFactory);
   mHistoryAdapter = new HistoryAdapter(this, mCurrentFriend, mHistoryList);
 }
Пример #2
0
 private void initializeSceneList() {
   SceneCache.getInstance(this).clear();
   //        mSceneList.add(new Scene(getString(R.string.random)));
 }