| <?xml version="1.0" encoding="utf-8"?><!-- |
| Copyright (C) 2015 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <ScrollView |
| 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"> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:orientation="vertical" |
| android:padding="16dp"> |
| |
| <android.support.design.widget.TextInputLayout |
| android:id="@+id/input_username" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| app:errorEnabled="true"> |
| |
| <android.support.design.widget.TextInputEditText |
| android:id="@+id/edit_username" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:hint="@string/form_username" /> |
| |
| </android.support.design.widget.TextInputLayout> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:orientation="horizontal"> |
| |
| <Button |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:onClick="showError" |
| android:text="@string/show_error" /> |
| |
| <Button |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:onClick="clearError" |
| android:text="@string/clear_error" /> |
| |
| <Button |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:onClick="toggleEnabled" |
| android:text="@string/toggle_enabled" /> |
| |
| </LinearLayout> |
| |
| <android.support.design.widget.TextInputLayout |
| android:id="@+id/input_email" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="8dp" |
| app:errorEnabled="true"> |
| |
| <android.support.design.widget.TextInputEditText |
| android:id="@+id/edit_email" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:hint="@string/form_email" /> |
| |
| </android.support.design.widget.TextInputLayout> |
| |
| <android.support.design.widget.TextInputLayout |
| android:id="@+id/input_description" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="8dp" |
| app:counterEnabled="true" |
| app:counterMaxLength="30"> |
| |
| <EditText |
| android:id="@+id/edit_description" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:hint="@string/form_description" /> |
| |
| </android.support.design.widget.TextInputLayout> |
| |
| <android.support.design.widget.TextInputLayout |
| android:id="@+id/input_password" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginTop="8dp" |
| app:passwordToggleEnabled="true"> |
| |
| <EditText |
| android:id="@+id/edit_password" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:hint="@string/form_password" |
| android:inputType="textPassword" /> |
| |
| </android.support.design.widget.TextInputLayout> |
| |
| <LinearLayout |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:orientation="horizontal"> |
| |
| <Button |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:onClick="setPasswordEnabled" |
| android:text="@string/password_enable" /> |
| |
| <Button |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:onClick="setPasswordDisabled" |
| android:text="@string/password_disable" /> |
| |
| </LinearLayout> |
| |
| </LinearLayout> |
| |
| </ScrollView> |