2

I'm building an app with custom MediaController and VideoView (both using 99% of the original android code) to display my videos. When the activity is in landscape i set the actionbar (using actionbarsherlock 4.2.0) to overlay the VideoView just like in the youtube app.

When you click the video view the mediacontroller alternates between visible and invisible, but when it's visible you can use the buttons to control the video, but if i touch on a actionbar item it doesn't work and just hides the mediacontroller because he intercepted the touch event.

I've looked at the code of the MediaController and realized that he was creating a window that was filling the entire screen. So i fixed that and set the window to start exactly below the action bar but my touch calls are still being intercepted even with the WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL set on the window so it doesn't block touch events outside (because the action bar is theoretically outside of the MediaController's window).

Any idea what i'm doing wrong? Worst case scenario i would have to use one of the two solutions from like this thread: Remove the window and use layout inflate or don't use MediaController at all

Community
  • 1
  • 1
xlar8or
  • 601
  • 9
  • 18

0 Answers0