Most of android developers start android designing from login page only. As this is going to be your first page you have to work alot to make it simple faster and decent look page. Here I am sharing the login standard and normal design with you.
- Right Click on your project
- Create New -> Other
- Select Android Activity
- Supply Name of Java file and Layout file. Generally I prefer both names to be same. (e.g. login.xml – layout and Login.java activity file)
- Create Blank Activity
<!-- This Page is developed by javadotnet.in site -->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="#4e4e4e" >
<!-- Header Start -->
<TableRow
android:id="@+id/trheader"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/lblHeader"
android:layout_weight="0.3"
android:background="#dcdcdc"
android:gravity="center"
android:padding="20dip"
android:text="Login"
android:textStyle="bold"
android:textColor="#000000"
/>
</TableRow>
<!-- Header End -->
<!-- Login Start -->
<TableRow
android:id="@+id/trLoginform"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<LinearLayout
android:id="@+id/layoutloginfront"
android:layout_width="600dip"
android:layout_height="290dip"
android:layout_gravity="top|center_horizontal"
android:background="@android:color/background_light"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="0dip" >
<View
android:layout_width="fill_parent"
android:layout_height="70dp" />
<EditText
android:id="@+id/txtUserName"
android:layout_width="305dip"
android:layout_height="36dip"
android:layout_margin="15dip"
android:hint="Username"
android:paddingLeft="36dip"
android:singleLine="true" />
<EditText
android:id="@+id/txtPwd"
android:layout_width="305dip"
android:layout_height="36dip"
android:layout_margin="15dip"
android:hint="Password"
android:inputType="textPassword"
android:paddingLeft="36dip"
android:singleLine="true" />
<Button
android:id="@+id/btnLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Login" />
</LinearLayout>
</TableRow>
<!-- Login End -->
<!-- Footer Start -->
<TableRow
android:id="@+id/tableRowInput3"
android:layout_marginTop="85dip"
android:background="#4e4e4e"
android:gravity="center_horizontal" >
<TextView
android:id="@+id/footerText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="All Rights Are Reserved By javadotnet.in"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:width="300dp" >
</TextView>
<!-- Footer End -->
</TableRow>
</TableLayout>
Any comments are appreciated so please leave your feedback about this code.