how to start new activity using button in android studio -


this question has answer here:

kindly explain, why not working?

b3.setonclicklistener(new view.onclicklistener() {     @override     public void onclick(view v) {         intent intent = new intent(this, signup.class);         startactivity(intent);                     } }); 

signup word giving error in line given below.

intent intent = new intent(this, signup.class); 

if current activity called main use:

intent intent = new intent(main.this, signup.class); 

when put this, this reference of onclicklistener object.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -