android - Prevent multiple button clic -
how can prevent user clic 2 button on same time.
boolean processclick = true; @override public void onclick(view v) { if (!processclick) return; switch (v.getid()) { case r.id.btn: if (processclick) { //some action processclick = false; } } }
this works fine when action launch new activity it's wrong when show toast message.
Comments
Post a Comment