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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -