Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
I want to create the link in android in the login page like,
Forgot Password?,how to do this should I write the code in login Xml, I created or where ,Please somebody guide me as I m new to android,here is my LOgin.xml code...
HTML
<scrollview>
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:fillViewport="true"&gt;
  <relativelayout>
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:removed="#000000"&gt;
 
        &lt;!--  Header Starts--&gt;
        <linearlayout>
      android:id="@+id/header"
     android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:removed="@layout/header_gradient"
    android:paddingTop="5dip"
    android:paddingBottom="5dip"
    &gt;
      &lt;!-- Logo Start--&gt;
        &lt;ImageView android:src="@drawable/taxilogo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dip"
            android:layout_centerHorizontal="true"/&gt;
        &lt;!-- Logo Ends --&gt;  
        
</linearlayout>
        &lt;!--  Header Ends --&gt;
 
        &lt;!-- Footer Start --&gt;
        <linearlayout android:id="@+id/footer" xmlns:android="#unknown">
    android:layout_width="fill_parent"
    android:layout_height="90dip"
    android:removed="@layout/footer_repeat"
    android:layout_alignParentBottom="true"&gt;
        
</linearlayout>
                   &lt;!-- Place footer next to header to set z-index property to minus value --&gt;
        &lt;!-- Footer Ends --&gt;
 
        &lt;!-- Login Form --&gt;
        <linearlayout>
        
          android:orientation="vertical"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:removed="#000000"
          android:padding="10dip"
          android:layout_below="@id/header"&gt;
          &lt;!--  Name Label --&gt;
          <textview android:layout_width="fill_parent" xmlns:android="#unknown">
                android:layout_height="wrap_content"
                android:textColor="#daa520"
                android:text="Name"/&gt;
          <edittext android:id="@+id/txtLogin">
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dip"
                
                android:layout_marginBottom="20dip"
                android:singleLine="true"/&gt;
          &lt;!--  Password Label --&gt;
          <textview android:layout_width="fill_parent">
                android:layout_height="wrap_content"
                android:textColor="#daa520"
                android:text="Password"/&gt;
          <edittext android:id="@+id/txtPassword">
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dip"
                
                android:singleLine="true"
                android:password="true"/&gt;
          &lt;!-- Login button --&gt;
          &lt;Button android:id="@+id/btnLogin"
                android:layout_width="fill_parent"
                android:layout_height="40dp"
                android:background="#daa520"
                android:layout_marginTop="10dip"
                android:text="Login"/&gt;
              &lt;!-- <textview android:id="@+id/link_to_register">
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dip"
                android:layout_marginBottom="40dip"
                android:text="New to Nucleon? Register here"
                android:gravity="center"
                android:textSize="20dip"
                android:textColor="#0b84aa"/&gt;--&gt;
          
 
</textview></edittext></textview></edittext></textview></linearlayout>
        &lt;!-- Login Form Ends --&gt;
 
  </relativelayout>
</scrollview>
Posted
Updated 20-Jun-12 3:24am
v2

1 solution

You have to use Linkify or put the webview with the content
HTML
<a href="your_url">Sign Up now</a>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900