chromium/chrome/browser/password_entry_edit/android/java/res/layout/credential_edit_view.xml

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2021 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <include layout="@layout/site_or_app"/>

        <!-- Username -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="22dp">

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/username_text_input_layout"
                android:labelFor="@+id/username"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/password_entry_viewer_username_title"
                app:hintTextAppearance="@style/TextAppearance.TextSmall.Secondary"
                app:errorTextAppearance="@style/TextAppearance.ErrorCaption"
                app:errorEnabled="true">

                <com.google.android.material.textfield.TextInputEditText
                    tools:ignore="LabelFor"
                    android:id="@+id/username"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:imeOptions="flagNoExtractUi"
                    android:importantForAutofill="noExcludeDescendants"
                    android:inputType="textMultiLine"
                    android:textAppearance="@style/TextAppearance.TextLarge.Primary"/>
            </com.google.android.material.textfield.TextInputLayout>

            <org.chromium.ui.widget.ChromeImageButton
                    android:id="@+id/copy_username_button"
                    android:background="?attr/selectableItemBackground"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical | end"
                    android:layout_marginBottom="@dimen/credential_edit_text_icon_margin_bottom"
                    android:contentDescription="@string/password_entry_viewer_copy_stored_username"
                    app:srcCompat="@drawable/ic_content_copy_black"
                    app:tint="@color/default_icon_color_tint_list"
                    style="?android:attr/buttonStyleSmall"/>
        </FrameLayout>

        <!-- Password -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp">

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/password_text_input_layout"
                android:labelFor="@+id/password"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:hint="@string/password_entry_viewer_password"
                app:hintTextAppearance="@style/TextAppearance.TextSmall.Secondary"
                app:errorTextAppearance="@style/TextAppearance.ErrorCaption"
                app:errorEnabled="true">

                <com.google.android.material.textfield.TextInputEditText
                    tools:ignore="LabelFor"
                    android:id="@+id/password"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:imeOptions="flagNoExtractUi"
                    android:importantForAutofill="noExcludeDescendants"
                    android:inputType="textVisiblePassword"
                    android:textAppearance="@style/TextAppearance.TextLarge.Primary"/>
            </com.google.android.material.textfield.TextInputLayout>

            <LinearLayout
                android:id="@+id/password_icons"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/credential_edit_text_icon_margin_bottom"
                android:layout_gravity="center_vertical | end"
                android:orientation="horizontal">

                 <org.chromium.ui.widget.ChromeImageButton
                    android:id="@+id/password_visibility_button"
                    android:background="?attr/selectableItemBackground"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/password_entry_viewer_show_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/copy_password_button"
                    android:background="?attr/selectableItemBackground"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/password_entry_viewer_copy_stored_password"
                    app:srcCompat="@drawable/ic_content_copy_black"
                    app:tint="@color/default_icon_color_tint_list"
                    style="?android:attr/buttonStyleSmall"/>
            </LinearLayout>
        </FrameLayout>

        <TextView
            android:id="@+id/edit_info"
            android:layout_marginTop="@dimen/password_entry_editor_field_top_margin"
            android:layout_marginStart="@dimen/credential_edit_text_view_margin"
            android:layout_marginEnd="@dimen/credential_edit_text_view_margin"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="@style/TextAppearance.TextSmall.Secondary"/>

        <org.chromium.components.browser_ui.widget.DualControlLayout
            android:id="@+id/button_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="@dimen/credential_edit_button_layout_padding"
            android:paddingBottom="@dimen/credential_edit_button_layout_padding"
            android:background="@macro/default_bg_color"
            app:stackedMargin="@dimen/credential_edit_button_layout_stacked_margin"
            app:primaryButtonText="@string/done"
            app:secondaryButtonText="@string/cancel"
            app:buttonAlignment="end"/>
    </LinearLayout>
</ScrollView>