As soon as the button is clicked, set  button.setEnable(false);
  This will disable the button and will avoid from double clicking it.

On Mar 11, 11:54 pm, pabbot <[email protected]> wrote:
> Hi all,
>
> In my application, when I click on a button that inserts a record on
> the database and closes the Activity, sometimes it takes long to close
> that Activity and some users are clicking on the Button twice. That
> causes that the record is inserted twice in the database.
>
> Is there any way of avoiding this behavior?
>
> Thanks in advance!

-- 
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