문제

The main view in my SlidingPaneLayout is a map. I managed to open/close the SlidingPaneLayout using a button. The problem is while the slidinglayout is sliding to open/close, the main view (the map) gets hidden till the slidingLayout is completely opened/closed.

is there a way to solve this??

도움이 되었습니까?

해결책

It seems that Android is trying to move away from this UI model. The SlidingDrawer was deprecated in API level 17 and your SlidingPaneLayout is an experimental feature. I would recommend figuring out an alternative design.

Your probably not able to see the mapview because it's really hard to draw it while the drawer is moving. The point of the SlidingPaneLayout is to help the layout of the content within a SlidingPane. This just working with spacing and moving things around. As your moving the drawer the system calls onSizeChanged and your mapview has to be redraw which is really expensive.

다른 팁

Since I don't have reputation to add a comment to Frank's answer, I'll just add that SlidingPaneLayout is no longer marked as experimental since Hangouts is using it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top