use of com.quran.labs.androidquran.di.module.fragment.QuranPageModule in project quran_android by quran.
the class TabletFragment method onAttach.
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
pageNumber = getArguments().getInt(FIRST_PAGE_EXTRA);
mode = getArguments().getInt(MODE_EXTRA, Mode.ARABIC);
isSplitScreen = getArguments().getBoolean(IS_SPLIT_SCREEN, false);
final int[] pages = (isSplitScreen && mode == Mode.TRANSLATION) ? new int[] { pageNumber } : new int[] { pageNumber - 1, pageNumber };
((PagerActivity) getActivity()).getPagerActivityComponent().quranPageComponentBuilder().withQuranPageModule(new QuranPageModule(pages)).build().inject(this);
}
use of com.quran.labs.androidquran.di.module.fragment.QuranPageModule in project quran_android by quran.
the class QuranPageFragment method onAttach.
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
pageNumber = getArguments().getInt(PAGE_NUMBER_EXTRA);
((PagerActivity) getActivity()).getPagerActivityComponent().quranPageComponentBuilder().withQuranPageModule(new QuranPageModule(pageNumber)).build().inject(this);
}
use of com.quran.labs.androidquran.di.module.fragment.QuranPageModule in project quran_android by quran.
the class TranslationFragment method onAttach.
@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
pageNumber = getArguments() != null ? getArguments().getInt(PAGE_NUMBER_EXTRA) : -1;
((PagerActivity) getActivity()).getPagerActivityComponent().quranPageComponentBuilder().withQuranPageModule(new QuranPageModule(pageNumber)).build().inject(this);
}
Aggregations