How to resolve double tap on Button Issue in android? -
mockup of application :
problem :
when click on button1 call intent of activitysecond
button1.setonclicklistener(this); public void onclick(view v) { // todo auto-generated method stub switch (v.getid()) { case r.id.button1: intent intent = new intent(getapplicationcontext(), activitysecond.class); startactivity(intent); break; default: break; } }
but, on double tap open twice activitysecond.
how resolve it.
please if solution share it.
thank you.
you can set launchmode of activitysecond
singletop
<activity android:name=".activitysecond" android:launchmode="singletop" > ... </activity>
Comments
Post a Comment