문제

I am working on a pdf reader application. When the user touches the screen, two toolbars will slide into view, overlaid on top of the pdf. There is one toolbar at the top of the screen and one at the bottom, that slide in from off-screen when touched. What is the best way to go about implementing this? I've been having trouble finding any code examples for something similar. Thanks for your help.

도움이 되었습니까?

해결책

I wrote a post some time ago about how to implement this kind of full screen with top and bottom bar. Maybe it's useful for you:

http://miguelrodelas.com/web/2011/12/17/full-screen-in-android/

다른 팁

Put your PDF viewer inside a RelativeLayout setting match_parent for layout_width and layout_height. Then add your toolbar to that RelativeLayout setting the toolbar to layout_alignParentTop="true" will make sure the toolbar is on the top of the container. Then you can slide the toolbar in and out of the view using a TranslateAnimation between -1.0 and 0.0 for slide down, and 0.0 to -1.0 to slide out. You may have to set the visibility to GONE when the animation completes for sliding out of view.

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