Advertisement
flowerly

android xml sample

May 16th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.40 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:tools="http://schemas.android.com/tools"
  4.    android:layout_width="match_parent"
  5.    android:layout_height="match_parent"
  6.    android:layout_weight="1"
  7.    android:fillViewport="true">
  8.  
  9.     <RelativeLayout
  10.        android:layout_width="match_parent"
  11.        android:layout_height="wrap_content">
  12.  
  13.         <LinearLayout
  14.            android:layout_width="match_parent"
  15.            android:layout_height="match_parent"
  16.            android:layout_marginBottom="60dp"
  17.            android:orientation="vertical"
  18.            android:paddingBottom="24dp"
  19.            android:paddingLeft="24dp"
  20.            android:paddingRight="24dp">
  21.  
  22.             <TextView
  23.                android:id="@+id/register_step2_title_text"
  24.                style="@style/TextAppearance.AppCompat.Medium"
  25.                android:layout_width="match_parent"
  26.                android:layout_height="wrap_content"
  27.                android:layout_marginLeft="4dp"
  28.                android:layout_marginRight="4dp"
  29.                android:layout_marginTop="12dp"
  30.                android:text="@string/step_contact_information_title"
  31.                android:textColor="@color/colorPrimary" />
  32.  
  33.             <TextView
  34.                android:id="@+id/register_step2_subtitle_text"
  35.                style="@style/TextAppearance.AppCompat.Small"
  36.                android:layout_width="match_parent"
  37.                android:layout_height="wrap_content"
  38.                android:layout_marginBottom="18dp"
  39.                android:layout_marginLeft="4dp"
  40.                android:layout_marginRight="4dp"
  41.                android:layout_marginTop="12dp"
  42.                android:text="@string/step_instruction"
  43.                android:textColor="@color/colorAccent" />
  44.  
  45.             <AutoCompleteTextView
  46.                android:id="@+id/register_step2_input_addressLine1"
  47.                style="@style/TextAppearance.AppCompat.Small"
  48.                android:layout_width="match_parent"
  49.                android:layout_height="wrap_content"
  50.                android:layout_marginBottom="12dp"
  51.                android:hint="@string/address_line_1"
  52.                android:imeOptions="actionNext"
  53.                android:inputType="text|textNoSuggestions"
  54.                android:maxLines="1"
  55.                android:textColor="@color/colorAccent" />
  56.  
  57.             <AutoCompleteTextView
  58.                android:id="@+id/register_step2_input_addressLine2"
  59.                style="@style/TextAppearance.AppCompat.Small"
  60.                android:layout_width="match_parent"
  61.                android:layout_height="wrap_content"
  62.                android:layout_marginBottom="12dp"
  63.                android:hint="@string/address_line_2"
  64.                android:imeOptions="actionNext"
  65.                android:inputType="text|textNoSuggestions"
  66.                android:maxLines="1"
  67.                android:textColor="@color/colorAccent" />
  68.  
  69.             <AutoCompleteTextView
  70.                android:id="@+id/register_step2_input_province"
  71.                style="@style/TextAppearance.AppCompat.Small"
  72.                android:layout_width="match_parent"
  73.                android:layout_height="wrap_content"
  74.                android:layout_marginBottom="12dp"
  75.                android:digits="@string/alphabet_with_space"
  76.                android:hint="@string/province"
  77.                android:imeOptions="actionNext"
  78.                android:inputType="textAutoComplete|textNoSuggestions"
  79.                android:maxLines="1"
  80.                android:singleLine="true"
  81.                android:textColor="@color/colorAccent"
  82.                tools:ignore="Deprecated" />
  83.  
  84.             <AutoCompleteTextView
  85.                android:id="@+id/register_step2_input_city"
  86.                style="@style/TextAppearance.AppCompat.Small"
  87.                android:layout_width="match_parent"
  88.                android:layout_height="wrap_content"
  89.                android:layout_marginBottom="12dp"
  90.                android:digits="@string/alphabet_with_space"
  91.                android:hint="@string/city"
  92.                android:imeOptions="actionNext"
  93.                android:inputType="textAutoComplete|textNoSuggestions"
  94.                android:maxLines="1"
  95.                android:singleLine="true"
  96.                android:textColor="@color/colorAccent"
  97.                tools:ignore="Deprecated" />
  98.  
  99.             <AutoCompleteTextView
  100.                android:id="@+id/register_step2_input_post_code"
  101.                style="@style/TextAppearance.AppCompat.Small"
  102.                android:layout_width="match_parent"
  103.                android:layout_height="wrap_content"
  104.                android:layout_marginBottom="12dp"
  105.                android:hint="@string/postcode"
  106.                android:imeOptions="actionNext"
  107.                android:inputType="number"
  108.                android:maxLength="5"
  109.                android:maxLines="1"
  110.                android:textColor="@color/colorAccent" />
  111.  
  112.             <AutoCompleteTextView
  113.                android:id="@+id/register_step2_input_mobile_phone"
  114.                style="@style/TextAppearance.AppCompat.Small"
  115.                android:layout_width="match_parent"
  116.                android:layout_height="wrap_content"
  117.                android:layout_marginBottom="12dp"
  118.                android:digits="1234567890"
  119.                android:hint="@string/mobile_phone"
  120.                android:imeOptions="actionDone"
  121.                android:inputType="phone"
  122.                android:maxLength="20"
  123.                android:maxLines="1"
  124.                android:textColor="@color/colorAccent" />
  125.  
  126.         </LinearLayout>
  127.  
  128.         <FrameLayout
  129.            android:layout_width="match_parent"
  130.            android:layout_height="60dp"
  131.            android:layout_alignParentBottom="true"
  132.            android:background="@drawable/button_background">
  133.  
  134.             <android.support.v7.widget.AppCompatButton
  135.                android:id="@+id/register_step2_primary_button"
  136.                android:layout_width="match_parent"
  137.                android:layout_height="60dp"
  138.                android:background="?attr/selectableItemBackground"
  139.                android:text="@string/continue_"
  140.                android:textColor="@android:color/white"
  141.                android:textSize="20sp" />
  142.  
  143.         </FrameLayout>
  144.  
  145.     </RelativeLayout>
  146.  
  147.  
  148. </ScrollView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement