<?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.internal.widget.WatchListDecorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/parentPanel"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.android.internal.widget.FadingWearableScrollView
        android:id="@+id/scrollView"
        android:fillViewport="true"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="?dialogPreferredPadding"
            android:paddingRight="?dialogPreferredPadding"
            android:paddingTop="@dimen/base_error_dialog_top_padding"
            android:paddingBottom="@dimen/base_error_dialog_bottom_padding"
            android:orientation="vertical" >
            <!-- Top Panel -->
            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/topPanel">
                <include android:id="@+id/title_template"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    layout="@layout/watch_base_error_dialog_title"/>
            </FrameLayout>
            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="16dp">
            </FrameLayout>
            <!-- Content Panel -->
            <FrameLayout
                android:id="@+id/contentPanel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clipToPadding="false">
                <TextView
                    android:id="@+id/message"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal|top"
                    android:textAppearance="@style/TextAppearance.DeviceDefault.Body1"
                    android:paddingTop="8dip"
                    android:paddingBottom="8dip"/>
            </FrameLayout>
            <!-- Custom Panel, to replace content panel if needed -->
            <FrameLayout
                android:id="@+id/customPanel"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:minHeight="64dp">
                <FrameLayout
                    android:id="@+android:id/custom"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>
            </FrameLayout>

            <!-- Button Panel -->
            <FrameLayout
                android:id="@+id/buttonPanel"
                android:layout_weight="1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:orientation="vertical"
                    style="?android:attr/buttonBarStyle"
                    android:measureWithLargestChild="true">
                    <Button
                        android:id="@+id/button1"
                        android:layout_gravity="start"
                        android:layout_weight="1"
                        style="?android:attr/buttonBarButtonStyle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"/>
                    <Button
                        android:id="@+id/button3"
                        android:layout_gravity="start"
                        android:layout_weight="1"
                        style="?android:attr/buttonBarButtonStyle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"/>
                    <Button
                        android:id="@+id/button2"
                        android:layout_gravity="start"
                        android:layout_weight="1"
                        style="?android:attr/buttonBarButtonStyle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"/>
                </LinearLayout>
            </FrameLayout>
        </LinearLayout>
    </com.android.internal.widget.FadingWearableScrollView>
</com.android.internal.widget.WatchListDecorLayout>
