1
0
Fork 0

For #12622: Visually indicate different types of suggestions in the search screen

master
Hakkı Kaan Çalışkan 2020-07-23 15:09:40 +03:00 committed by Jeff Boek
parent 5b997ff1d8
commit 12e68ac18d
10 changed files with 86 additions and 0 deletions

View File

@ -106,6 +106,7 @@ class AwesomeBarView(
components.core.store,
selectTabUseCase,
components.core.icons,
getDrawable(context, R.drawable.ic_search_results_tab),
excludeSelectedSession = true
)
@ -122,6 +123,7 @@ class AwesomeBarView(
bookmarksStorage = components.core.bookmarksStorage,
loadUrlUseCase = loadUrlUseCase,
icons = components.core.icons,
indicatorIcon = getDrawable(context, R.drawable.ic_search_results_bookmarks),
engine = engineForSpeculativeConnects
)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="16dp"
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
android:pathData="M16 2c1.598 0 2.904 1.249 2.995 2.824L19 5v7.501l0.098 0.076c0.465 0.387 0.788 0.94 0.877 1.568l0.02 0.19L20 14.5v1c0 1.326-1.032 2.41-2.336 2.495L17.5 18h-15c-1.325 0-2.41-1.032-2.495-2.336L0 15.5v-1c0-0.709 0.295-1.349 0.769-1.804l0.133-0.119L1 12.5V5c0-1.538 1.158-2.807 2.65-2.98l0.174-0.015L4 2z"/>
<path android:fillColor="?attr/awesomeBarIndicatorColor"
android:pathData="M16 4l0.117 0.007c0.42 0.049 0.762 0.359 0.857 0.764l0.02 0.112L17 5v9h0.5l0.09 0.008c0.175 0.032 0.318 0.155 0.379 0.318l0.023 0.084L18 14.5v1l-0.008 0.09c-0.032 0.175-0.155 0.318-0.318 0.379l-0.084 0.023L17.5 16h-15l-0.09-0.008c-0.175-0.032-0.318-0.155-0.379-0.318L2.008 15.59 2 15.5v-1l0.008-0.09c0.032-0.175 0.154-0.318 0.318-0.379l0.084-0.023L2.5 14H3V5l0.007-0.117c0.049-0.42 0.359-0.762 0.764-0.857l0.112-0.02L4 4zm-4 10H8v1h4zm3-8H5v7h10z"/>
</vector>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="16dp"
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
android:pathData="M6 0h8a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"/>
<path android:fillColor="?attr/awesomeBarIndicatorColor"
android:pathData="M14 2H6C4.895 2 4 2.895 4 4v12c0 1.105 0.895 2 2 2h8c1.105 0 2-0.895 2-2V4c0-1.105-0.895-2-2-2zm-3 15H9v-1h2zm3-2.5c0 0.276-0.224 0.5-0.5 0.5h-7C6.224 15 6 14.776 6 14.5v-10C6 4.224 6.224 4 6.5 4h7C13.776 4 14 4.224 14 4.5z"/>
</vector>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="16dp"
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
android:pathData="M4 1h12c2.21 0 4 1.79 4 4v10c0 2.21-1.79 4-4 4H4c-2.21 0-4-1.79-4-4V5c0-2.21 1.79-4 4-4z"/>
<path android:fillColor="?attr/awesomeBarIndicatorColor"
android:pathData="M16 3H4C2.895 3 2 3.895 2 5v10c0 1.105 0.895 2 2 2h12c1.105 0 2-0.895 2-2V5c0-1.105-0.895-2-2-2zm-1 11.5c0 0.276-0.224 0.5-0.5 0.5h-10C4.224 15 4 14.776 4 14.5v-9C4 5.224 4.224 5 4.5 5h10C14.776 5 15 5.224 15 5.5zm2-3.5h-1V9h1z"/>
</vector>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="16dp"
android:width="16dp"
android:viewportHeight="20"
android:viewportWidth="20">
<path android:fillColor="?attr/foundation"
android:pathData="M6 3L5.8 3.005C3.684 3.109 2 4.858 2 7v4.17l-0.012 0.005C0.83 11.59 0 12.698 0 14c0 1.657 1.343 3 3 3h14c1.657 0 3-1.343 3-3l-0.005-0.176c-0.067-1.157-0.79-2.138-1.802-2.577L18 11.17V7c0-2.21-1.79-4-4-4z"/>
<path android:fillColor="?attr/awesomeBarIndicatorColor"
android:pathData="M14 5c1.054 0 1.918 0.816 1.994 1.85L16 7v6h1c0.552 0 1 0.448 1 1 0 0.513-0.386 0.935-0.883 0.993L17 15H3c-0.552 0-1-0.448-1-1 0-0.513 0.386-0.935 0.883-0.993L3 13h1V7c0-1.054 0.816-1.918 1.85-1.994L6 5z"/>
</vector>

