Error Summary-player (vitamio) Volume entity key and touch gesture control, volume adjustment conflict, vitamio gesture
This is an exclusive experience. After a few days of online data query failure, we met in the group. Then let him help me look at it and finally solved the conflict. In this case, I would like to thank the colleague for his enthusiastic help;
Let's talk about this problem:
Currently, I am working on a film and television project. In this project, video playback must be used. Video Playback references the vitamio class library and SurfaceView controls are used on the playback page. These requirements are then imposed during video playback: The gesture slides to adjust the volume. When I had a hard time dealing with it, I did not think of it but encountered a conflict when I pressed the volume entity key to play the page exit. How can this problem be solved? A few lines of code.
Modify the review key listening here:
@ Overridepublic boolean onKeyDown (int keyCode, KeyEvent event) {// TODO Auto-generated method stubif (keyCode = KeyEvent. KEYCODE_BACK & event. getRepeatCount () = 0) {// if (event. getAction () = KeyEvent. ACTION_DOWN ){............ return true ;}}
I am not very clear about the reason. I guess: At this time, the volume key should be used as the return key function, and the above is to eliminate this conflict.