Show border highlight when dragging display

In the process of adding highlight we use an extra feature of
LayerDrawable to add insets so that we can add padding without changing
the actual dimensions or position of the DisplayBlock Views.

To make it easier to keep the values consistent and to aid in conversion
between px and dp, use dimen values to store padding and highlight
metrics.

Bug: b/352650922
Flag: com.android.settings.flags.display_topology_pane_in_display_list
Test: atest DisplayTopologyPreferenceTest.kt
Change-Id: I51ff2ce4a086e84a0c529346f8ede90430090b11
This commit is contained in:
Matthew DeVore
2025-01-21 18:36:24 +00:00
parent dac774edab
commit 1fb8fb0b4f
7 changed files with 155 additions and 40 deletions

View File

@@ -224,4 +224,5 @@
<!-- Connected displays -->
<color name="display_topology_background_color">@color/settingslib_color_grey100</color>
<color name="system_secondary">@android:color/system_secondary_light</color>
</resources>

View File

@@ -550,4 +550,7 @@
<!-- Connected displays -->
<dimen name="display_topology_pane_margin">24dp</dimen>
<dimen name="display_block_padding">5dp</dimen>
<dimen name="display_block_highlight_width">2dp</dimen>
<dimen name="display_block_corner_radius">10dp</dimen>
</resources>