Search in sources :

Example 11 with PagerActivity

use of com.quran.labs.androidquran.ui.PagerActivity 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)

Example 12 with PagerActivity

use of com.quran.labs.androidquran.ui.PagerActivity in project quran_android by quran.

the class TranslationFragment method onTranslationAction.

@Override
public void onTranslationAction(QuranAyahInfo ayah, String[] translationNames, int actionId) {
    Activity activity = getActivity();
    if (activity instanceof PagerActivity) {
        presenter.onTranslationAction((PagerActivity) activity, ayah, translationNames, actionId);
    }
    translationView.unhighlightAyat();
}
Also used : PagerActivity(com.quran.labs.androidquran.ui.PagerActivity) Activity(android.app.Activity) PagerActivity(com.quran.labs.androidquran.ui.PagerActivity)

Aggregations

PagerActivity (com.quran.labs.androidquran.ui.PagerActivity)12 Activity (android.app.Activity)5 Context (android.content.Context)5 QuranPageModule (com.quran.labs.androidquran.module.fragment.QuranPageModule)4 Bundle (android.os.Bundle)2 NonNull (android.support.annotation.NonNull)2 LayoutInflater (android.view.LayoutInflater)2 View (android.view.View)2 ViewGroup (android.view.ViewGroup)2 QuranAyahInfo (com.quran.labs.androidquran.common.QuranAyahInfo)2 QuranInfo (com.quran.labs.androidquran.data.QuranInfo)2 SuraAyah (com.quran.labs.androidquran.data.SuraAyah)2 QuranSettings (com.quran.labs.androidquran.util.QuranSettings)2 List (java.util.List)2 Inject (javax.inject.Inject)2 Bitmap (android.graphics.Bitmap)1 RectF (android.graphics.RectF)1 BitmapDrawable (android.graphics.drawable.BitmapDrawable)1 Nullable (android.support.annotation.Nullable)1 StringRes (android.support.annotation.StringRes)1