<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2015 The Android Open Source Project
  ~ Copyright (C) 2015-2017 microG Project Team
  ~
  ~ 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.
  -->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="0.25dp"
    android:clipChildren="false"
    android:clipToPadding="false">

    <LinearLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorAccent"
        android:clickable="true"
        android:elevation="2dp"
        android:focusable="true"
        android:orientation="vertical"
        android:paddingStart="16dp"
        android:paddingLeft="16dp">

        <LinearLayout
            android:id="@+id/collapsed_group"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:gravity="center"
            android:orientation="horizontal">

            <ImageView
                android:id="@android:id/icon"
                android:layout_width="24dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="36dp"
                android:layout_marginRight="36dp"
                android:src="@android:drawable/ic_dialog_alert"
                app:tint="?android:attr/textColorPrimaryInverse" />

            <TextView
                android:id="@android:id/title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="Test Condition"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="?android:attr/textColorPrimaryInverse" />

            <ImageView
                android:id="@+id/expand_indicator"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true"
                android:padding="16dp"
                android:src="@drawable/ic_expand_more"
                app:tint="?android:attr/textColorPrimaryInverse" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/detail_group"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingStart="60dp"
            android:paddingLeft="60dp"
            android:visibility="gone">

            <TextView
                android:id="@android:id/summary"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:alpha=".7"
                android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
                android:paddingRight="?attr/listPreferredItemPaddingRight"
                android:paddingBottom="16dp"
                android:text="This condition just exists for testing. This is a summary describing it."
                android:textAppearance="?attr/textAppearanceListItemSmall"
                android:textColor="?android:attr/textColorPrimaryInverse" />

            <View
                android:id="@+id/divider"
                android:layout_width="match_parent"
                android:layout_height="0.25dp"
                android:background="@android:color/white" />

            <androidx.appcompat.widget.ButtonBarLayout
                android:id="@+id/buttonBar"
                style="?attr/buttonBarStyle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="8dp"
                android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
                android:paddingRight="?attr/listPreferredItemPaddingRight"
                android:paddingBottom="8dp">

                <Button
                    android:id="@+id/first_action"
                    style="?attr/buttonBarButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:alpha="0.8"
                    android:paddingStart="0dp"
                    android:paddingLeft="0dp"
                    android:text="Fix it!"
                    android:textColor="?android:attr/textColorPrimaryInverse" />

                <Button
                    android:id="@+id/second_action"
                    style="?attr/buttonBarButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:alpha="0.8"
                    android:textColor="?android:attr/textColorPrimaryInverse"
                    android:visibility="gone" />

            </androidx.appcompat.widget.ButtonBarLayout>
        </LinearLayout>
    </LinearLayout>
</FrameLayout>
