Detect View In Scrollview Android

[Solved] Detect View In Scrollview Android | Swift - Code Explorer | yomemimo.com
Question : detect view in scrollview android

Answered by : mohamed-boumlyk

// 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 : https://stackoverflow.com/questions/4628800/android-how-to-check-if-a-view-inside-of-scrollview-is-visible | Last Update : Wed, 18 May 22

Answers related to detect view in scrollview android

Code Explorer Popular Question For Swift