use of com.quran.labs.androidquran.widgets.QuranTranslationPageLayout in project quran_android by quran.
the class TabletFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final Context context = getActivity();
mainView = new TabletView(context);
if (mode == Mode.ARABIC) {
mainView.init(TabletView.QURAN_PAGE, TabletView.QURAN_PAGE);
leftImageView = ((QuranImagePageLayout) mainView.getLeftPage()).getImageView();
rightImageView = ((QuranImagePageLayout) mainView.getRightPage()).getImageView();
mainView.setPageController(this, pageNumber, pageNumber - 1);
} else if (mode == Mode.TRANSLATION) {
mainView.init(TabletView.TRANSLATION_PAGE, TabletView.TRANSLATION_PAGE);
leftTranslation = ((QuranTranslationPageLayout) mainView.getLeftPage()).getTranslationView();
rightTranslation = ((QuranTranslationPageLayout) mainView.getRightPage()).getTranslationView();
PagerActivity pagerActivity = (PagerActivity) context;
leftTranslation.setTranslationClickedListener(v -> pagerActivity.toggleActionBar());
rightTranslation.setTranslationClickedListener(v -> pagerActivity.toggleActionBar());
leftTranslation.setOnTranslationActionListener(this);
rightTranslation.setOnTranslationActionListener(this);
mainView.setPageController(null, pageNumber, pageNumber - 1);
}
return mainView;
}
use of com.quran.labs.androidquran.widgets.QuranTranslationPageLayout in project quran_android by quran.
the class TranslationFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Context context = getActivity();
mainView = new QuranTranslationPageLayout(context);
mainView.setPageController(null, pageNumber);
translationView = mainView.getTranslationView();
translationView.setTranslationClickedListener(v -> {
final Activity activity = getActivity();
if (activity instanceof PagerActivity) {
((PagerActivity) getActivity()).toggleActionBar();
}
});
translationView.setOnTranslationActionListener(this);
return mainView;
}
Aggregations