Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

detect view in scrollview android

// consider that your ScrollView is scrollView 
Rect scrollBounds = new Rect();
scrollView.getHitRect(scrollBounds);
if (imageView.getLocalVisibleRect(scrollBounds)) {
    // Any portion of the imageView, even a single pixel, 
    //is within the visible window
} else {
    // NONE of the imageView is within the visible window
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #detect #view #scrollview #android
ADD COMMENT
Topic
Name
7+2 =