RE: [android-developers] Button State does not toggle automatically!! Help!

2010-08-23 Thread Marian Raafat
Hi, Try button.setEnabled(false); button.setEnabled(true); I hope that would help :) Marian -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Abhi Sent: Monday, August 23, 2010 4:30 AM To: Android Developers Subject

Re: [android-developers] Button State does not toggle automatically!! Help!

2010-08-23 Thread Kostya Vasilyev
Abhi, I am a little confused - you mentioned changing button state and then talk about focus. Enabled/disabled state is one thing, and focus is quite another. Try calling: button.setEnabled(true or false) Note that for an ImageButton you need to have a state drawable like this to select i