use of com.quran.labs.androidquran.ui.helpers.QuranPage in project quran_android by quran.
the class PagerActivity method selectAyah.
private void selectAyah(SuraAyah s) {
final int page = quranInfo.getPageFromSuraAyah(s.sura, s.ayah);
final int position = quranInfo.getPosFromPage(page, isDualPages);
Fragment f = pagerAdapter.getFragmentIfExists(position);
if (f instanceof QuranPage && f.isVisible()) {
if (position != viewPager.getCurrentItem()) {
viewPager.setCurrentItem(position);
}
updateAyahStartSelection(s, ((QuranPage) f).getAyahTracker());
}
}
use of com.quran.labs.androidquran.ui.helpers.QuranPage in project quran_android by quran.
the class PagerActivity method unHighlightAyah.
private void unHighlightAyah(int sura, int ayah, HighlightType type) {
int position = viewPager.getCurrentItem();
Fragment f = pagerAdapter.getFragmentIfExists(position);
if (f instanceof QuranPage && f.isVisible()) {
((QuranPage) f).getAyahTracker().unHighlightAyah(sura, ayah, type);
}
}
Aggregations