First Back button press not caught when playing a video android

匆匆过客 提交于 2019-12-02 07:12:47

Are you using MediaController for video user interaction? I hade something similar and in the end it turned out that the MediaController was catching the first user input even so it was hidden.

Slartibartfast

Thanks to @Satya got the answer(Commonsware) at Android back button and MediaController . Basically override dispatchKeyEvent to catch the back button press. @Satya - post your comment as an answer so I can mark it correct, marking this correct until then

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!