Commit 665aacb3 authored by Ioana Pandele's avatar Ioana Pandele Committed by Commit Bot

[PwdCheckAndroid] Make the edit layout a ScrollView

This ensures that the entire view is scrolled when the keyboard starts
overlapping with the contents.

Bug: 1133221
Change-Id: Id826c7ea25a25d4424aed75f51389b4ae8d9b362
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440498Reviewed-by: default avatarFriedrich [CET] <fhorschig@chromium.org>
Commit-Queue: Ioana Pandele <ioanap@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812600}
parent f20e3bf7
...@@ -4,10 +4,9 @@ ...@@ -4,10 +4,9 @@
found in the LICENSE file. --> found in the LICENSE file. -->
<!-- Layout for a preference with a title and a compound drawable above. --> <!-- Layout for a preference with a title and a compound drawable above. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingStart="@dimen/password_entry_editor_content_spacing" android:paddingStart="@dimen/password_entry_editor_content_spacing"
...@@ -15,101 +14,105 @@ ...@@ -15,101 +14,105 @@
android:paddingLeft="@dimen/password_entry_editor_content_spacing" android:paddingLeft="@dimen/password_entry_editor_content_spacing"
android:paddingRight="@dimen/password_entry_editor_content_spacing"> android:paddingRight="@dimen/password_entry_editor_content_spacing">
<!-- Site --> <LinearLayout
<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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/password_entry_editor_field_top_margin" android:orientation="vertical">
android:layout_marginBottom="@dimen/password_entry_editor_field_bottom_margin">
<EditText <!-- Site -->
tools:ignore="LabelFor" <com.google.android.material.textfield.TextInputLayout
android:id="@+id/username_edit" android:id="@+id/site_label"
android:labelFor="@+id/site_edit"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi" android:layout_marginTop="@dimen/password_entry_editor_field_large_top_margin"
android:inputType="text" android:layout_marginBottom="@dimen/password_entry_editor_field_bottom_margin">
android:hint="@string/password_entry_viewer_username_title"
android:enabled="false"/>
</com.google.android.material.textfield.TextInputLayout>
<!-- Password --> <EditText
<LinearLayout tools:ignore="LabelFor"
android:layout_width="match_parent" android:id="@+id/site_edit"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:orientation="horizontal" android:layout_height="wrap_content"
android:gravity="center"> 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 <com.google.android.material.textfield.TextInputLayout
android:id="@+id/password_label" android:id="@+id/username_label"
android:labelFor="@+id/password_edit" android:labelFor="@+id/username_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content" 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_marginTop="@dimen/password_entry_editor_field_top_margin"
android:layout_marginBottom="@dimen/password_entry_editor_field_bottom_margin"> android:layout_marginBottom="@dimen/password_entry_editor_field_bottom_margin">
<EditText <EditText
tools:ignore="LabelFor" tools:ignore="LabelFor"
android:id="@+id/password_edit" 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_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:imeOptions="flagNoExtractUi" android:orientation="horizontal"
android:importantForAutofill="noExcludeDescendants" android:gravity="center">
android:inputType="textVisiblePassword"
android:hint="@string/password_entry_viewer_password"/>
</com.google.android.material.textfield.TextInputLayout>
<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">
<org.chromium.ui.widget.ChromeImageButton <EditText
android:id="@+id/password_entry_editor_view_password" tools:ignore="LabelFor"
android:background="?attr/selectableItemBackground" android:id="@+id/password_edit"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/password_entry_viewer_view_stored_password" android:imeOptions="flagNoExtractUi"
app:srcCompat="@drawable/ic_visibility_black" android:importantForAutofill="noExcludeDescendants"
app:tint="@color/default_icon_color_tint_list" android:inputType="textVisiblePassword"
style="?android:attr/buttonStyleSmall"/> android:hint="@string/password_entry_viewer_password"/>
</com.google.android.material.textfield.TextInputLayout>
<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> <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"/>
<TextView <org.chromium.ui.widget.ChromeImageButton
android:id="@+id/edit_hint" android:id="@+id/password_entry_editor_mask_password"
android:layout_marginTop="@dimen/password_entry_editor_field_top_margin" android:background="?attr/selectableItemBackground"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.TextSmall.Secondary"/> 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>
</LinearLayout> <TextView
\ No newline at end of file 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>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment