Exemplo n.º 1
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   ((BaseActivity) getActivity()).getActivityComponent().inject(this);
   mPreferencesHelper = VineyardApplication.get(getActivity()).getComponent().preferencesHelper();
   updateActions();
   return super.onCreateView(inflater, container, savedInstanceState);
 }
Exemplo n.º 2
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    ((BaseActivity) getActivity()).getActivityComponent().inject(this);
    mPreferencesHelper = VineyardApplication.get(getActivity()).getComponent().preferencesHelper();
    mRowsAdapter = new ArrayObjectAdapter(new ListRowPresenter());
    mHandler = new Handler();
    mPopularText = getString(R.string.header_text_popular);
    mEditorsPicksText = getString(R.string.header_text_editors_picks);
    mEventBus.register(this);

    loadPosts();
    setAdapter(mRowsAdapter);
    prepareBackgroundManager();
    setupUIElements();
    setupListeners();
  }