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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -