daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Aug 13th, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public boolean getIfIn(ImageView temp, MotionEvent event, int howMuch) {
  2.         Resources r = getResources();
  3.         if (event.getRawX() >= temp.getLeft()
  4.                 && event.getRawX() <= temp.getLeft() + temp.getWidth()
  5.                 && TypedValue.applyDimension(
  6.                         TypedValue.COMPLEX_UNIT_SP, event.getRawY(), r.getDisplayMetrics()) >= temp.getTop()
  7.                 && TypedValue.applyDimension(
  8.                         TypedValue.COMPLEX_UNIT_SP, event.getRawY(), r.getDisplayMetrics()) <=  temp.getBottom())
  9.  
  10.             return true;
  11.         return false;
  12.     }
RAW Paste Data
Top