Wednesday, November 6, 2013

Designing Login Screen

Android merging layouts
Designing Login Screen
   In this tutorial the main focus is to creating android login, registration screens and navigating/switching between them.
1. Create a new project by going to File ⇒ New Android Project. Fill all the details and name your activity as LoginActivity.
2. Once the project is created, create a new activity class in your project src directory and name it as RegisterActivity.java ( Right Click on src/package ⇒ New ⇒ Class)
3. Now we need to create a layout for login screen. Under res/layoutscreate a new xml file and name it as login.xml
( Right Click on res/layout ⇒ New ⇒ Android XML File)
4. In login.xml type following code( Here i am giving code for basic layout)
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:fillViewport="true">
  <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:background="#ffffff">
 
        <!--  Header Starts-->
        <!--  Header Ends -->
 
        <!-- Footer Start -->
                   <!-- Place footer next to header to set z-index property to minus value -->
        <!-- Footer Ends -->
 
        <!-- Login Form -->
        <!-- Login Form Ends -->
 
  </RelativeLayout>
</ScrollView>
⇒Designing Header ( with Logo & Gradient Background )
In login screen we have header with a logo and gradient background color. Design your logo with different dimensions for high-density( 72px height)medium density ( 48 px height) and low density (36px height).
twitter logo

No comments:

Post a Comment