Android touchevent on view even with dialog in front
I am making video playback controls. All my code is present to make it work and it does, except for one thing. When I touch the surfaceview the controls come up, but once they are up, my surfaceview no longe开发者_如何学Cr has focused and doesn't receive touch events. What I need is for the surface view to still get touch events even with the dialog open. Also my dialog must also be able to receive touch events. How do I do this?
Use another View in the same layout that sits layered on top of your SurfaceView for controls rather than a Dialog. Dialogs are meant for modal interactions - they are intended to block you from interacting with whatever is underneath.
精彩评论