I want to hide the action bar, and show it when the user presses (but does not swipe) the screen. I have this working when I am not showing a pdf, but once I add the PDFView to the screen, this view then does not pass the onTouch event up the view stack.
I am copying the code from the PDFReader demo, using the ReaderController class as the view for my fragment. Everything works perfectly, except for the public boolean onTouchEvent(MotionEvent event) method.
I have tried changing the following code
Now this code works when I am not using AndroidPDF, but when I replace the content_frame in my layout with a ReaderController to show a pdf, the touch on the screen no longer goes to the mDrawerLayout because the ReaderController's onTouch returns true. I need it to return false so that the mDrawerLayout can receive a touch, but then the scrolling does not work.
I hope this makes it more clear. How does the PDFView's touch work? I'm guessing that the ViewGroup implements a strange onInterceptTouchEvent that makes this whole thing act weirdly. Is there any way that I can get the mDrawerLayout to receive onTouch events, while also keeping the PDFView's swipe-to-turn-a-page functionality?
The administrator has disabled public write access.
Touch events are not passed onto parents
3 years 5 months ago #6470