Update TextInputLayouts

* Move hints to text input layouts
* Fix theme
pull/935/head
Alex Baker 6 years ago
parent 08ccf66d33
commit 676a59cef2

@ -37,40 +37,40 @@
<TextView <TextView
android:id="@+id/description" android:id="@+id/description"
style="@style/TagSettingsRow" style="@style/TagSettingsRow"
android:visibility="gone"/> android:visibility="gone" />
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_layout" android:id="@+id/name_layout"
style="@style/TagSettingsRow"> style="@style/TagSettingsRow"
android:hint="@string/display_name">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/name" android:id="@+id/name"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText"
android:hint="@string/display_name"
android:inputType="textCapSentences|textAutoCorrect" /> android:inputType="textCapSentences|textAutoCorrect" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/user_layout" android:id="@+id/user_layout"
style="@style/TagSettingsRow"> style="@style/TagSettingsRow"
android:hint="@string/user">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/user" android:id="@+id/user"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText" />
android:hint="@string/user" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/password_layout" android:id="@+id/password_layout"
style="@style/TagSettingsRow" style="@style/TagSettingsRow"
android:hint="@string/password"
app:endIconMode="password_toggle"> app:endIconMode="password_toggle">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/password" android:id="@+id/password"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText"
android:hint="@string/password"
android:inputType="textPassword" /> android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -83,12 +83,12 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/url_layout" android:id="@+id/url_layout"
style="@style/TagSettingsRow"> style="@style/TagSettingsRow"
android:hint="@string/url">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/url" android:id="@+id/url"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText" />
android:hint="@string/url" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

@ -22,13 +22,13 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_layout" android:id="@+id/name_layout"
style="@style/TagSettingsRow"> style="@style/TagSettingsRow"
android:hint="@string/display_name">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/name" android:id="@+id/name"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText"
android:hint="@string/display_name" android:inputType="textCapSentences|textAutoCorrect" />
android:inputType="textCapSentences|textAutoCorrect"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

@ -42,12 +42,12 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/encryption_password_layout" android:id="@+id/encryption_password_layout"
style="@style/TagSettingsRow" style="@style/TagSettingsRow"
android:hint="@string/encryption_password"
app:endIconMode="password_toggle"> app:endIconMode="password_toggle">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/encryption_password" android:id="@+id/encryption_password"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText"
android:hint="@string/encryption_password"
android:inputType="textPassword" /> android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

@ -19,14 +19,16 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout style="@style/TagSettingsRow"> <com.google.android.material.textfield.TextInputLayout
style="@style/TagSettingsRow"
android:hint="@string/display_name">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/name" android:id="@+id/name"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText"
android:hint="@string/display_name"
android:inputType="textCapSentences|textFilter" android:inputType="textCapSentences|textFilter"
android:maxLines="1"/> android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<include layout="@layout/list_settings_color"/> <include layout="@layout/list_settings_color"/>

@ -19,14 +19,15 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_layout" android:id="@+id/name_layout"
style="@style/TagSettingsRow"> style="@style/TagSettingsRow"
android:hint="@string/display_name">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/name" android:id="@+id/name"
style="@style/TagSettingsEditText" style="@style/TagSettingsEditText"
android:hint="@string/display_name"
android:inputType="textCapSentences|textFilter" android:inputType="textCapSentences|textFilter"
android:maxLines="1"/> android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<include layout="@layout/list_settings_color"/> <include layout="@layout/list_settings_color"/>

