tasker_configure_layout.xml 7.25 KB
Newer Older
Daniel Wolf's avatar
Daniel Wolf committed
1
<?xml version="1.0" encoding="utf-8"?>
Daniel Wolf's avatar
Daniel Wolf committed
2
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
Daniel Wolf's avatar
Daniel Wolf committed
3 4 5
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
Daniel Wolf's avatar
Daniel Wolf committed
6
    android:layout_height="match_parent">
Daniel Wolf's avatar
Daniel Wolf committed
7

Daniel Wolf's avatar
Daniel Wolf committed
8
    <LinearLayout
Daniel Wolf's avatar
Daniel Wolf committed
9
        android:layout_width="match_parent"
10
        android:layout_height="wrap_content"
Daniel Wolf's avatar
Daniel Wolf committed
11 12 13 14 15
        android:orientation="vertical"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
Daniel Wolf's avatar
Daniel Wolf committed
16
        tools:context=".activities.MainActivity">
Daniel Wolf's avatar
Daniel Wolf committed
17

Daniel Wolf's avatar
Daniel Wolf committed
18
        <TextView
19 20
            android:id="@+id/text"
            style="@style/Base.TextAppearance.AppCompat.Title"
21 22
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
23
            android:layout_marginBottom="15dp"
24 25 26 27
            android:textColor="#FFFFFF" />

        <Spinner
            android:id="@+id/spinner"
28
            android:layout_width="wrap_content"
29 30
            android:layout_height="wrap_content" />

Daniel Wolf's avatar
Daniel Wolf committed
31 32
        <com.frostnerd.utils.design.MaterialEditText
            android:id="@+id/met_name"
Daniel Wolf's avatar
Daniel Wolf committed
33 34
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
35
            android:layout_marginTop="15dp"
Daniel Wolf's avatar
Daniel Wolf committed
36 37 38 39 40
            app:allowCollapse="false"
            app:image="@drawable/ic_language"
            app:maxCharLength="50"
            app:revealDelay="0"
            app:revealType="revealInstant">
Daniel Wolf's avatar
Daniel Wolf committed
41

Daniel Wolf's avatar
Daniel Wolf committed
42 43 44 45
            <EditText
                android:id="@+id/name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
46
                android:hint="@string/hint_dns_entry_name"
47
                android:imeOptions="actionNext"
48
                android:inputType="textNoSuggestions"
49 50 51
                android:maxLines="1"
                android:nextFocusDown="@id/dns1"
                android:nextFocusForward="@id/dns1"
Daniel Wolf's avatar
Daniel Wolf committed
52
                android:text=""
53 54
                android:textColor="#FFF">

55 56
                <requestFocus />
            </EditText>
Daniel Wolf's avatar
Daniel Wolf committed
57
        </com.frostnerd.utils.design.MaterialEditText>
Daniel Wolf's avatar
Daniel Wolf committed
58

59 60
        <LinearLayout
            android:id="@+id/wrapper"
61
            android:layout_width="match_parent"
Daniel Wolf's avatar
Daniel Wolf committed
62
            android:layout_height="wrap_content"
63
            android:orientation="vertical">
Daniel Wolf's avatar
Daniel Wolf committed
64

65 66
            <com.frostnerd.utils.design.MaterialEditText
                android:id="@+id/met_dns1"
Daniel Wolf's avatar
Daniel Wolf committed
67 68
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
69 70 71 72 73
                android:layout_marginTop="20dp"
                app:allowCollapse="false"
                app:image="@drawable/ic_language"
                app:revealDelay="0"
                app:revealType="revealInstant">
Daniel Wolf's avatar
Daniel Wolf committed
74

75 76 77 78 79
                <EditText
                    android:id="@+id/dns1"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:digits="0123456789."
80
                    android:hint="@string/hint_dns1"
81
                    android:imeOptions="actionNext"
82
                    android:inputType="numberDecimal"
