Remove the extra blue border from the topology pane and give the toggle below it its own rounded corners. Flag: com.android.settings.flags.display_topology_pane_in_display_list Test: screenshots Test: verify display blocks are still clipped to the topology holder view Bug: b/396116157 Change-Id: I3c0f826db24e5c599c6b51f71d099976fb04cbf0
64 lines
2.8 KiB
XML
64 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2024 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<!-- TODO(b/396116157): I cannot find the correct src of ImageView to set to
|
|
match the other preference items. I tried
|
|
@drawable/android:selectable_item_background but this is private so will
|
|
not compile. It should match the other items so that theme migration will
|
|
switch to the correct final color. -->
|
|
<FrameLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/display_topology_pane_holder"
|
|
android:importantForAccessibility="no"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_marginVertical="@dimen/display_topology_pane_vertical_margin"
|
|
android:layout_marginHorizontal="@dimen/display_topology_pane_margin"
|
|
android:orientation="horizontal">
|
|
<ImageView
|
|
android:importantForAccessibility="no"
|
|
android:layout_height="match_parent"
|
|
android:layout_width="match_parent"
|
|
android:src="@drawable/display_topology_background"/>
|
|
<FrameLayout
|
|
android:id="@+id/display_topology_pane_content"
|
|
android:clipToOutline="true"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"/>
|
|
|
|
<!-- Give the textview a solid-color background (the same as the pane) in
|
|
order to make the text clear when a DisplayBlock is drawn under it as
|
|
part of display_topology_pane_content.
|
|
|
|
If the padding is in the TextView, then the background will fill the
|
|
padding, which we don't want vertically, as there is a lot of vertical
|
|
padding. We do need some horizontal padding because otherwise the
|
|
rounded corners will touch the edge of the text. -->
|
|
<FrameLayout
|
|
android:importantForAccessibility="no"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="wrap_content"
|
|
android:layout_gravity="top|center_horizontal"
|
|
android:paddingVertical="10dp">
|
|
<TextView
|
|
android:id="@+id/topology_hint"
|
|
android:background="@drawable/display_topology_background"
|
|
android:paddingHorizontal="5dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="wrap_content" />
|
|
</FrameLayout>
|
|
</FrameLayout>
|