blob: cc1a7a1ea3f5a8c2baf7ddeca6bc5d27191ce721 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<!-- Layout for a preference with a title and a compound drawable above. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@dimen/password_entry_editor_content_spacing"
android:paddingEnd="@dimen/password_entry_editor_content_spacing"
android:paddingLeft="@dimen/password_entry_editor_content_spacing"
android:paddingRight="@dimen/password_entry_editor_content_spacing">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Site -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/site_label"
android:labelFor="@+id/site_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/password_entry_editor_field_large_top_margin"
android:layout_marginBottom="@dimen/password_entry_editor_field_bottom_margin">
<EditText
tools:ignore="LabelFor"
android:id="@+id/site_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi"
android:inputType="text"
android:hint="@string/password_entry_viewer_site_title"
android:enabled="false"/>
</com.google.android.material.textfield.TextInputLayout>
<!-- Username -->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/username_label"
android:labelFor="@+id/username_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/password_entry_editor_field_top_margin"
android:layout_marginBottom="@dimen/password_entry_editor_field_bottom_margin">
<EditText
tools:ignore="LabelFor"
android:id="@+id/username_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi"
android:inputType="text"
android:hint="@string/password_entry_viewer_username_title"
android:enabled="false"/>
</com.google.android.material.textfield.TextInputLayout>
<!-- Password -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/password_label"
android:labelFor="@+id/password_edit"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_marginTop="@dimen/password_entry_editor_field_top_margin"
android:layout_marginBottom="@dimen/password_entry_editor_field_bottom_margin">
<EditText
tools:ignore="LabelFor"
android:id="@+id/password_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi"
android:importantForAutofill="noExcludeDescendants"
android:inputType="textVisiblePassword"
android:hint="@string/password_entry_viewer_password"/>
</com.google.android.material.textfield.TextInputLayout>
<org.chromium.ui.widget.ChromeImageButton
android:id="@+id/password_entry_editor_view_password"
android:background="?attr/selectableItemBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/password_entry_viewer_view_stored_password"
app:srcCompat="@drawable/ic_visibility_black"
app:tint="@color/default_icon_color_tint_list"
style="?android:attr/buttonStyleSmall"/>
<org.chromium.ui.widget.ChromeImageButton
android:id="@+id/password_entry_editor_mask_password"
android:background="?attr/selectableItemBackground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/password_entry_viewer_hide_stored_password"
app:srcCompat="@drawable/ic_visibility_off_black"
app:tint="@color/default_icon_color_tint_list"
style="?android:attr/buttonStyleSmall"/>
</LinearLayout>
<TextView
android:id="@+id/edit_hint"
android:layout_marginTop="@dimen/password_entry_editor_field_top_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.TextSmall.Secondary"/>
</LinearLayout>
</ScrollView>