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:layout_width="match_parent"
 30                    android:layout_height="wrap_content"
 31                    app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
 32                    app:passwordToggleEnabled="true"
 33                    app:passwordToggleTint="?attr/color_text_secondary">
 34
 35                    <android.support.design.widget.TextInputEditText
 36                        android:id="@+id/current_password"
 37                        android:layout_width="match_parent"
 38                        android:layout_height="wrap_content"
 39                        android:layout_alignParentTop="true"
 40                        android:hint="@string/current_password"
 41                        android:inputType="textPassword"
 42                        android:textColor="?attr/color_text_primary"
 43                        android:textColorHint="?attr/color_text_secondary"
 44                        android:textSize="?attr/TextSizeBody"/>
 45                </android.support.design.widget.TextInputLayout>
 46
 47                <android.support.design.widget.TextInputLayout
 48                    android:layout_width="match_parent"
 49                    android:layout_height="wrap_content"
 50                    app:passwordToggleDrawable="@drawable/visibility_toggle_drawable"
 51                    app:passwordToggleEnabled="true"
 52                    app:passwordToggleTint="?attr/color_text_secondary">
 53
 54                    <android.support.design.widget.TextInputEditText
 55                        android:id="@+id/new_password"
 56                        android:layout_width="match_parent"
 57                        android:layout_height="wrap_content"
 58                        android:layout_alignParentTop="true"
 59                        android:hint="@string/new_password"
 60                        android:inputType="textPassword"
 61                        android:textColor="?attr/color_text_primary"
 62                        android:textColorHint="?attr/color_text_secondary"
 63                        android:textSize="?attr/TextSizeBody"/>
 64                </android.support.design.widget.TextInputLayout>
 65            </LinearLayout>
 66        </android.support.v7.widget.CardView>
 67    </ScrollView>
 68
 69    <LinearLayout
 70        android:id="@+id/button_bar"
 71        android:layout_width="wrap_content"
 72        android:layout_height="wrap_content"
 73        android:layout_alignParentBottom="true"
 74        android:layout_alignParentLeft="true"
 75        android:layout_alignParentRight="true">
 76
 77        <Button
 78            android:id="@+id/left_button"
 79            style="?android:attr/borderlessButtonStyle"
 80            android:layout_width="0dp"
 81            android:layout_height="wrap_content"
 82            android:layout_weight="1"
 83            android:text="@string/cancel"/>
 84
 85        <View
 86            android:layout_width="1dp"
 87            android:layout_height="fill_parent"
 88            android:layout_marginBottom="7dp"
 89            android:layout_marginTop="7dp"
 90            android:background="?attr/divider"/>
 91
 92        <Button
 93            android:id="@+id/right_button"
 94            style="?android:attr/borderlessButtonStyle"
 95            android:layout_width="0dp"
 96            android:layout_height="wrap_content"
 97            android:layout_weight="1"
 98            android:text="@string/change_password"/>
 99    </LinearLayout>
100
101</RelativeLayout>