Created
June 21, 2018 12:43
-
-
Save BurakDizlek/fcb346c13b3b1a83689bc5e72705ab4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun sureChildViewVisibleOnScreen(childView: View, parenView: View): Boolean { | |
val scrollBounds = Rect() | |
parenView.getHitRect(scrollBounds) | |
return childView.getLocalVisibleRect(scrollBounds) // if childView visible return true else false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment