Monday, April 14, 2014

android VideoView video focus! Pray people!


android-top box applications:
The main application interface (MainActivity) has a small screen box, video box outside a Button button.
Video box set no focus, key has focus.
1 When you first enter the program, the video starts to load, play, the focus remains on the keys, this step is no problem.
(2) When the video has finished playing, then start loading the next video, where the question is:
Video loading process, the focus is to stay on the keys, but loaded to start playing, the entire Activity loses focus, wait a few seconds, the focus has returned to the keys! Me and my little friends are shocked!
(Activity jump also have this problem! Jump to the second screen, then press the return key to return MainActivity there are these problems!)
Guiqiu Great God!
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Top can?
Reply:
Is not videoview seize the focus of it, my problems are similar
Reply:
reference to the second floor lngwu reply:
is not videoview seize the focus of it, my problems are similar

But to lose focus button setOnFocusChangeListenner not catch, that focus is lost when listening less.
What is your situation?
Reply:
Continue to top you?
Reply:
After loading the video can be detected in the code set button to try to get the focus
Reply:
references, 5th Floor luowenlong860502 reply:
can be detected after the code is loaded into the video settings button has the focus to try

Tried, no. Not catch the focus button is missing, that button is no loss of focus too, but the focus frame is gone, and a few seconds to display.
Reply:
Is not the first Button?? I remember stuff done before one is so
xml layout file topmost put each edittext, when every time you enter this screen, edittext will capture the focus away, then seems to add a size 0 layout in front edittext, then let it capture focus, so edittext it will not capture the

Should you this Button is almost so be it, you try ha ~
Reply:
reference to the 7th floor u011133213 reply:
Button is not the first one I remember stuff done before, this is
??xml layout file topmost put each edittext, when every time you enter this screen, edittext will capture the focus away, then seems to add a size 0 layout in front edittext, then let it capture focus, so edittext it will not capture the

Should you this Button is almost so be it, you try ha ~

Not what you said ...
VideoView finished loading video, button focus frame will disappear after a few seconds and automatically displayed on the button, OnFocusChangeListener () also listen than this event.
Well ... I guess it is BUG system ...
Reply:
reference to the third floor qq396063616 reply:
Quote: references to the second floor lngwu reply:

The focus is not videoview seize it, the problem I have encountered similar

But to lose focus button setOnFocusChangeListenner not catch, that focus is lost when listening less.
What is your situation?

Oh, it would not be clear. I was one into the main menu press the arrow keys when the focus is not on the first button, the video window was robbed, then I solution is the layout of the controls on the video file to add android: descendantFocusability = "blocksDescendants phrase resolved I do not know whether to be useful to you.
Reply:
Do not quite understand why this button to set the focus of it, try to remove
Reply:
reference to the 10th floor doveqian reply:
do not quite understand why this button to set the focus of it, try to remove
< br />Because it is a set-top box applications, the phone can not touch, but up and down with a remote control operation.
Reply:
reference to the 11th floor qq396063616 reply:
Quote: references to the 10th floor doveqian reply:

Do not quite understand why this button to set the focus of it, try to remove

Because it is a set-top box applications, the phone can not touch, but up and down with a remote control operation.

Oh, this is ah, the equivalent of using buttons to control the video playback is not
In fact, this VideoView and Mediaplayer SurfaceView also used a package that is estimated to snatch the focus went
You could try to VideoView.setOnPreparedListener load the video finished, before the start of play to allow the button to regain focus
There setOnCompletionListener

You can try

Here I wrote APP, two windows video playback, the top has a button when playing hide finished playing apparent, did not encounter in your case, the estimated difference!

No comments:

Post a Comment