activity_change_password.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3                xmlns:app="http://schemas.android.com/apk/res-auto"
  4                android:layout_width="match_parent"
  5                android:layout_height="match_parent"
  6                android:background="?attr/color_background_secondary">
  7
  8    <ScrollView
  9        android:layout_width="fill_parent"
 10        android:layout_height="fill_parent"
 11        android:layout_above="@+id/button_bar">
 12
 13        <android.support.v7.widget.CardView
 14            android:layout_width="match_parent"
 15            android:layout_height="wrap_content"
 16            android:layout_marginBottom="@dimen/activity_vertical_margin"
 17            android:layout_marginLeft="@dimen/activity_horizontal_margin"
 18            android:layout_marginRight="@dimen/activity_horizontal_margin"
 19            android:layout_marginTop="@dimen/activity_vertical_margin">
 20
 21            <LinearLayout
 22                android:layout_width="match_parent"
 23                android:layout_height="wrap_content"
 24                android:orientation="vertical"
 25                android:padding="@dimen/card_padding_regular">
 26
 27
 28                <android.support.design.widget.TextInputLayout
 29                    android:id="@+id/current_password_layout"
 30                    android:layout_width="match_parent"
 31                    android:layout_height="wrap_content"
 32                    app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
 33                    app:passwordToggleEnabled="true"
 34                    app:passwordToggleTint="?attr/color_text_secondary">
 35
 36                    <android.support.design.widget.TextInputEditText
 37                        android:id="@+id/current_password"
 38                        android:layout_width="match_parent"
 39                        android:layout_height="wrap_content"
 40                        android:layout_alignParentTop="true"
 41                        android:hint="@string/current_password"
 42                        android:inputType="textPassword"
 43                        android:textColor="?attr/color_text_primary"
 44                        android:textColorHint="?attr/color_text_secondary"
 45                        android:textSize="?attr/TextSizeBody"/>
 46                </android.support.design.widget.TextInputLayout>
 47
 48                <android.support.design.widget.TextInputLayout
 49                    android:id="@+id/new_password_layout"
 50                    android:layout_width="match_parent"
 51                    android:layout_height="wrap_content"
 52                    app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
 53                    app:passwordToggleEnabled="true"
 54                    app:passwordToggleTint="?attr/color_text_secondary">
 55
 56                    <android.support.design.widget.TextInputEditText
 57                        android:id="@+id/new_password"
 58                        android:layout_width="match_parent"
 59                        android:layout_height="wrap_content"
 60                        android:layout_alignParentTop="true"
 61                        android:hint="@string/new_password"
 62                        android:inputType="textPassword"
 63                        android:textColor="?attr/color_text_primary"
 64                        android:textColorHint="?attr/color_text_secondary"
 65                        android:textSize="?attr/TextSizeBody"/>
 66                </android.support.design.widget.TextInputLayout>
 67            </LinearLayout>
 68        </android.support.v7.widget.CardView>
 69    </ScrollView>
 70
 71    <LinearLayout
 72        android:id="@+id/button_bar"
 73        android:layout_width="wrap_content"
 74        android:layout_height="wrap_content"
 75        android:layout_alignParentBottom="true"
 76        android:layout_alignParentLeft="true"
 77        android:layout_alignParentRight="true">
 78
 79        <Button
 80            android:id="@+id/left_button"
 81            style="?android:attr/borderlessButtonStyle"
 82            android:layout_width="0dp"
 83            android:layout_height="wrap_content"
 84            android:layout_weight="1"
 85            android:text="@string/cancel"/>
 86
 87        <View
 88            android:layout_width="1dp"
 89            android:layout_height="fill_parent"
 90            android:layout_marginBottom="7dp"
 91            android:layout_marginTop="7dp"
 92            android:background="?attr/divider"/>
 93
 94        <Button
 95            android:id="@+id/right_button"
 96            style="?android:attr/borderlessButtonStyle"
 97            android:layout_width="0dp"
 98            android:layout_height="wrap_content"
 99            android:layout_weight="1"
100            android:text="@string/change_password"/>
101    </LinearLayout>
102
103</RelativeLayout>