| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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.cn.daming.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.cn.daming.deskclock.DontPressWithParentLayout>
- <!-- note by wangxianming android:background="?android:attr/windowBackground" -->
- <ImageView
- android:src="@drawable/divider_vertical_dark"
- 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.cn.daming.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.cn.daming.deskclock.DigitalClock>
- </LinearLayout>
|