Exemple #1
0
 @Override
 public void onPrepareOptionsMenu(Menu menu) {
   super.onPrepareOptionsMenu(menu);
   if (Utilities.getCurrentSource(getActivity()).equals(getString(R.string.pref_manga_reader)))
     menu.findItem(R.id.menu_sourceReader).setChecked(true);
   else menu.findItem(R.id.menu_sourceFox).setChecked(true);
 }
Exemple #2
0
 @Override
 public void onResume() {
   super.onResume();
   if (presenter != null) {
     if (presenter.getActiveSource().isEmpty()) {
       presenter.setActiveSource(Utilities.getCurrentSource(getContext()));
       presenter.init();
     } else {
       if (!Utilities.getCurrentSource(getActivity()).equals(presenter.getActiveSource()))
         presenter.switchSource(Utilities.getCurrentSource(getContext()));
       else presenter.init();
     }
   }
 }
Exemple #3
0
  @Override
  public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    progressBar = (SmoothProgressBar) view.findViewById(R.id.progress);
    viewPager = (ViewPager) view.findViewById(R.id.pager);
    viewPager.setAdapter(new ListPagerAdapter(this, getActivity()));
    TabLayout tabLayout = ((BaseActivity) getActivity()).getTabs();
    tabLayout.setupWithViewPager(viewPager);

    mangaListAdapter = new MangaListAdapter();
    mangaListAdapter.setClickCallback(this);

    latestListAdapter = new MangaLatestListAdapter();
    latestListAdapter.setClickCallback(this);

    popularListAdapter = new MangaPopularListAdapter();
    popularListAdapter.setClickCallback(this);
  }
Exemple #4
0
 @Override
 public void onCreateOptionsMenu(final Menu menu, MenuInflater inflater) {
   super.onCreateOptionsMenu(menu, inflater);
   inflater.inflate(R.menu.menu_mangalist, menu);
 }