Android's UI is event driven, so if you block that thread it will stop doing things. Use a Handler to schedule a message in the future at which you will turn off the pressed state.
On Nov 8, 3:13 am, Imran <[EMAIL PROTECTED]> wrote: > Hi > > In my Application i have scenario where the Button Should be in > Pressed mode for few seconds and than it should be in unpressed mode > > i have tried using thread But its not working > > bt.setPressed(true); > Thread.sleep(2000); > bt.setPressed(false); > > this logic is not working... the Button is always in Unpressed mode > Only > > please help me out...!!!! > > Thanks in Advance for Any replays...!!!!! > > Cheers > Imran --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

