Did you try "invalidate" ? On Aug 26, 7:00 am, Abhi <[email protected]> wrote: > guys, > > I have had no luck yet with getting this to work... any help would be > appreciated > > thanks > > On Aug 23, 1:40 am, "Marian Raafat" <[email protected]> > wrote: > > > > > Hi, > > > Trybutton.setEnabled(false);button.setEnabled(true); > > > I hope that would help :) > > > Marian > > > -----Original Message----- > > From: [email protected] > > > [mailto:[email protected]] On Behalf OfAbhi > > Sent: Monday, August 23, 2010 4:30 AM > > To: Android Developers > > Subject: [android-developers]ButtonState does not toggle > > automatically!! Help! > > > Guys, > > > I am trying to get thebuttonin 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 thebuttonbased on where > > my video is. So basically, I am doing videoview.getCurrentPosition() > > and if it is in a certain window, I want to toggle myButtonstate > > (enabled to disabled and vice versa). The layout is LinearLayout and I > > have the VideoView andButtonlayed horizontally. When I first had the > > MediaController in my Video, thebuttonwould change focus on touching > > the videoview (which is when the MediaController would pop up). I > > later removed the controller because I didn't want thebuttonstate 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 > > athttp://groups.google.com/group/android-developers?hl=en
-- 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

