<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2008 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" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <!-- I can't use a normal checkbox here for a couple reasons: 1. The checkbox button resources cannot contain layouts so I have to use 2 views for the clock and the bar. 2. The normal checkbox has a really messed up layout. Using the button attribute produces a left-aligned image that has some kind of minimum height. If the bar is a checkbox, it is too tall and is clipped on the right. --> <com.android.deskclock.DontPressWithParentLayout android:id="@+id/indicator" style="@style/alarm_list_left_column" android:background="@drawable/clock_selector" android:gravity="center" android:orientation="vertical"> <CheckBox android:id="@+id/clock_onoff" android:focusable="false" android:clickable="false" android:background="@drawable/indicator_clock_onoff" android:duplicateParentState="true" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center" android:button="@null" /> <ImageView android:id="@+id/bar_onoff" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:paddingTop="4dip" android:src="@drawable/ic_indicator_off" /> </com.android.deskclock.DontPressWithParentLayout> <ImageView android:src="@drawable/divider_vertical_dark" android:background="?android:attr/windowBackground" android:layout_width="wrap_content" android:layout_height="match_parent" android:paddingTop="4dip" android:paddingBottom="4dip" android:scaleType="fitXY" android:gravity="fill_vertical" /> <!-- A layout that displays the time. Shows time, am/pm (if 12-hour), and an optional line below, used for day/days of week --> <com.android.deskclock.DigitalClock android:id="@+id/digitalClock" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_vertical" android:layout_weight="1" android:orientation="vertical" android:paddingLeft="16dip" android:paddingRight="16dip"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:baselineAligned="true"> <TextView android:id="@+id/timeDisplay" android:includeFontPadding="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingRight="6dip" android:textSize="28sp" android:textColor="?android:attr/textColorPrimary"/> <TextView android:id="@+id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textStyle="bold" android:textColor="?android:attr/textColorPrimary"/> <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="8dip" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorTertiary" android:textStyle="bold" android:gravity="right" android:singleLine="true"/> </LinearLayout> <TextView android:id="@+id/daysOfWeek" android:includeFontPadding="false" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorSecondary"/> </com.android.deskclock.DigitalClock> </LinearLayout>