-7

You must have seen in various apps on their login screens after login button there is a line stating "Don't Have an Account? Sign Up" and here Sign up is a link which on clicking takes us to sign up screen(not to a website or something). I want to do the same.

Thank You!

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • 1
    Have a look at [how-to-ask](https://stackoverflow.com/help/how-to-ask). Also, have a detailed look at [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). – Xavier Rubio Jansana Aug 30 '17 at 08:08
  • 1
    https://stackoverflow.com/questions/3328757/how-to-click-or-tap-on-a-textview-text – AsfK Aug 30 '17 at 08:08

1 Answers1

1

Example:

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Sign Up"
        android:clickable="true"
        android:onClick="clickHandler"/>

And in your activity, define the clickHandler() method in your Activity like so:

public void clickHandler(View view) {
    // your code
}
Xavier Rubio Jansana
  • 6,388
  • 1
  • 27
  • 50