¡@

Home 

2014/10/16 ¤W¤È 08:20:57

android Programming Glossary: outrect

Android Gallery zoom in/out

http://stackoverflow.com/questions/11468536/android-gallery-zoom-in-out

mTransformedRect @Override public void getHitRect Rect outRect if mTransformedRect null super.getHitRect outRect else outRect.set.. Rect outRect if mTransformedRect null super.getHitRect outRect else outRect.set mTransformedRect File res layout ScaledGalleryItemLayout.xml.. if mTransformedRect null super.getHitRect outRect else outRect.set mTransformedRect File res layout ScaledGalleryItemLayout.xml..

Detect touch event on a view when dragged over from other view

http://stackoverflow.com/questions/12980156/detect-touch-event-on-a-view-when-dragged-over-from-other-view

Method to test view bounds used in code beloow Rect outRect new Rect int location new int 2 private boolean inViewBounds.. inViewBounds View view int x int y view.getDrawingRect outRect view.getLocationOnScreen location outRect.offset location 0.. outRect view.getLocationOnScreen location outRect.offset location 0 location 1 return outRect.contains x y Testing..

Android: how to check if a View inside of ScrollView is visible?

http://stackoverflow.com/questions/4628800/android-how-to-check-if-a-view-inside-of-scrollview-is-visible

from View#getDrawingRect public void getDrawingRect Rect outRect outRect.left mScrollX outRect.top mScrollY outRect.right mScrollX.. public void getDrawingRect Rect outRect outRect.left mScrollX outRect.top mScrollY outRect.right mScrollX mRight.. void getDrawingRect Rect outRect outRect.left mScrollX outRect.top mScrollY outRect.right mScrollX mRight mLeft outRect.bottom..

EditText, clear focus on touch outside

http://stackoverflow.com/questions/4828636/edittext-clear-focus-on-touch-outside

MotionEvent.ACTION_DOWN if mEditText.isFocused Rect outRect new Rect mEditText.getGlobalVisibleRect outRect if outRect.contains.. Rect outRect new Rect mEditText.getGlobalVisibleRect outRect if outRect.contains int event.getRawX int event.getRawY mEditText.clearFocus.. new Rect mEditText.getGlobalVisibleRect outRect if outRect.contains int event.getRawX int event.getRawY mEditText.clearFocus..

Android Gallery zoom in/out

http://stackoverflow.com/questions/11468536/android-gallery-zoom-in-out

mTransformedRect null mTransformedRect new Rect newRect.round mTransformedRect @Override public void getHitRect Rect outRect if mTransformedRect null super.getHitRect outRect else outRect.set mTransformedRect File res layout ScaledGalleryItemLayout.xml.. mTransformedRect @Override public void getHitRect Rect outRect if mTransformedRect null super.getHitRect outRect else outRect.set mTransformedRect File res layout ScaledGalleryItemLayout.xml xml version 1.0 encoding utf 8 com.example.ScalingGalleryItemLayout.. mTransformedRect @Override public void getHitRect Rect outRect if mTransformedRect null super.getHitRect outRect else outRect.set mTransformedRect File res layout ScaledGalleryItemLayout.xml xml version 1.0 encoding utf 8 com.example.ScalingGalleryItemLayout..

Detect touch event on a view when dragged over from other view

http://stackoverflow.com/questions/12980156/detect-touch-event-on-a-view-when-dragged-over-from-other-view

this question You can use the code bellow to achive your request Method to test view bounds used in code beloow Rect outRect new Rect int location new int 2 private boolean inViewBounds View view int x int y view.getDrawingRect outRect view.getLocationOnScreen.. Rect outRect new Rect int location new int 2 private boolean inViewBounds View view int x int y view.getDrawingRect outRect view.getLocationOnScreen location outRect.offset location 0 location 1 return outRect.contains x y Testing with two TextView.. int 2 private boolean inViewBounds View view int x int y view.getDrawingRect outRect view.getLocationOnScreen location outRect.offset location 0 location 1 return outRect.contains x y Testing with two TextView final TextView viewA TextView findViewById..

Android: how to check if a View inside of ScrollView is visible?

http://stackoverflow.com/questions/4628800/android-how-to-check-if-a-view-inside-of-scrollview-is-visible

on the ScrollView instead of calculating explicitly. Code from View#getDrawingRect public void getDrawingRect Rect outRect outRect.left mScrollX outRect.top mScrollY outRect.right mScrollX mRight mLeft outRect.bottom mScrollY mBottom mTop Code.. ScrollView instead of calculating explicitly. Code from View#getDrawingRect public void getDrawingRect Rect outRect outRect.left mScrollX outRect.top mScrollY outRect.right mScrollX mRight mLeft outRect.bottom mScrollY mBottom mTop Code from View#getHitRect.. of calculating explicitly. Code from View#getDrawingRect public void getDrawingRect Rect outRect outRect.left mScrollX outRect.top mScrollY outRect.right mScrollX mRight mLeft outRect.bottom mScrollY mBottom mTop Code from View#getHitRect public void..

EditText, clear focus on touch outside

http://stackoverflow.com/questions/4828636/edittext-clear-focus-on-touch-outside

boolean onTouch View v MotionEvent event if event.getAction MotionEvent.ACTION_DOWN if mEditText.isFocused Rect outRect new Rect mEditText.getGlobalVisibleRect outRect if outRect.contains int event.getRawX int event.getRawY mEditText.clearFocus.. event.getAction MotionEvent.ACTION_DOWN if mEditText.isFocused Rect outRect new Rect mEditText.getGlobalVisibleRect outRect if outRect.contains int event.getRawX int event.getRawY mEditText.clearFocus InputMethodManager imm InputMethodManager.. MotionEvent.ACTION_DOWN if mEditText.isFocused Rect outRect new Rect mEditText.getGlobalVisibleRect outRect if outRect.contains int event.getRawX int event.getRawY mEditText.clearFocus InputMethodManager imm InputMethodManager v.getContext..