Pawan, I doubt you could do this in the UI thread. What I would do is to put code in the onClickListener for your button that:
- changes the button background/drawable - starts a new thread The thread sleeps for a while and then starts your second activity (and maybe changes the button background/drawable back again). Here is an example of threading with UI notification: http://developer.android.com/resources/faq/commontasks.html#threading (you might also want to disable any other clickable buttons in the onClick until the thread has completed) On Wed, Jun 9, 2010 at 2:03 PM, pawan nimje <pawanni...@gmail.com> wrote: > Hi All, > > I have two activities, > 1st one has a ques and 4 options. > 2nd one is like a result page (... displaying if your ans is correct or not > ...and showing the right ans ..) > Now what i want is when a user clicks : > on a right option [or wrong option] ..i want to turn that Image button into > green [ red] ..and wait for a while ..and then go to the result activity .. > so my only concern is onclick of a ImageButton ... how to wait for a while > .. and then move to other activity > any kind of suggestion will do .. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en