Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!--
      3   Copyright (C) 2016 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 <android.support.v7.widget.GridLayout
     19     xmlns:android="http://schemas.android.com/apk/res/android"
     20     xmlns:app="http://schemas.android.com/apk/res-auto"
     21     android:layout_width="match_parent"
     22     android:layout_height="wrap_content"
     23     android:background="?attr/selectableItemBackground"
     24     android:paddingEnd="16dp"
     25     android:paddingStart="16dp"
     26     app:columnCount="5"
     27     app:columnOrderPreserved="false"
     28     app:rowCount="4">
     29 
     30     <include
     31         layout="@layout/alarm_time_summary"
     32         android:layout_width="wrap_content"
     33         android:layout_height="wrap_content"
     34         android:layout_marginTop="@dimen/alarm_clock_vertical_margin"
     35         app:layout_column="0"
     36         app:layout_gravity="center_vertical"
     37         app:layout_row="0" />
     38 
     39     <android.support.v7.widget.SwitchCompat
     40         android:id="@+id/onoff"
     41         android:layout_width="wrap_content"
     42         android:layout_height="wrap_content"
     43         android:layout_marginTop="@dimen/alarm_clock_vertical_margin"
     44         android:minHeight="@dimen/touch_target_min_size"
     45         android:minWidth="@dimen/touch_target_min_size"
     46         android:theme="@style/ThemeOverlay.Control.Accent"
     47         app:layout_column="3"
     48         app:layout_columnSpan="2"
     49         app:layout_gravity="center_vertical"
     50         app:layout_row="0" />
     51 
     52     <com.android.deskclock.widget.EllipsizeLayout
     53         android:layout_width="0dp"
     54         android:layout_height="@dimen/touch_target_min_size"
     55         android:gravity="center_vertical"
     56         app:layout_column="0"
     57         app:layout_columnSpan="3"
     58         app:layout_gravity="fill_horizontal"
     59         app:layout_row="1">
     60 
     61         <TextView
     62             android:id="@+id/label"
     63             style="@style/body"
     64             android:layout_width="wrap_content"
     65             android:layout_height="wrap_content"
     66             android:ellipsize="end"
     67             android:maxLines="1"
     68             android:paddingEnd="@dimen/icon_margin"
     69             android:paddingStart="@dimen/icon_margin"
     70             android:textColor="@color/clock_gray" />
     71 
     72         <TextView
     73             android:id="@+id/days_of_week"
     74             style="@style/body"
     75             android:layout_width="wrap_content"
     76             android:layout_height="wrap_content"
     77             android:ellipsize="none"
     78             android:focusable="true"
     79             android:maxLines="1"
     80             android:paddingEnd="@dimen/icon_margin"
     81             android:paddingStart="@dimen/icon_margin" />
     82 
     83         <TextView
     84             android:id="@+id/upcoming_instance_label"
     85             style="@style/body"
     86             android:layout_width="wrap_content"
     87             android:layout_height="wrap_content"
     88             android:ellipsize="none"
     89             android:focusable="true"
     90             android:paddingEnd="@dimen/icon_margin"
     91             android:paddingStart="@dimen/icon_margin"
     92             android:singleLine="true" />
     93 
     94     </com.android.deskclock.widget.EllipsizeLayout>
     95 
     96     <include
     97         layout="@layout/preemptive_dismiss"
     98         android:layout_width="wrap_content"
     99         android:layout_height="@dimen/touch_target_min_size"
    100         app:layout_column="0"
    101         app:layout_columnSpan="2"
    102         app:layout_row="2" />
    103 
    104     <ImageButton
    105         android:id="@+id/arrow"
    106         android:layout_width="wrap_content"
    107         android:layout_height="@dimen/touch_target_min_size"
    108         android:background="?attr/selectableItemBackgroundBorderless"
    109         android:contentDescription="@string/expand_alarm"
    110         android:padding="@dimen/checkbox_start_padding"
    111         android:scaleType="center"
    112         app:layout_column="4"
    113         app:layout_gravity="bottom"
    114         app:layout_row="1"
    115         app:layout_rowSpan="2"
    116         app:srcCompat="@drawable/ic_caret_down" />
    117 
    118     <View
    119         android:id="@+id/hairline"
    120         android:layout_width="0dp"
    121         android:layout_height="@dimen/hairline_height"
    122         android:layout_marginEnd="@dimen/icon_margin"
    123         android:layout_marginStart="@dimen/icon_margin"
    124         android:background="@color/hairline"
    125         app:layout_column="0"
    126         app:layout_columnSpan="5"
    127         app:layout_gravity="fill_horizontal"
    128         app:layout_row="3" />
    129 
    130 </android.support.v7.widget.GridLayout>
    131