Jags wrote:
> 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 [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

Reply via email to