<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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.
  -->
<com.android.wm.shell.windowdecor.WindowDecorLinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/desktop_mode_caption"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:orientation="horizontal">

    <LinearLayout
        android:id="@+id/open_menu_button"
        android:layout_width="wrap_content"
        android:layout_height="40dp"
        android:orientation="horizontal"
        android:clickable="true"
        android:focusable="true"
        android:layout_marginStart="12dp">
        <ImageView
            android:id="@+id/application_icon"
            android:layout_width="@dimen/desktop_mode_caption_icon_radius"
            android:layout_height="@dimen/desktop_mode_caption_icon_radius"
            android:layout_gravity="center_vertical"
            android:contentDescription="@string/app_icon_text"
            android:layout_marginStart="6dp"
            android:scaleType="centerCrop"/>

        <TextView
            android:id="@+id/application_name"
            android:layout_width="0dp"
            android:layout_height="20dp"
            android:maxWidth="86dp"
            android:textAppearance="@android:style/TextAppearance.Material.Title"
            android:textSize="14sp"
            android:textFontWeight="500"
            android:lineHeight="20dp"
            android:layout_gravity="center_vertical"
            android:layout_weight="1"
            android:layout_marginStart="8dp"
            tools:text="Gmail"/>

        <ImageButton
            android:id="@+id/expand_menu_button"
            android:layout_width="16dp"
            android:layout_height="16dp"
            android:contentDescription="@string/expand_menu_text"
            android:src="@drawable/ic_baseline_expand_more_24"
            android:background="@null"
            android:scaleType="fitCenter"
            android:clickable="false"
            android:focusable="false"
            android:layout_marginHorizontal="8dp"
            android:layout_gravity="center_vertical"/>

    </LinearLayout>

    <View
        android:id="@+id/caption_handle"
        android:layout_width="wrap_content"
        android:layout_height="40dp"
        android:layout_weight="1"/>

    <com.android.wm.shell.windowdecor.MaximizeButtonView
        android:id="@+id/maximize_button_view"
        android:layout_width="44dp"
        android:layout_height="40dp"
        android:layout_gravity="end"
        android:layout_marginHorizontal="8dp"
        android:clickable="true"
        android:focusable="true"/>

    <ImageButton
        android:id="@+id/close_window"
        android:layout_width="44dp"
        android:layout_height="40dp"
        android:paddingHorizontal="10dp"
        android:paddingVertical="8dp"
        android:layout_marginEnd="8dp"
        android:contentDescription="@string/close_button_text"
        android:src="@drawable/desktop_mode_header_ic_close"
        android:scaleType="centerCrop"
        android:gravity="end"/>
</com.android.wm.shell.windowdecor.WindowDecorLinearLayout>