Advertisement
shubhamgoyal

Correct Layout

May 17th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.84 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    android:layout_width="fill_parent"
  4.    android:layout_height="fill_parent"
  5.    android:background="#ffffff"
  6.    android:orientation="vertical" >
  7.  
  8.     <TextView
  9.        android:id="@+id/textView1"
  10.        android:layout_width="fill_parent"
  11.        android:layout_height="0px"
  12.        android:layout_weight="3"
  13.        android:gravity="center_horizontal"
  14.        android:text="@string/welcome_message"
  15.        android:textSize="30sp" />
  16.  
  17.     <ImageView android:src="@drawable/logo"
  18.            android:layout_width="fill_parent"
  19.            android:gravity="center_horizontal"
  20.            android:layout_height="wrap_content"
  21.            android:layout_weight="3"
  22.            />
  23.  
  24.     <View
  25.        android:layout_width="fill_parent"
  26.        android:layout_height="0sp"
  27.        android:layout_weight="1" />
  28.  
  29.     <LinearLayout
  30.        android:layout_width="fill_parent"
  31.        android:layout_height="0sp"
  32.        android:layout_weight="2"
  33.        android:orientation="horizontal" >
  34.  
  35.         <View
  36.        android:layout_width="0sp"
  37.        android:layout_height="fill_parent"
  38.        android:layout_weight="1" />
  39.        
  40.         <TextView
  41.            android:layout_width="0sp"
  42.            android:layout_height="match_parent"
  43.            android:text="User Name"
  44.            android:textSize="22sp"
  45.            android:layout_weight="1" />
  46.  
  47.         <EditText
  48.            android:layout_width="0sp"
  49.            android:layout_weight="1"
  50.            android:layout_height="wrap_content" />
  51.        
  52.         <View
  53.        android:layout_width="0sp"
  54.        android:layout_height="fill_parent"
  55.        android:layout_weight="1" />
  56.        
  57.     </LinearLayout>
  58.  
  59.     <LinearLayout
  60.        android:layout_width="fill_parent"
  61.        android:layout_height="0sp"
  62.        android:layout_weight="2"
  63.        android:orientation="horizontal" >
  64.  
  65.         <View
  66.        android:layout_width="0sp"
  67.        android:layout_height="fill_parent"
  68.        android:layout_weight="1" />
  69.        
  70.         <TextView
  71.            android:layout_width="0sp"
  72.            android:layout_height="match_parent"
  73.            android:text="Password"
  74.            android:textSize="22sp"
  75.            android:layout_weight="1" />
  76.  
  77.         <EditText
  78.            android:layout_width="0sp"
  79.            android:layout_weight="1"
  80.            android:layout_height="wrap_content"
  81.            android:inputType="textPassword" />
  82.        
  83.         <View
  84.        android:layout_width="0sp"
  85.        android:layout_height="fill_parent"
  86.        android:layout_weight="1" />
  87.        
  88.     </LinearLayout>    
  89.    
  90.     <View
  91.        android:layout_width="fill_parent"
  92.        android:layout_height="0sp"
  93.        android:layout_weight="8" />
  94.  
  95. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement