Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3 ** Copyright 2012, The Android Open Source Project
      4 **
      5 ** Licensed under the Apache License, Version 2.0 (the "License"); 
      6 ** you may not use this file except in compliance with the License. 
      7 ** You may obtain a copy of the License at 
      8 **
      9 **     http://www.apache.org/licenses/LICENSE-2.0 
     10 **
     11 ** Unless required by applicable law or agreed to in writing, software 
     12 ** distributed under the License is distributed on an "AS IS" BASIS, 
     13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
     14 ** See the License for the specific language governing permissions and 
     15 ** limitations under the License.
     16 -->
     17 
     18 <!-- Extends RelativeLayout -->
     19 <com.android.systemui.statusbar.phone.StatusBarHeaderView
     20     xmlns:android="http://schemas.android.com/apk/res/android"
     21     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
     22     android:id="@+id/header"
     23     android:layout_width="@dimen/notification_panel_width"
     24     android:layout_height="@dimen/status_bar_header_height"
     25     android:layout_gravity="@integer/notification_panel_layout_gravity"
     26     android:paddingStart="@dimen/notification_side_padding"
     27     android:paddingEnd="@dimen/notification_side_padding"
     28     android:baselineAligned="false"
     29     android:elevation="4dp"
     30     android:background="@drawable/notification_header_bg"
     31     android:clickable="true"
     32     android:focusable="true"
     33     >
     34 
     35     <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@+id/multi_user_switch"
     36         android:layout_width="@dimen/multi_user_switch_width_collapsed"
     37         android:layout_height="@dimen/status_bar_header_height"
     38         android:layout_alignParentEnd="true"
     39         android:background="@drawable/ripple_drawable" >
     40         <ImageView android:id="@+id/multi_user_avatar"
     41             android:layout_width="24dp"
     42             android:layout_height="24dp"
     43             android:layout_gravity="center"
     44             android:scaleType="centerInside"/>
     45     </com.android.systemui.statusbar.phone.MultiUserSwitch>
     46 
     47     <com.android.keyguard.AlphaOptimizedImageButton android:id="@+id/settings_button"
     48         style="@android:style/Widget.Material.Button.Borderless"
     49         android:layout_toStartOf="@id/multi_user_switch"
     50         android:layout_width="48dp"
     51         android:layout_height="@dimen/status_bar_header_height"
     52         android:background="@drawable/ripple_drawable"
     53         android:src="@drawable/ic_settings"
     54         android:contentDescription="@string/accessibility_desc_settings" />
     55 
     56     <LinearLayout android:id="@+id/system_icons_super_container"
     57         android:layout_width="wrap_content"
     58         android:layout_height="@dimen/status_bar_header_height"
     59         android:layout_toStartOf="@id/multi_user_switch"
     60         android:layout_alignWithParentIfMissing="true"
     61         android:layout_marginStart="16dp"
     62         android:background="@drawable/ripple_drawable"
     63         android:paddingEnd="4dp" >
     64         <FrameLayout android:id="@+id/system_icons_container"
     65             android:layout_width="wrap_content"
     66             android:layout_height="@dimen/status_bar_height"
     67             android:layout_gravity="center_vertical"
     68             >
     69             <include layout="@layout/system_icons" />
     70         </FrameLayout>
     71         <TextView android:id="@+id/battery_level"
     72             android:layout_width="wrap_content"
     73             android:layout_height="wrap_content"
     74             android:layout_gravity="center_vertical"
     75             android:layout_marginStart="@dimen/header_battery_margin_expanded"
     76             android:paddingEnd="@dimen/battery_level_padding_end"
     77             android:textColor="#ffffff"
     78             android:textSize="@dimen/battery_level_text_size"
     79             android:importantForAccessibility="noHideDescendants"/>
     80     </LinearLayout>
     81 
     82     <TextView
     83         android:id="@+id/header_emergency_calls_only"
     84         android:layout_height="@dimen/status_bar_header_height"
     85         android:layout_width="wrap_content"
     86         android:layout_alignParentStart="true"
     87         android:layout_toStartOf="@id/system_icons_super_container"
     88         android:paddingStart="16dp"
     89         android:paddingEnd="16dp"
     90         android:visibility="gone"
     91         android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly"
     92         android:text="@*android:string/emergency_calls_only"
     93         android:singleLine="true"
     94         android:gravity="center_vertical" />
     95 
     96     <FrameLayout
     97         android:id="@+id/date_group"
     98         android:layout_width="wrap_content"
     99         android:layout_height="wrap_content"
    100         android:layout_marginBottom="@dimen/clock_collapsed_bottom_margin"
    101         android:layout_alignParentBottom="true">
    102         <com.android.systemui.statusbar.policy.DateView android:id="@+id/date_collapsed"
    103             android:layout_width="wrap_content"
    104             android:layout_height="wrap_content"
    105             android:layout_marginStart="16dp"
    106             android:singleLine="true"
    107             android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
    108             android:layout_below="@id/clock"
    109             systemui:datePattern="@string/abbrev_wday_month_day_no_year_alarm"
    110             />
    111 
    112         <com.android.systemui.statusbar.policy.DateView android:id="@+id/date_expanded"
    113             android:layout_width="wrap_content"
    114             android:layout_height="wrap_content"
    115             android:layout_marginStart="16dp"
    116             android:singleLine="true"
    117             android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
    118             android:layout_below="@id/clock"
    119             systemui:datePattern="eeeeMMMMd"
    120             />
    121     </FrameLayout>
    122 
    123     <include layout="@layout/split_clock_view"
    124         android:layout_width="wrap_content"
    125         android:layout_height="wrap_content"
    126         android:layout_marginStart="16dp"
    127         android:layout_above="@id/date_group"
    128         android:id="@+id/clock"
    129         />
    130 
    131     <Button android:id="@+id/alarm_status"
    132         android:layout_width="wrap_content"
    133         android:layout_height="wrap_content"
    134         android:layout_alignParentBottom="true"
    135         android:layout_toEndOf="@id/date_group"
    136         android:layout_marginBottom="4dp"
    137         android:drawablePadding="6dp"
    138         android:drawableStart="@drawable/ic_access_alarms_small"
    139         android:textColor="#64ffffff"
    140         android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
    141         android:paddingEnd="6dp"
    142         android:paddingStart="6dp"
    143         android:paddingTop="16dp"
    144         android:paddingBottom="16dp"
    145         android:background="?android:attr/selectableItemBackground"
    146         android:visibility="gone"
    147         />
    148 
    149     <include
    150         android:id="@+id/qs_detail_header"
    151         layout="@layout/qs_detail_header"
    152         android:layout_width="match_parent"
    153         android:layout_height="wrap_content"
    154         android:layout_alignParentBottom="true"
    155         />
    156 
    157     <ImageView
    158         android:id="@+id/qs_detail_header_progress"
    159         android:src="@drawable/indeterminate_anim"
    160         android:alpha="0"
    161         android:background="@color/qs_detail_progress_track"
    162         android:layout_width="match_parent"
    163         android:layout_height="wrap_content"
    164         android:layout_alignParentBottom="true"
    165         />
    166 
    167     <TextView
    168         android:id="@+id/header_debug_info"
    169         android:visibility="invisible"
    170         android:layout_width="wrap_content"
    171         android:layout_height="wrap_content"
    172         android:layout_gravity="center_vertical"
    173         android:fontFamily="sans-serif-condensed"
    174         android:textSize="11dp"
    175         android:textStyle="bold"
    176         android:textColor="#00A040"
    177         android:padding="2dp"
    178         />
    179 
    180 </com.android.systemui.statusbar.phone.StatusBarHeaderView>
    181