Example of a layout:- how to design a layout
<?xml version="1.0" encoding="utf-8"?><ScrollView android:layout_height="match_parent" android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" android:background="@mipmap/back2"
tools:context="com.example.avi.lookie.MainActivity">
<ImageView android:layout_width="125dp" android:layout_height="125dp" android:layout_marginLeft="30dp" android:layout_marginTop="60dp" android:background="@mipmap/smile"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Lookie" android:textColor="@color/white" android:layout_marginTop="110dp" android:layout_marginLeft="150dp" android:textSize="48dp" android:textStyle="bold" android:fontFamily="serif" android:id="@+id/text1"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="IT'S NEVER BEEN SO EASIER" android:layout_below="@id/text1" android:textSize="20dp" android:layout_marginLeft="49dp" android:layout_marginTop="15dp" android:id="@id/text2"/>
<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/text1" android:layout_marginTop="70dp" android:backgroundTint="@color/white" android:text="Email" android:drawableLeft="@drawable/user" android:id="@+id/edit2" android:textColor="@color/white"/>
<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/edit2" android:layout_marginTop="30dp" android:backgroundTint="@color/white" android:text="Password" android:drawableLeft="@drawable/ic_stat_name" android:id="@+id/edit3" android:textColor="@color/white"/>
<Button android:layout_width="300dp" android:layout_height="wrap_content" android:layout_below="@id/edit3" android:layout_marginTop="55dp" android:background="@color/skyblue" android:text="Login in" android:layout_marginLeft="30dp" android:textColor="@color/white" android:id="@+id/btn1"/>
<Button android:layout_width="300dp" android:layout_height="wrap_content" android:layout_marginLeft="30dp" android:layout_below="@id/btn1" android:layout_marginTop="20dp" android:background="@color/colorPrimaryDark" android:text="login with facebook" android:textColor="@color/white" android:id="@+id/btn2"/>
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/btn2" android:text="Create an account" android:textSize="20dp" android:layout_marginTop="20dp" android:id="@+id/txt1" android:textColor="@color/white"/>
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/txt1" android:text="Not a member" android:textColor="@color/white" android:layout_marginTop="10dp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/btn2" android:text="Lost password ?" android:textSize="20dp" android:textColor="@color/white" android:layout_marginTop="20dp" android:layout_marginLeft="200dp" android:id="@+id/txt2"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/txt2" android:text="Thats not a problem" android:textColor="@color/white" android:layout_marginLeft="200dp" android:layout_marginTop="10dp" />
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/white" android:layout_below="@id/btn2" android:layout_marginTop="12dp" android:id="@+id/vw1"></View>
</RelativeLayout>
</ScrollView>
Comments
Post a Comment