• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2024 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<!-- TODO(b/396116157): I cannot find the correct src of ImageView to set to
18     match the other preference items. I tried
19     @drawable/android:selectable_item_background but this is private so will
20     not compile. It should match the other items so that theme migration will
21     switch to the correct final color. -->
22<FrameLayout
23    xmlns:android="http://schemas.android.com/apk/res/android"
24    android:id="@+id/display_topology_pane_holder"
25    android:importantForAccessibility="no"
26    android:layout_height="wrap_content"
27    android:layout_width="match_parent"
28    android:layout_marginVertical="@dimen/display_topology_pane_vertical_margin"
29    android:layout_marginHorizontal="@dimen/display_topology_pane_margin"
30    android:orientation="horizontal">
31    <ImageView
32        android:importantForAccessibility="no"
33        android:layout_height="match_parent"
34        android:layout_width="match_parent"
35        android:src="@drawable/display_topology_background"/>
36    <FrameLayout
37        android:id="@+id/display_topology_pane_content"
38        android:clipToOutline="true"
39        android:layout_width="match_parent"
40        android:layout_height="match_parent"/>
41
42    <!-- Give the textview a solid-color background (the same as the pane) in
43         order to make the text clear when a DisplayBlock is drawn under it as
44         part of display_topology_pane_content.
45
46         If the padding is in the TextView, then the background will fill the
47         padding, which we don't want vertically, as there is a lot of vertical
48         padding. We do need some horizontal padding because otherwise the
49         rounded corners will touch the edge of the text. -->
50    <FrameLayout
51        android:importantForAccessibility="no"
52        android:layout_height="wrap_content"
53        android:layout_width="wrap_content"
54        android:layout_gravity="top|center_horizontal"
55        android:paddingVertical="10dp">
56        <TextView
57            android:id="@+id/topology_hint"
58            android:background="@drawable/display_topology_background"
59            android:paddingHorizontal="5dp"
60            android:layout_height="wrap_content"
61            android:layout_width="wrap_content" />
62    </FrameLayout>
63</FrameLayout>
64