Voora Tarun Voora Tarun - 1 year ago 157
Android Question

Check a child view visible on screen or not in NestedScrollview

In my activity, I have a long scrollview contains multiple views, when a user is scrolling up or down, I have to check whether a textview is visible or not on screen.

Please help me .

Answer Source

You can use next code:

Rect mReact = new Rect();
if (mView.getLocalVisibleRect(mReact)) {
// visible
} else {
// invisible
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download