Search in sources :

Example 1 with AyahTrackerItem

use of com.quran.labs.androidquran.presenter.quran.ayahtracker.AyahTrackerItem in project quran_android by quran.

the class TabletFragment method getAyahTrackerItems.

@Override
public AyahTrackerItem[] getAyahTrackerItems() {
    if (ayahTrackerItems == null) {
        AyahTrackerItem left;
        AyahTrackerItem right;
        if (mode == Mode.ARABIC) {
            final int screenHeight = quranScreenInfo.getHeight();
            left = new AyahImageTrackerItem(pageNumber, screenHeight, quranInfo, false, leftImageView);
            right = new AyahImageTrackerItem(pageNumber - 1, screenHeight, quranInfo, true, rightImageView);
        } else if (mode == Mode.TRANSLATION) {
            left = new AyahTranslationTrackerItem(pageNumber, quranInfo, leftTranslation);
            right = new AyahTranslationTrackerItem(pageNumber - 1, quranInfo, rightTranslation);
        } else {
            return new AyahTrackerItem[0];
        }
        ayahTrackerItems = new AyahTrackerItem[] { right, left };
    }
    return ayahTrackerItems;
}
Also used : AyahTrackerItem(com.quran.labs.androidquran.presenter.quran.ayahtracker.AyahTrackerItem) AyahImageTrackerItem(com.quran.labs.androidquran.presenter.quran.ayahtracker.AyahImageTrackerItem) AyahTranslationTrackerItem(com.quran.labs.androidquran.presenter.quran.ayahtracker.AyahTranslationTrackerItem)

Aggregations

AyahImageTrackerItem (com.quran.labs.androidquran.presenter.quran.ayahtracker.AyahImageTrackerItem)1 AyahTrackerItem (com.quran.labs.androidquran.presenter.quran.ayahtracker.AyahTrackerItem)1 AyahTranslationTrackerItem (com.quran.labs.androidquran.presenter.quran.ayahtracker.AyahTranslationTrackerItem)1