Commit 632016ac authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Android][WebSignin] Extract account picker header for reuse

This CL extracts the account picker bottom sheet header in a separate
file to reuse it in different account picker view xml files after the
refactoring.

Bug: 1138824
Change-Id: I025c9aac45ca5022a6b95d4ba3d847120d7cf3b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2502588Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821688}
parent 8181b37c
...@@ -775,6 +775,7 @@ chrome_java_resources = [ ...@@ -775,6 +775,7 @@ chrome_java_resources = [
"java/res/layout/account_chooser_dialog_title.xml", "java/res/layout/account_chooser_dialog_title.xml",
"java/res/layout/account_divider_preference.xml", "java/res/layout/account_divider_preference.xml",
"java/res/layout/account_management_account_row.xml", "java/res/layout/account_management_account_row.xml",
"java/res/layout/account_picker_bottom_sheet_header.xml",
"java/res/layout/account_picker_bottom_sheet_view.xml", "java/res/layout/account_picker_bottom_sheet_view.xml",
"java/res/layout/account_picker_dialog_body.xml", "java/res/layout/account_picker_dialog_body.xml",
"java/res/layout/account_picker_incognito_row.xml", "java/res/layout/account_picker_incognito_row.xml",
......
<?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. -->
<merge
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android" >
<ImageView
android:id="@+id/account_picker_bottom_sheet_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:importantForAccessibility="no"
app:srcCompat="@drawable/chrome_sync_logo" />
<TextView
android:id="@+id/account_picker_bottom_sheet_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="8dp"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.TextLarge.Primary"
android:text="@string/signin_account_picker_dialog_title" />
<org.chromium.ui.widget.TextViewWithLeading
android:id="@+id/account_picker_bottom_sheet_subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="16dp"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.TextMedium.Secondary"
android:text="@string/signin_account_picker_bottom_sheet_subtitle"
app:leading="@dimen/text_size_medium_leading" />
</merge>
\ No newline at end of file
...@@ -20,35 +20,7 @@ ...@@ -20,35 +20,7 @@
android:importantForAccessibility="no" android:importantForAccessibility="no"
app:srcCompat="@drawable/drag_handlebar" /> app:srcCompat="@drawable/drag_handlebar" />
<ImageView <include layout="@layout/account_picker_bottom_sheet_header" />
android:id="@+id/account_picker_bottom_sheet_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:importantForAccessibility="no"
app:srcCompat="@drawable/chrome_sync_logo" />
<TextView
android:id="@+id/account_picker_bottom_sheet_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="8dp"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.TextLarge.Primary"
android:text="@string/signin_account_picker_dialog_title" />
<org.chromium.ui.widget.TextViewWithLeading
android:id="@+id/account_picker_bottom_sheet_subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="16dp"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.TextMedium.Secondary"
android:text="@string/signin_account_picker_bottom_sheet_subtitle"
app:leading="@dimen/text_size_medium_leading" />
<View <View
android:id="@+id/account_picker_horizontal_divider" android:id="@+id/account_picker_horizontal_divider"
......
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