use of com.quran.labs.androidquran.widgets.QuranImagePageLayout 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.QuranImagePageLayout in project quran_android by quran.
the class QuranPageFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final Context context = getActivity();
quranPageLayout = new QuranImagePageLayout(context);
quranPageLayout.setPageController(this, pageNumber);
imageView = quranPageLayout.getImageView();
return quranPageLayout;
}
Aggregations