Guys,

I am trying to get the button in my layout to have focus as I am
programmatically changing its state. My application is a video player
using VideoView. I am toggling the state of the button based on where
my video is. So basically, I am doing videoview.getCurrentPosition()
and if it is in a certain window, I want to toggle my Button state
(enabled to disabled and vice versa). The layout is LinearLayout and I
have the VideoView and Button layed horizontally. When I first had the
MediaController in my Video, the button would change focus on touching
the videoview (which is when the MediaController would pop up). I
later removed the controller because I didn't want the button state to
change when the user touches the screen. I want it to change
automatically.

I tried all sorts of combinations possible. button.setFocusable(),
button.requestFocus(), button.bringToFront() and so on. But none of
them seem to work.

Is there any way I can make it toggle programatically and without user
intervention through touch? or is it impossible to do it with the
VideoView?

Thanks,

Abhi

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to