I've got an Activity with a transparent (bottom->up) SlidingDrawer on it. I'd like to get the width and height of its visible area only, as I scroll it up the screen. Is it possible? I figured I'd make it with any of the getLocalVisibleRect() and getGlobalVisibleRect() methods, but I was wrong, as they return the layout rectangle.
Asked
Active
Viewed 326 times
0
Dariusz
- 21,561
- 9
- 74
- 114
Lucas Lages
- 87
- 1
- 8
-
I think this will surely help you: http://stackoverflow.com/questions/4628800/android-how-to-check-if-a-view-inside-of-scrollview-is-visible – Zax Aug 12 '13 at 09:20
1 Answers
0
Made it! It's possible to measure the visible area of the SlidingDrawer getting the (X, Y) coordinates of its handle on the screen.
mySlidingDrawer.getHandle().getY();
mySlidingDrawer.getHandle().getX();
Lucas Lages
- 87
- 1
- 8