@ -21,9 +21,10 @@
android:id="@+id/textInputLayout" android:id="@+id/textInputLayout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:hint="@string/TEA_title_hint"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@ -32,19 +33,20 @@
android:id="@+id/title" android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/TEA_title_hint"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:inputType="textCapSentences|textAutoCorrect" android:inputType="textCapSentences|textAutoCorrect"
android:singleLine="true"/> android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout2" android:id="@+id/textInputLayout2"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:hint="@string/due_date"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout"> app:layout_constraintTop_toBottomOf="@+id/textInputLayout">
@ -53,18 +55,19 @@
android:id="@+id/due_date" android:id="@+id/due_date"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/due_date"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:singleLine="true"/> android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout3" android:id="@+id/textInputLayout3"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:hint="@string/due_time"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout2"> app:layout_constraintTop_toBottomOf="@+id/textInputLayout2">
@ -73,18 +76,19 @@
android:id="@+id/due_time" android:id="@+id/due_time"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/due_time"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:singleLine="true"/> android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/textInputLayout4" android:id="@+id/textInputLayout4"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:hint="@string/TEA_importance_label"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout3"> app:layout_constraintTop_toBottomOf="@+id/textInputLayout3">
@ -93,17 +97,18 @@
android:id="@+id/priority" android:id="@+id/priority"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/TEA_importance_label"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:singleLine="true"/> android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:hint="@string/TEA_note_label"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout4"> app:layout_constraintTop_toBottomOf="@+id/textInputLayout4">
@ -112,11 +117,12 @@
android:id="@+id/description" android:id="@+id/description"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/TEA_note_label" android:imeOptions="flagNoExtractUi" />
android:imeOptions="flagNoExtractUi"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>
</LinearLayout> </LinearLayout>

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -9,11 +8,12 @@
android:id="@+id/shortcut_list_layout" android:id="@+id/shortcut_list_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="@dimen/keyline_first" android:layout_marginStart="@dimen/keyline_first"
android:layout_marginEnd="@dimen/keyline_first"
android:layout_marginLeft="@dimen/keyline_first" android:layout_marginLeft="@dimen/keyline_first"
android:layout_marginTop="16dp"
android:layout_marginEnd="@dimen/keyline_first"
android:layout_marginRight="@dimen/keyline_first" android:layout_marginRight="@dimen/keyline_first"
android:hint="@string/list"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@ -21,18 +21,20 @@
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/shortcut_list" android:id="@+id/shortcut_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content" />
android:hint="@string/list"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/shortcut_name_layout" android:id="@+id/shortcut_name_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/keyline_first" android:layout_marginStart="@dimen/keyline_first"
android:layout_marginEnd="@dimen/keyline_first"
android:layout_marginLeft="@dimen/keyline_first" android:layout_marginLeft="@dimen/keyline_first"
android:layout_marginTop="8dp"
android:layout_marginEnd="@dimen/keyline_first"
android:layout_marginRight="@dimen/keyline_first" android:layout_marginRight="@dimen/keyline_first"
android:hint="@string/display_name"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/shortcut_list_layout" app:layout_constraintStart_toStartOf="@+id/shortcut_list_layout"
app:layout_constraintTop_toBottomOf="@+id/shortcut_list_layout"> app:layout_constraintTop_toBottomOf="@+id/shortcut_list_layout">
@ -40,17 +42,19 @@
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/shortcut_name" android:id="@+id/shortcut_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content" />
android:hint="@string/display_name"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/keyline_first" android:layout_marginStart="@dimen/keyline_first"
android:layout_marginEnd="@dimen/keyline_first"
android:layout_marginLeft="@dimen/keyline_first" android:layout_marginLeft="@dimen/keyline_first"
android:layout_marginTop="8dp"
android:layout_marginEnd="@dimen/keyline_first"
android:layout_marginRight="@dimen/keyline_first" android:layout_marginRight="@dimen/keyline_first"
android:hint="@string/color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/shortcut_name_layout" app:layout_constraintStart_toStartOf="@+id/shortcut_name_layout"
app:layout_constraintTop_toBottomOf="@+id/shortcut_name_layout"> app:layout_constraintTop_toBottomOf="@+id/shortcut_name_layout">
@ -58,7 +62,8 @@
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/shortcut_color" android:id="@+id/shortcut_color"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content" />
android:hint="@string/color"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -20,16 +20,17 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_layout" android:id="@+id/name_layout"
style="@style/TagSettingsRow"> style="@style/TagSettingsRow"
android:hint="@string/display_name">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/name" android:id="@+id/name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/display_name"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:inputType="textCapSentences|textFilter" android:inputType="textCapSentences|textFilter"
android:maxLines="1"/> android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<include layout="@layout/list_settings_color"/> <include layout="@layout/list_settings_color"/>

@ -76,7 +76,7 @@
<item name="android:editTextColor">@color/black_87</item> <item name="android:editTextColor">@color/black_87</item>
</style> </style>
<style name="TagSettingsRow"> <style name="TagSettingsRow" parent="Widget.Design.TextInputLayout">
<item name="android:textSize">18sp</item> <item name="android:textSize">18sp</item>
<item name="android:clickable">true</item> <item name="android:clickable">true</item>
<item name="android:focusable">true</item> <item name="android:focusable">true</item>

Loading…
Cancel
Save