Commit b7323c10 authored by Clemens Arbesser's avatar Clemens Arbesser Committed by Commit Bot

[Autofill Assistant] Added new OVERFLOW icon to assistant chips.

Bug: b/171776026
Change-Id: Ifd5e8f80c212747550dd6447d3296af96f477970
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2507730
Commit-Queue: Clemens Arbesser <arbesser@google.com>
Reviewed-by: default avatarLuca Hunkeler <hluca@google.com>
Cr-Commit-Position: refs/heads/master@{#822268}
parent 181d6759
......@@ -350,6 +350,7 @@ android_resources("java_resources") {
"java/res/drawable/ic_grocery_black_24dp.xml",
"java/res/drawable/ic_local_dining_black_24dp.xml",
"java/res/drawable/ic_logo_assistant_24dp.xml",
"java/res/drawable/ic_overflow_black_24dp.xml",
"java/res/drawable/ic_payment_black_24dp.xml",
"java/res/drawable/ic_refresh_black_24dp.xml",
"java/res/drawable/ic_remove_outline_white_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"
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
tools:targetApi="21">
<path
android:fillColor="@color/default_icon_color"
android:pathData="M12 8c1.1 0 2 -0.9 2 -2s-0.9 -2 -2 -2 -2 0.9 -2 2 0.9 2 2 2zm0 2c-1.1 0 -2 0.9 -2 2s0.9 2 2 2 2 -0.9 2 -2 -0.9 -2 -2 -2zm0 6c-1.1 0 -2 0.9 -2 2s0.9 2 2 2 2 -0.9 2 -2 -0.9 -2 -2 -2z"/>
</vector>
......@@ -26,7 +26,7 @@ public class AssistantChip {
/**
* An icon that should be displayed next to the text. This is the java version of the ChipIcon
* enum in //components/autofill_assistant/browser/service.proto. DO NOT change this without
* enum in //components/autofill_assistant/browser/model.proto. DO NOT change this without
* adapting that proto enum.
*/
@IntDef({Icon.NONE, Icon.CLEAR, Icon.DONE, Icon.REFRESH})
......@@ -34,14 +34,17 @@ public class AssistantChip {
public @interface Icon {
int NONE = 0;
// https://icons.googleplex.com/#icon=ic_clear
// https://icons.googleplex.com/#icon=clear
int CLEAR = 1;
// https://icons.googleplex.com/#icon=ic_done
// https://icons.googleplex.com/#icon=done
int DONE = 2;
// https://icons.googleplex.com/#icon=ic_refresh
// https://icons.googleplex.com/#icon=refresh
int REFRESH = 3;
// https://icons.googleplex.com/#icon=more_vert
int OVERFLOW = 4;
}
/**
......
......@@ -97,6 +97,10 @@ public class AssistantChipViewHolder extends ViewHolder {
iconResource = R.drawable.ic_refresh_black_24dp;
iconDescriptionResource = R.string.menu_refresh;
break;
case AssistantChip.Icon.OVERFLOW:
iconResource = R.drawable.ic_overflow_black_24dp;
iconDescriptionResource = R.string.autofill_assistant_overflow_options;
break;
default:
iconResource = ButtonView.INVALID_ICON_ID;
break;
......
......@@ -245,6 +245,9 @@
<message name="IDS_AUTOFILL_ASSISTANT_DECREASE_VALUE" desc="Text announced when the '-' button of a counter is highlighted by TalkBack.">
Decrease value
</message>
<message name="IDS_AUTOFILL_ASSISTANT_OVERFLOW_OPTIONS" desc="Content description for the overflow icon displayed in the first prompt, which will open a popup menu with additional options.">
Preferences
</message>
</messages>
</release>
</grit>
......@@ -261,14 +261,17 @@ enum ChipType {
enum ChipIcon {
NO_ICON = 0;
// https://icons.googleplex.com/#icon=ic_clear
// https://icons.googleplex.com/#icon=clear
ICON_CLEAR = 1;
// https://icons.googleplex.com/#icon=ic_done
// https://icons.googleplex.com/#icon=done
ICON_DONE = 2;
// https://icons.googleplex.com/#icon=ic_refresh
// https://icons.googleplex.com/#icon=refresh
ICON_REFRESH = 3;
// https://icons.googleplex.com/#icon=more_vert
ICON_OVERFLOW = 4;
}
// Defines a mapping to an Android Q direct action.
......
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