In my sign_in.xml
file I used this:
<Button
android:id="@+id/signuptextlinkbtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@android:color/transparent"
android:onClick="performSingUpMethod"
android:text="Sign up now!"
android:textColor="#5B55FF"
android:textSize="15dp"
android:textStyle="bold" />
In my SignIn.java
file, I used this:
import android.graphics.Paint;
Button signuptextlinkbutton = (Button) findViewById(R.id.signuptextlinkbtn);
signuptextlinkbutton.setPaintFlags(signuptextlinkbutton.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);
Now I can see my link underlined. It was simply text even thought I declared it as a Button
.