<?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"
    xmlns:androidprv="http://schemas.android.com/apk/prv/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:orientation="horizontal">
    <FrameLayout
        android:id="@+id/display_topology_pane_content"
        android:clipToOutline="true"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/display_topology_background"/>

    <!-- 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:paddingTop="16dp">
        <TextView
            android:id="@+id/topology_hint"
            android:background="@drawable/display_topology_background"
            android:paddingHorizontal="5dp"
            android:textColor="@androidprv:color/materialColorOnPrimaryContainer"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content" />
    </FrameLayout>
</FrameLayout>
