<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 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.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <TextView
        android:id="@+id/charge_and_estimation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="16dp"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textColor="?android:attr/colorAccent" />

    <com.android.systemui.ResizingSpace
        android:layout_width="match_parent"
        android:layout_height="@dimen/battery_detail_graph_space_top" />

    <com.android.settingslib.graph.UsageView
        android:id="@+id/battery_usage"
        android:layout_width="match_parent"
        android:layout_height="141dp"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="24dp"
        systemui:sideLabels="@array/battery_labels"
        android:colorAccent="?android:attr/colorAccent"
        systemui:textColor="#66FFFFFF" />

    <com.android.systemui.ResizingSpace
        android:layout_width="match_parent"
        android:layout_height="@dimen/battery_detail_graph_space_bottom" />

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="?android:attr/listDivider"
        android:layout_marginBottom="8dp" />

    <RelativeLayout
        android:id="@+id/switch_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="16dp"
        android:paddingBottom="16dp"
        android:background="?android:attr/selectableItemBackground"
        android:clickable="true">

        <ImageView
            android:id="@android:id/icon"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:scaleType="fitCenter"
            android:adjustViewBounds="true"
            android:layout_alignParentTop="true"
            android:layout_alignParentStart="true"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="32dp" />

        <TextView
            android:id="@android:id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toStartOf="@android:id/toggle"
            android:layout_toEndOf="@android:id/icon"
            android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary"
            android:text="@string/battery_detail_switch_title" />

        <TextView
            android:id="@android:id/summary"
            android:visibility="gone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@android:id/title"
            android:layout_toStartOf="@android:id/toggle"
            android:layout_toEndOf="@android:id/icon"
            android:textAppearance="@style/TextAppearance.QS.DetailItemSecondary"
            android:text="@string/battery_detail_switch_summary" />

        <Switch
            android:id="@android:id/toggle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_alignParentTop="true"
            android:layout_marginEnd="16dp"
            android:clickable="false"
            android:textAppearance="@style/TextAppearance.QS.DetailHeader" />

    </RelativeLayout>
</LinearLayout>
