Search in sources :

Example 1 with PageController

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

the class QuranImagePageLayout method setPageController.

@Override
public void setPageController(PageController controller, int pageNumber) {
    super.setPageController(controller, pageNumber);
    final GestureDetector gestureDetector = new GestureDetector(context, new PageGestureDetector());
    OnTouchListener gestureListener = (v, event) -> gestureDetector.onTouchEvent(event);
    imageView.setOnTouchListener(gestureListener);
    imageView.setClickable(true);
    imageView.setLongClickable(true);
}
Also used : Context(android.content.Context) GestureDetector(android.view.GestureDetector) AyahSelectedListener(com.quran.labs.androidquran.ui.helpers.AyahSelectedListener) MotionEvent(android.view.MotionEvent) PageController(com.quran.labs.androidquran.ui.util.PageController) View(android.view.View) QuranSettings(com.quran.labs.androidquran.util.QuranSettings) NonNull(android.support.annotation.NonNull) GestureDetector(android.view.GestureDetector)

Aggregations

Context (android.content.Context)1 NonNull (android.support.annotation.NonNull)1 GestureDetector (android.view.GestureDetector)1 MotionEvent (android.view.MotionEvent)1 View (android.view.View)1 AyahSelectedListener (com.quran.labs.androidquran.ui.helpers.AyahSelectedListener)1 PageController (com.quran.labs.androidquran.ui.util.PageController)1 QuranSettings (com.quran.labs.androidquran.util.QuranSettings)1