Commit 15b179a7 authored by Cathy Li's avatar Cathy Li Committed by Commit Bot

[Touchless]: Add focus highlighting to the ML carousel focus ring

Bug: 964084
Change-Id: I1d2413dc96b72d45976d332c933528aea357045a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614684
Commit-Queue: Cathy Li <chili@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarJustin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660568}
parent daf63a8a
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 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. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/suggestion_tile_focused_background" android:state_focused="true"/>
<item android:drawable="@drawable/tile_view_icon_background_modern" />
</selector>
\ No newline at end of file
......@@ -4,5 +4,5 @@
found in the LICENSE file. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke android:width="@dimen/most_likely_tile_focus_stroke_width" android:color="@color/light_active_color"/>
<solid android:color="@color/modern_blue_600_alpha_12" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 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. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke android:width="@dimen/focus_ring_stroke_width" android:color="@color/modern_blue_800"/>
</shape>
\ No newline at end of file
......@@ -3,5 +3,5 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/tile_view_icon_focused" android:state_focused="true"/>
<item android:drawable="@drawable/suggestion_tile_focused_highlight" android:state_focused="true"/>
</selector>
\ No newline at end of file
......@@ -9,13 +9,14 @@
android:layout_width="@dimen/tile_view_icon_size"
android:layout_height="@dimen/tile_view_icon_size"
android:layout_gravity="center"
android:background="@drawable/suggestion_tile">
android:background="@drawable/suggestion_tile_highlight">
<!-- The icon background. -->
<View
android:id="@+id/tile_view_icon_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/tile_view_icon_background_modern" />
android:background="@drawable/suggestion_tile_background"
android:duplicateParentState="true" />
<!-- The main icon. -->
<org.chromium.chrome.browser.touchless.QuantizedSizeIconView
......@@ -23,8 +24,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
app:smallSize="@dimen/most_likely_quantized_icon_size_small"
app:largeSize="@dimen/most_likely_quantized_icon_size_large"
app:smallSize="@dimen/most_likely_quantized_icon_size_small"
app:largeSize="@dimen/most_likely_quantized_icon_size_large"
android:layout_margin="@dimen/most_likely_quantized_icon_margin"
android:importantForAccessibility="no" />
......@@ -32,8 +33,8 @@
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/suggestion_tile"
android:duplicateParentState="true"/>
android:background="@drawable/suggestion_tile_highlight"
android:duplicateParentState="true" />
<!-- The offline badge. -->
<ImageView
......@@ -43,6 +44,6 @@
android:layout_gravity="top|end"
android:layout_marginEnd="@dimen/tile_view_offline_badge_margin_end_modern_condensed"
android:visibility="gone"
android:contentDescription="@string/accessibility_ntp_offline_badge"
android:importantForAccessibility="no"
app:srcCompat="@drawable/ic_offline_pin_blue_white" />
</org.chromium.chrome.browser.touchless.SiteSuggestionsTileView>
......@@ -5,6 +5,7 @@
<resources>
<color name="modern_blue_100">#D2E3FC</color>
<color name="modern_blue_600_alpha_12">#1F185ABC</color>
<color name="notouch_progress_bar_foreground">@color/modern_blue_100</color>
<color name="notouch_progress_bar_text">@color/modern_grey_800</color>
<color name="notouch_tooltip_background">@color/modern_grey_800</color>
......
......@@ -15,6 +15,8 @@
<dimen name="notouch_key_functions_tooltip_item_image_vertical_padding">5dp</dimen>
<dimen name="notouch_key_functions_tooltip_item_horizontal_margin">4dp</dimen>
<dimen name="focus_ring_stroke_width">2dp</dimen>
<!-- Open last tab placeholder dimensions. -->
<dimen name="open_last_tab_placeholder_image_size">24dp</dimen>
<dimen name="open_last_tab_placeholder_image_margin_bottom">13dp</dimen>
......@@ -27,7 +29,6 @@
<dimen name="open_last_tab_timestamp_text_margin_left">10dp</dimen>
<!-- Most likely carousel dimensions. -->
<dimen name="most_likely_tile_focus_stroke_width">2dp</dimen>
<dimen name="most_likely_carousel_edge_spacer">8dp</dimen>
<dimen name="most_likely_tile_size">40dp</dimen>
<!-- Desired 24dp, but the edge spacer is also in effect. 8 + 16 = 24 -->
......
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