setClickable(false) did the trick for me. thanks for all of your suggestions though !
On Nov 28, 9:18 am, Anirudh <aithalanir...@gmail.com> wrote: > How about setting the onClickListener to null for that period of time > and resetting it to a valid listener again? > > On Nov 26, 4:15 am, Mark Murphy <mmur...@commonsware.com> wrote: > > >Jagswrote: > > > I have a typical problem where if i keep repetedly press a button, a > > > certain value increases, actually i am supposed to increase once till > > > it disappears [it disappears in 700 ms] > > > > public class CatchMeOnClickListener implements OnClickListener { > > > public void onClick(View v) { > > > if(!alreadyCaught) > > > value++; > > > alreadyCaught = true; > > > } > > > } > > > > i have tried to put a flag which is set to false when the button is > > > disappeared. still it seems not to work. Can i make the button > > > nonclickable inside this ? how ? > > > Try calling setEnabled(false) on your Button. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > Warescription: Three Android Books, Plus Updates, $35/Year > > -- 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