Currently I'm experiencing a bug where if the user quickly taps a button, the intent that the button is attached to will fire off multiple times, resulting in a stack of that intent that will need to be back traced through again. How can I avoid this or remedy this?
Thanks ~k
This is inside of the onClickListener. I set the boolean value here, then I unset it at the end of the process.
if(!isDating)
{
intent.setClass(context, EventDate.class);
isDating = true;
((TabGroupActivity)
context).startChildActivity("EventDate",intent);
}
use
it fixes the problem
Try setting the flags for the intent like
You can also set this flag via AndroidManifest.xml file in the Application section. Prefer this method over above one.
Updating launchMode using the Manifest file
Hope this resolves your issue.
Actually I found a better solution!
by setting the onClickListener(null); then recreating it onResume, it bypasses having to use flags and what not.
!k
If i had a dime for this bug my QA filed I would be pretty rich if not a millionaire :P There are only so much one can do. Based on your implementation you could try a few things.
As already mentioned, use a boolean. Set it to true once you click it and check this boolean if the button is clicked again. Set it to false once you are done.
Use a progress dialog in case its a long activity like receiving data in your next activity before it displays. This also gives a hint to the user, that something is happening and he need not worry.