Search in sources :

Example 1 with QuranPageModule

use of com.quran.labs.androidquran.module.fragment.QuranPageModule in project quran_android by quran.

the class TabletFragment method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    pageNumber = getArguments().getInt(FIRST_PAGE_EXTRA);
    mode = getArguments().getInt(MODE_EXTRA, Mode.ARABIC);
    ((PagerActivity) getActivity()).getPagerActivityComponent().quranPageComponentBuilder().withQuranPageModule(new QuranPageModule(pageNumber - 1, pageNumber)).build().inject(this);
}
Also used : QuranPageModule(com.quran.labs.androidquran.module.fragment.QuranPageModule) PagerActivity(com.quran.labs.androidquran.ui.PagerActivity)

Example 2 with QuranPageModule

use of com.quran.labs.androidquran.module.fragment.QuranPageModule in project quran_android by quran.

the class QuranPageFragment method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    pageNumber = getArguments().getInt(PAGE_NUMBER_EXTRA);
    ((PagerActivity) getActivity()).getPagerActivityComponent().quranPageComponentBuilder().withQuranPageModule(new QuranPageModule(pageNumber)).build().inject(this);
}
Also used : QuranPageModule(com.quran.labs.androidquran.module.fragment.QuranPageModule) PagerActivity(com.quran.labs.androidquran.ui.PagerActivity)

Example 3 with QuranPageModule

use of com.quran.labs.androidquran.module.fragment.QuranPageModule in project quran_android by quran.

the class TranslationFragment method onAttach.

@Override
public void onAttach(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);
}
Also used : QuranPageModule(com.quran.labs.androidquran.module.fragment.QuranPageModule) PagerActivity(com.quran.labs.androidquran.ui.PagerActivity)

Aggregations

QuranPageModule (com.quran.labs.androidquran.module.fragment.QuranPageModule)3 PagerActivity (com.quran.labs.androidquran.ui.PagerActivity)3