View File

@ -47,6 +47,8 @@
<color name="prompt_login_edit_text_cursor_color_normal_theme">@color/prompt_login_edit_text_cursor_color_dark_theme</color>
<color name="readermode_start_gradient_normal_theme">#C689FF</color>
<color name="readermode_end_gradient_normal_theme">#00B3F4</color>
<color name="search_suggestion_indicator_icon_color_normal_theme">@color/search_suggestion_indicator_icon_color_dark_theme</color>
<color name="search_suggestion_indicator_icon_bookmark_color_normal_theme">@color/search_suggestion_indicator_icon_bookmark_color_dark_theme</color>
<!-- Tab tray -->
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_dark_theme</color>

View File

@ -52,6 +52,8 @@
<attr name="readerModeStartGradient" format="reference"/>
<attr name="readerModeEndGradient" format="reference"/>
<attr name="syncedTabsSeparator" format="reference"/>
<attr name="awesomeBarIndicatorColor" format="reference|color"/>
<attr name="awesomeBarIndicatorBookmarkColor" format="reference|color"/>
<!-- Tab tray -->
<attr name="tabTrayItemMediaBackground" format="reference" />

View File

@ -71,6 +71,8 @@
<color name="prompt_login_edit_text_cursor_color_light_theme">#312a64</color>
<color name="readermode_start_gradient_normal_theme">#FF9059ff</color>
<color name="readermode_end_gradient_normal_theme">#FF0250bb</color>
<color name="search_suggestion_indicator_icon_color_light_theme">#008787</color>
<color name="search_suggestion_indicator_icon_bookmark_color_light_theme">#0060df</color>
<!-- Tab Tray -->
<color name="tab_tray_item_text_light_theme">@color/ink_80</color>
@ -132,6 +134,8 @@
<color name="add_on_private_browsing_exterior_circle_background_dark_theme">@color/accent_dark_theme</color>
<color name="add_on_private_browsing_interior_icon_background_dark_theme">#FFFFFF</color>
<color name="prompt_login_edit_text_cursor_color_dark_theme">#9059ff</color>
<color name="search_suggestion_indicator_icon_color_dark_theme">#2ac3a2</color>
<color name="search_suggestion_indicator_icon_bookmark_color_dark_theme">#0090ed</color>
<!-- Tab Tray -->
<color name="tab_tray_item_text_dark_theme">@color/light_grey_05</color>
@ -238,6 +242,8 @@
<color name="add_on_private_browsing_exterior_circle_background_normal_theme">@color/add_on_private_browsing_exterior_circle_background_light_theme</color>
<color name="add_on_private_browsing_interior_icon_background_normal_theme">@color/add_on_private_browsing_interior_icon_background_light_theme</color>
<color name="prompt_login_edit_text_cursor_color_normal_theme">@color/prompt_login_edit_text_cursor_color_light_theme</color>
<color name="search_suggestion_indicator_icon_color_normal_theme">@color/search_suggestion_indicator_icon_color_light_theme</color>
<color name="search_suggestion_indicator_icon_bookmark_color_normal_theme">@color/search_suggestion_indicator_icon_bookmark_color_light_theme</color>
<!-- Tab tray -->
<color name="tab_tray_item_text_normal_theme">@color/tab_tray_item_text_light_theme</color>

View File

@ -77,6 +77,8 @@
<item name="readerModeStartGradient">@color/readermode_start_gradient_normal_theme</item>
<item name="readerModeEndGradient">@color/readermode_end_gradient_normal_theme</item>
<item name="syncedTabsSeparator">@color/synced_tabs_separator</item>
<item name="awesomeBarIndicatorColor">@color/search_suggestion_indicator_icon_color_normal_theme</item>
<item name="awesomeBarIndicatorBookmarkColor">@color/search_suggestion_indicator_icon_bookmark_color_normal_theme</item>
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>
<item name="tabTrayItemSelectedBackground">@color/tab_tray_item_selected_background_normal_theme</item>
@ -208,6 +210,8 @@
<item name="addOnPrivateBrowsingExteriorCircleBackground">@color/add_on_private_browsing_exterior_circle_background_private_theme</item>
<item name="addOnPrivateBrowsingInteriorIconBackground">@color/add_on_private_browsing_interior_icon_background_private_theme</item>
<item name="mozacPromptLoginEditTextCursorColor">@color/prompt_login_edit_text_cursor_color_private_theme</item>
<item name="awesomeBarIndicatorColor">@color/search_suggestion_indicator_icon_color_dark_theme</item>
<item name="awesomeBarIndicatorBookmarkColor">@color/search_suggestion_indicator_icon_bookmark_color_dark_theme</item>
<!-- Tab Tray -->
<item name="tabTrayItemBackground">@color/tab_tray_item_background_normal_theme</item>