aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res/layout/activity_change_password.xml
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-03-15 21:28:30 +0100
committerChristian Schneppe <christian@pix-art.de>2018-03-15 21:28:30 +0100
commit4d5754ac5ddbe0f02f8afd8b5b9a0bae4bfc633d (patch)
treefaabd510a99a684fa46db9302ec4045fd97d05ef /src/main/res/layout/activity_change_password.xml
parent1bfaacc66fd3ba1640a5d09a9b27a47df89bc99d (diff)
Change ShowHidePasswordEditText to TextInputEditText.
change the input fields in the AccountActivity to use the TextInputLayout.
Diffstat (limited to 'src/main/res/layout/activity_change_password.xml')
-rw-r--r--src/main/res/layout/activity_change_password.xml86
1 files changed, 37 insertions, 49 deletions
diff --git a/src/main/res/layout/activity_change_password.xml b/src/main/res/layout/activity_change_password.xml
index 8808227e3..de1ad216d 100644
--- a/src/main/res/layout/activity_change_password.xml
+++ b/src/main/res/layout/activity_change_password.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey200">
@@ -12,67 +13,54 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
- android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/infocard_border"
- android:padding="@dimen/infocard_padding"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:padding="@dimen/infocard_padding">
- <TextView
- android:id="@+id/current_password_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/current_password"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
-
- <EditText
- android:id="@+id/current_password"
+ <android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:hint="@string/password"
- android:inputType="textPassword"
- android:textColor="@color/black87"
- android:textColorHint="@color/black54"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/new_password"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
+ app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
+ app:passwordToggleEnabled="true"
+ app:passwordToggleTint="?attr/color_text_secondary">
- <EditText
- android:id="@+id/new_password"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:hint="@string/password"
- android:inputType="textPassword"
- android:textColor="@color/black87"
- android:textColorHint="@color/black54"
- android:textSize="?attr/TextSizeBody" />
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/account_settings_confirm_password"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
+ <android.support.design.widget.TextInputEditText
+ android:id="@+id/current_password"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_marginBottom="8dp"
+ android:hint="@string/current_password"
+ android:inputType="textPassword"
+ android:textColor="?attr/color_text_primary"
+ android:textColorHint="?attr/color_text_secondary"
+ android:textSize="?attr/TextSizeBody" />
+ </android.support.design.widget.TextInputLayout>
- <EditText
- android:id="@+id/new_password_confirm"
+ <android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="@string/password"
- android:inputType="textPassword"
- android:textColor="@color/black87"
- android:textColorHint="@color/black54"
- android:textSize="?attr/TextSizeBody" />
+ app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
+ app:passwordToggleEnabled="true"
+ app:passwordToggleTint="?attr/color_text_secondary">
+
+ <android.support.design.widget.TextInputEditText
+ android:id="@+id/new_password"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_marginBottom="8dp"
+ android:hint="@string/new_password"
+ android:inputType="textPassword"
+ android:textColor="?attr/color_text_primary"
+ android:textColorHint="?attr/color_text_secondary"
+ android:textSize="?attr/TextSizeBody" />
+ </android.support.design.widget.TextInputLayout>
</LinearLayout>
</ScrollView>