Commit 7133309a authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Signin][Android][UI] Update expand icon in web sign-in bottom sheet

This CL updates the icon to expand the account list in the collapsed
bottom sheet used in web sign-in flow.

Screenshot: https://crbug.com/1103328#c1
Bug: 1103328
Change-Id: I4ce657ce917cb3b3f87dde62009cf026f4c62c34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288378
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788565}
parent 5adf8e82
......@@ -701,6 +701,7 @@ chrome_java_resources = [
"java/res/drawable/ic_error.xml",
"java/res/drawable/ic_error_googred_36dp.xml",
"java/res/drawable/ic_event_round.xml",
"java/res/drawable/ic_expand_more_in_circle_24dp.xml",
"java/res/drawable/ic_file_download_24dp.xml",
"java/res/drawable/ic_file_download_36dp.xml",
"java/res/drawable/ic_file_download_scheduled_24dp.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. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:strokeWidth="1"
android:pathData="M23.5,11.9999C23.5,18.3512 18.3513,23.4999 12,23.4999C5.6487,23.4999 0.5,18.3512 0.5,11.9999C0.5,5.6486 5.6487,0.4999 12,0.4999C18.3513,0.4999 23.5,5.6486 23.5,11.9999Z"
android:strokeColor="@color/default_chip_outline_color_light"/>
<path
android:pathData="M12.5892,14.7487C12.4383,14.9039 12.23,14.9999 12,14.9999C11.77,14.9999 11.5617,14.9039 11.4108,14.7487L7.2442,10.463C7.0933,10.3079 7,10.0936 7,9.857C7,9.3839 7.3733,8.9999 7.8333,8.9999C8.0633,8.9999 8.2717,9.0959 8.4225,9.251L12,12.9307L15.5775,9.251C15.7283,9.0959 15.9367,8.9999 16.1667,8.9999C16.6267,8.9999 17,9.3839 17,9.857C17,10.0936 16.9067,10.3079 16.7558,10.463L12.5892,14.7487Z"
android:fillColor="@color/default_chip_outline_color_dark"
android:fillType="evenOdd"/>
</vector>
......@@ -3,7 +3,6 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -43,6 +42,6 @@
android:layout_height="24dp"
android:layout_marginStart="16dp"
tools:ignore="ContentDescription"
android:src="@drawable/ic_check_googblue_24dp"
app:tint="@color/default_icon_color_blue" />
tools:src="@drawable/ic_check_googblue_24dp"
tools:tint="@color/default_icon_color_blue" />
</LinearLayout>
......@@ -3,7 +3,6 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -45,6 +44,6 @@
android:layout_height="24dp"
android:layout_marginStart="16dp"
tools:ignore="ContentDescription"
android:src="@drawable/ic_check_googblue_24dp"
app:tint="@color/default_icon_color_blue" />
tools:src="@drawable/ic_check_googblue_24dp"
tools:tint="@color/default_icon_color_blue" />
</LinearLayout>
......@@ -97,8 +97,7 @@ class AccountPickerBottomSheetView implements BottomSheetContent {
ExistingAccountRowViewBinder.bindAccountView(accountProfileData, mSelectedAccountView);
ImageView rowEndImage = mSelectedAccountView.findViewById(R.id.account_selection_mark);
rowEndImage.setImageResource(R.drawable.ic_expand_more_black_24dp);
rowEndImage.setColorFilter(R.color.default_icon_color);
rowEndImage.setImageResource(R.drawable.ic_expand_more_in_circle_24dp);
String continueAsButtonText = mContext.getString(R.string.signin_promo_continue_as,
accountProfileData.getGivenNameOrFullNameOrEmail());
......
......@@ -12,6 +12,8 @@ import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.LayoutRes;
import androidx.core.content.ContextCompat;
import androidx.core.widget.ImageViewCompat;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
......@@ -45,9 +47,15 @@ class ExistingAccountRowViewBinder {
bindAccountView(profileData, view);
} else if (propertyKey == ExistingAccountRowProperties.IS_SELECTED_ACCOUNT) {
ImageView selectionMark = view.findViewById(R.id.account_selection_mark);
selectionMark.setVisibility(model.get(ExistingAccountRowProperties.IS_SELECTED_ACCOUNT)
? View.VISIBLE
: View.GONE);
if (model.get(ExistingAccountRowProperties.IS_SELECTED_ACCOUNT)) {
selectionMark.setImageResource(R.drawable.ic_check_googblue_24dp);
ImageViewCompat.setImageTintList(selectionMark,
ContextCompat.getColorStateList(
view.getContext(), R.color.default_icon_color_blue));
selectionMark.setVisibility(View.VISIBLE);
} else {
selectionMark.setVisibility(View.GONE);
}
} else {
throw new IllegalArgumentException(
"Cannot update the view for propertyKey: " + propertyKey);
......
......@@ -116,6 +116,7 @@ public class AccountPickerBottomSheetTest {
onView(withText(R.string.signin_account_picker_dialog_title)).check(matches(isDisplayed()));
onView(withText(ACCOUNT_NAME1)).check(matches(isDisplayed()));
onView(withText(FULL_NAME1)).check(matches(isDisplayed()));
onView(withId(R.id.account_selection_mark)).check(matches(isDisplayed()));
String continueAsText = mActivityTestRule.getActivity().getString(
R.string.signin_promo_continue_as, GIVEN_NAME1);
onView(withText(continueAsText)).check(matches(isDisplayed()));
......
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