java - Adding Link to another activity -


i add button link activity on registeractivity following code

    public void setonaccountcreationfirstviewlistener(onaccountcreationfirstviewlistener listener) {         mlistener = listener;     }      /**      * interface listeners of {@link accountcreationfirstview}       * see {@link accountcreationfirstview#setonaccountcreationfirstviewlistener}      */     public interface onaccountcreationfirstviewlistener {         /**          * user asked create account          */         /**          * user asked edit : has existing account          */         void oneditaccountrequested();     } } 

can please me adding button activity called registeractivity button id button2

change button's xml , add android:onclick="openactivity" e.g.

<button     android:id="@+id/button2"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:onclick="openactivity"     android:text="@string/button" /> 

then add function activity class layout contains button1

public void openactivity(view view)  {     intent intent = new intent(this, registeractivity .class);     startactivity(intent); } 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -