java - Android crash when starting activity? -


i have new intent activity want open when double click registered, know double click working properly, every time try start new activity stops working ? (force quits)

code :

 imview.setonclicklistener(new onclicklistener() {             @override             public void onclick(view v) {                 long thistime = system.currenttimemillis();                   if (thistime - lasttouchtime < 250) {                      // double click                       //toast toast = toast.maketext(getapplicationcontext(), "double tap worked!", 10);                       //toast.show();                       lasttouchtime = -1;                       intent myintent = new intent(v.getcontext(), zoom.class);                       startactivityforresult(myintent, 0);                    } else {                       // slow                       lasttouchtime = thistime;                   }             }          }); 

you may not have put second activity in manifiest file

 <activity android:name="zoom"            android:label="@string/app_name"/> 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -