Beispiel #1
0
 @Override
 public void onDetach() {
   super.onDetach();
   DrawerLayout drawer = ButterKnife.findById(getActivity(), R.id.drawer_container);
   drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
   setupToolbar(false);
 }
Beispiel #2
0
 @Override
 @DebugLog
 @Subscribe
 @SuppressWarnings("unused")
 public void onSuggestionAvailable(Mover.Suggestion suggestion) {
   super.onSuggestionAvailable(suggestion);
 }
Beispiel #3
0
  @Override
  public void onDestroy() {
    super.onDestroy();

    if (mPendingJobId != NO_ID) {
      mJobManager.cancelJobInBackground(mPendingJobId, false);
    }
  }
Beispiel #4
0
  @Override
  public void onSaveInstanceState(Bundle outState) {
    outState.putInt(SEARCH_CURRENT_PAGE, mCurrentPageNumber);
    outState.putInt(SEARCH_PAGES_COUNT, mSearchPagesCount);
    outState.putString(SEARCH_QUERY, mQuery);

    super.onSaveInstanceState(outState);
  }
Beispiel #5
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (savedInstanceState != null) {
      mQuery = savedInstanceState.getString(SEARCH_QUERY);
      mSearchPagesCount = savedInstanceState.getInt(SEARCH_PAGES_COUNT, UNKNOWN_STATE);
      mCurrentPageNumber = savedInstanceState.getInt(SEARCH_CURRENT_PAGE, UNKNOWN_STATE);
    }
  }
Beispiel #6
0
  @Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    mWatchMeAdapter = getWatchMeAdapter();

    WatchMeApplication application = WatchMeApplication.getApplication();
    application.inject(this);
    application.inject(getScrollManager());
    application.inject(mWatchMeAdapter);

    setupToolbar(true, savedInstanceState);
    setupParent();

    if (getArguments() != null) {
      Bundle args = getArguments();
      mQuery = args.getString(SEARCH_QUERY);
      mCurrentPageNumber = args.getInt(SEARCH_CURRENT_PAGE);

      SearchView search = getWatchMeActivity().getToolbar().getSearchView();
      search.setQuery(mQuery);

      mPendingJobId = mJobManager.addJob(new FetchSearchPage(mQuery, mCurrentPageNumber));
    }
  }