Why Getlocationonscreen(location) Always Returns 0?
In my FragmentLayout I have a LinearLayout with multiple subviews (TextView, CardView). I want to find the top offset of all LinearLayout views but I always get zero. This is my co
Solution 1:
Write the function to find location in onWindowFocusChanged(boolean hasFocus)
method or post the task on handler with 100 millisecond delay.
Post a Comment for "Why Getlocationonscreen(location) Always Returns 0?"