content_main.xml 3.14 KB
Newer Older
Yizhi Liu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:tools="http://schemas.android.com/tools"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              app:layout_behavior="@string/appbar_scrolling_view_behavior"
              tools:showIn="@layout/activity_main">
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/label_address"/>
        <EditText
            android:id="@+id/input_address"
            android:hint="@string/input_address"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
23
            android:inputType="phone"
Yizhi Liu committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
            android:background="@android:drawable/editbox_background"/>
    </LinearLayout>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/label_port"/>
        <EditText
            android:id="@+id/input_port"
            android:hint="@string/input_port"
            android:minWidth="100dip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
41
            android:inputType="phone"
Yizhi Liu committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
            android:background="@android:drawable/editbox_background"/>
    </LinearLayout>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/label_key"/>
        <EditText
            android:id="@+id/input_key"
            android:hint="@string/input_key"
            android:minWidth="100dip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@android:drawable/editbox_background"/>
    </LinearLayout>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
69
            android:text="@string/label_persistent"/>
Yizhi Liu committed
70
        <Switch
71
            android:id="@+id/switch_persistent"
Yizhi Liu committed
72 73 74 75 76 77 78 79 80 81
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:switchMinWidth="55dp"
            android:paddingLeft="10dip"
            android:checked="false"
            android:textOff="@string/switch_off"
            android:textOn="@string/switch_on" />
    </LinearLayout>

</LinearLayout>