<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright 2014, 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.systemui.statusbar.NotificationGuts
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/notification_guts"
        android:visibility="gone"
        android:clickable="true"
        android:gravity="top|start"
        android:orientation="vertical"
        android:paddingStart="@*android:dimen/notification_content_margin_start"
        android:paddingEnd="8dp"
        android:background="@color/notification_guts_bg_color"
        android:theme="@*android:style/Theme.DeviceDefault.Light">

    <!-- header -->
    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="15dp"
            android:paddingEnd="8dp"
            android:id="@+id/notification_guts_header"
            android:orientation="horizontal"
            android:layout_gravity="start">

        <ImageView
                android:id="@+id/app_icon"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:layout_marginEnd="6dp"
                android:src="@android:drawable/arrow_down_float" />
        <TextView
                android:id="@+id/pkgname"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                style="@style/TextAppearance.NotificationGuts.Header" />
        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/debug_info"
                android:layout_weight="0"
                style="@style/TextAppearance.NotificationGuts.Header"
                android:layout_gravity="bottom|start"
                android:visibility="gone" />
    </LinearLayout>
    <!-- Importance radio buttons -->
    <RadioGroup
            android:id="@+id/importance_buttons"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingStart="3dp"
            android:paddingTop="4dp"
            android:paddingEnd="8dp" >
        <RadioButton
                android:id="@+id/silent_importance"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:paddingStart="22dp"
                android:text="@string/show_silently"
                style="@style/TextAppearance.NotificationGuts.Radio"
                android:buttonTint="@color/notification_guts_buttons" />
        <RadioButton
                android:id="@+id/block_importance"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:paddingStart="22dp"
                android:text="@string/block"
                style="@style/TextAppearance.NotificationGuts.Radio"
                android:buttonTint="@color/notification_guts_buttons" />
        <RadioButton
                android:id="@+id/reset_importance"
                android:layout_width="wrap_content"
                android:layout_height="40dp"
                android:paddingStart="22dp"
                style="@style/TextAppearance.NotificationGuts.Radio"
                android:buttonTint="@color/notification_guts_buttons" />
    </RadioGroup>
    <!-- When neither blocking or silencing is available -->
    <TextView
        android:id="@+id/cant_silence_or_block"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:gravity="center_vertical"
        style="@style/TextAppearance.NotificationGuts.Radio"
        android:text="@string/cant_silence_or_block"
        android:visibility="gone"
        />
    <!-- Importance slider -->
    <LinearLayout
            android:id="@+id/importance_slider"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="vertical"
            android:clickable="false"
            android:focusable="false"
            android:paddingEnd="8dp"
            android:paddingTop="4dp"
            android:visibility="gone">
        <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                style="@style/TextAppearance.NotificationGuts.Primary"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal"
                android:paddingBottom="2dp"/>

        <TextView
                android:id="@+id/summary"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignStart="@android:id/title"
                android:textAlignment="viewStart"
                style="@style/TextAppearance.NotificationGuts.Secondary"
                android:maxLines="3"
                android:minLines="2"
                android:paddingBottom="4dp" />

        <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="8dp" >

            <ImageView
                    android:id="@+id/auto_importance"
                    android:src="@drawable/notification_auto_importance"
                    android:layout_gravity="center_vertical|start"
                    android:layout_width="48dp"
                    android:layout_height="48dp" />

            <SeekBar
                    android:id="@+id/seekbar"
                    android:layout_marginStart="56dp"
                    android:layout_marginEnd="32dp"
                    android:layout_gravity="center_vertical"
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:focusable="true"
                    android:background="#00ffffff"
                    android:progressBackgroundTint="@color/notification_guts_secondary_slider_color"
                    android:thumbTint="?android:attr/colorAccent"
                    android:progressTint="?android:attr/colorAccent"
                    style="@android:style/Widget.Material.SeekBar.Discrete"
                    android:tickMarkTint="@android:color/black" />

        </FrameLayout>
    </LinearLayout>
    <!-- buttons -->
    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="end"
            android:paddingTop="16dp"
            android:paddingBottom="8dp" >

        <TextView
            android:id="@+id/more_settings"
            android:text="@string/notification_more_settings"
            android:layout_width="wrap_content"
            android:layout_height="36dp"
            style="@style/TextAppearance.NotificationGuts.Button"
            android:background="@drawable/btn_borderless_rect"
            android:gravity="center"
            android:paddingEnd="8dp"
            android:paddingStart="8dp"
            android:focusable="true" />

        <TextView
            android:id="@+id/done"
            android:text="@string/notification_done"
            android:layout_width="wrap_content"
            android:layout_height="36dp"
            style="@style/TextAppearance.NotificationGuts.Button"
            android:background="@drawable/btn_borderless_rect"
            android:gravity="center"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"
            android:focusable="true"/>
    </LinearLayout>
</com.android.systemui.statusbar.NotificationGuts>
