private void handleLongPress(MotionEvent event) {
    QuranAyah result = getAyahFromCoordinates(event.getX(), event.getY());
    if (result != null) {
      mImageView.highlightAyah(result.getSura(), result.getAyah());
      mImageView.invalidate();
      mImageView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);

      // TODO Temporary UI until new UI is implemented
      new ShowAyahMenuTask().execute(result.getSura(), result.getAyah(), mPageNumber);
    }
  }
Esempio n. 2
0
 private void handlePress(MotionEvent event, EventType eventType) {
   QuranAyah result =
       ImageAyahUtils.getAyahFromCoordinates(
           mCoordinatesData, mImageView, event.getX(), event.getY());
   if (result != null && ayahSelectedListener != null) {
     SuraAyah suraAyah = new SuraAyah(result.getSura(), result.getAyah());
     ayahSelectedListener.onAyahSelected(eventType, suraAyah, this);
   }
 }