83 84 85
                    android:nextFocusDown="@id/dns2"
                    android:nextFocusForward="@id/dns2"
                    android:nextFocusUp="@id/name"
86
                    android:text="@string/default_dns1"
87 88
                    android:textColor="#FFF" />
            </com.frostnerd.utils.design.MaterialEditText>
Daniel Wolf's avatar
Daniel Wolf committed
89

Daniel Wolf's avatar
Daniel Wolf committed
90

91 92
            <com.frostnerd.utils.design.MaterialEditText
                android:id="@+id/met_dns2"
Daniel Wolf's avatar
Daniel Wolf committed
93 94
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
95 96 97 98
                app:allowCollapse="false"
                app:image="@drawable/ic_language"
                app:revealDelay="0"
                app:revealType="revealInstant">
Daniel Wolf's avatar
Daniel Wolf committed
99

100 101 102 103 104
                <EditText
                    android:id="@+id/dns2"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:digits="0123456789."
105
                    android:hint="@string/hint_dns2"
106
                    android:imeOptions="actionDone"
107
                    android:inputType="numberDecimal"
108
                    android:nextFocusUp="@id/dns1"
109
                    android:text="@string/default_dns2"
110 111 112 113 114 115 116
                    android:textColor="#FFF" />
            </com.frostnerd.utils.design.MaterialEditText>

            <LinearLayout
                android:id="@+id/default_dns_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
Daniel Wolf's avatar
Daniel Wolf committed
117
                android:background="?attr/inputElementColor"
118
                android:clickable="true"
119
                android:focusable="true"
120
                android:onClick="openDefaultDNSDialog"
Daniel Wolf's avatar
Daniel Wolf committed
121
                android:padding="10dp">
Daniel Wolf's avatar
Daniel Wolf committed
122

123 124 125 126 127
                <ImageButton
                    android:id="@+id/default_dns_view_image"
                    style="@style/Widget.AppCompat.Button.Borderless"
                    android:layout_width="32dp"
                    android:layout_height="32dp"
Daniel Wolf's avatar
Daniel Wolf committed
128
                    android:background="?attr/inputElementColor"
129
                    android:src="@drawable/ic_action_import" />
Daniel Wolf's avatar
Daniel Wolf committed
130

131 132 133 134 135 136 137 138 139 140 141 142
                <View
                    android:layout_width="2dp"
                    android:layout_height="match_parent"
                    android:background="#FFF" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center"
                    android:text="@string/default_dns"
                    android:textColor="#FFF" />
            </LinearLayout>
Daniel Wolf's avatar
Daniel Wolf committed
143
        </LinearLayout>
144 145 146

        <RelativeLayout
            android:layout_width="match_parent"
147 148
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp">
149 150 151 152 153 154 155 156 157 158 159

            <View
                android:id="@+id/middle"
                android:layout_width="1dp"
                android:layout_height="1dp"
                android:layout_centerInParent="true" />

            <Button
                android:id="@+id/cancel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
160
                android:layout_marginEnd="3dp"
161
                android:layout_marginRight="3dp"
162
                android:layout_toLeftOf="@id/middle"
163
                android:layout_toStartOf="@id/middle"
Daniel Wolf's avatar
Daniel Wolf committed
164
                android:background="?attr/inputElementColor"
165 166
                android:text="@string/cancel"
                android:textColor="#FFF" />
167 168 169 170 171 172

            <Button
                android:id="@+id/done"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="3dp"
173 174
                android:layout_marginStart="3dp"
                android:layout_toEndOf="@id/middle"
175
                android:layout_toRightOf="@id/middle"
Daniel Wolf's avatar
Daniel Wolf committed
176
                android:background="?attr/inputElementColor"
177 178
                android:text="@string/done"
                android:textColor="#FFF" />
179
        </RelativeLayout>
Daniel Wolf's avatar
Daniel Wolf committed
180
    </LinearLayout>
181

Daniel Wolf's avatar
Daniel Wolf committed
182
</ScrollView>
Daniel Wolf's avatar
Daniel Wolf committed
183