diff options
| author | 2024-10-10 21:41:22 -0700 | |
|---|---|---|
| committer | 2024-10-14 15:51:12 -0700 | |
| commit | 66c6c352139fbfcf89951ea4d8e93b92d07609ca (patch) | |
| tree | 275bb35aea838bbc9c3a3c825c5b071b1c0aaf43 /java/res/values | |
| parent | 33867d44db91247f2d5742f011574c651fe42e88 (diff) | |
Add keboard focus outline for Chooser targets
This change applies the same focus outline as Launcher but the end
result still needs more polishing. Some noticeable issues are:
* the outline may overlap with a long label;
* targets with a one-line labels look adjusted to the top and not
centered;
* with the light system ui theme, the outer online frame is barely
visible compare to the inner outline (this is also true for Launcher).
Bug: 295175912
Test: visual effect testing
Flag: com.android.intentresolver.target_hover_and_keyboard_focus_states
Change-Id: I1d22b187e0cc4b95c385d4f5b956effa31fd4505
Diffstat (limited to 'java/res/values')
| -rw-r--r-- | java/res/values/attrs.xml | 7 | ||||
| -rw-r--r-- | java/res/values/dimens.xml | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index c9f2c300..8c3ff7e2 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -56,4 +56,11 @@ <attr name="itemOuterSpacing" format="dimension" /> <attr name="maxWidthHint" format="dimension" /> </declare-styleable> + + <declare-styleable name="ChooserTargetItemView"> + <attr name="focusOutlineColor" format="color" /> + <attr name="focusInnerOutlineColor" format="color" /> + <attr name="focusOutlineWidth" format="dimension" /> + <attr name="focusOutlineCornerRadius" format="dimension" /> + </declare-styleable> </resources> diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml index f85ad069..515343b6 100644 --- a/java/res/values/dimens.xml +++ b/java/res/values/dimens.xml @@ -41,6 +41,8 @@ <dimen name="chooser_headline_text_size">18sp</dimen> <dimen name="chooser_grid_target_name_text_size">12sp</dimen> <dimen name="chooser_grid_activity_name_text_size">12sp</dimen> + <dimen name="chooser_item_focus_outline_corner_radius">11dp</dimen> + <dimen name="chooser_item_focus_outline_width">2dp</dimen> <dimen name="resolver_icon_size">32dp</dimen> <dimen name="resolver_button_bar_spacing">0dp</dimen> <dimen name="resolver_badge_size">18dp</dimen> |