1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2009 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <!-- Special "screen saver mode" with just the time/date on black. --> 18 <LinearLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:dc="http://schemas.android.com/apk/res-auto" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent" 23 android:orientation="vertical" 24 android:background="#FF000000"> 25 26 <!-- Extra layout to let the clock float in the window --> 27 <LinearLayout 28 android:id="@+id/main_clock" 29 android:orientation="vertical" 30 android:layout_width="wrap_content" 31 android:layout_height="wrap_content" 32 android:layout_marginLeft="@dimen/screensaver_margin" 33 android:layout_marginStart="@dimen/screensaver_margin" 34 android:layout_marginRight="@dimen/screensaver_margin" 35 android:layout_marginEnd="@dimen/screensaver_margin" 36 android:layout_marginTop="@dimen/time_margin_top" 37 android:layout_marginBottom="@dimen/screensaver_margin"> 38 39 <TextClock 40 android:id="@+id/digital_clock" 41 android:format12Hour="@string/main_clock_12_hours_format" 42 android:format24Hour="@string/clock_24_hours_format" 43 android:layout_width="wrap_content" 44 android:layout_height="wrap_content" 45 android:singleLine="true" 46 android:gravity="center" 47 android:ellipsize="none" 48 android:layout_gravity="center" 49 android:layout_marginBottom="@dimen/bottom_text_spacing_digital" 50 style="@style/big_thin" 51 android:textSize="@dimen/digital_screensaver_clock_text_size" 52 android:textColor="@color/clock_white" /> 53 54 <com.android.deskclock.AnalogClock 55 android:id="@+id/analog_clock" 56 android:layout_width="wrap_content" 57 android:layout_height="wrap_content" 58 android:layout_gravity="center_horizontal" 59 dc:jewelRadius="5dp" 60 dc:jewelOffset="23dp" 61 dc:jewelColor="@color/clock_white" 62 android:dial="@drawable/clock_analog_dial_mipmap" 63 android:hand_hour="@drawable/clock_analog_hour_mipmap" 64 android:hand_minute="@drawable/clock_analog_minute_mipmap" 65 android:layout_marginBottom="@dimen/bottom_text_spacing_analog" /> 66 <LinearLayout 67 android:layout_width="wrap_content" 68 android:layout_height="wrap_content" 69 android:layout_gravity="center" 70 android:gravity="center" > 71 <TextView android:id="@+id/date" 72 android:layout_width="wrap_content" 73 android:layout_height="wrap_content" 74 android:textColor="@color/clock_white" 75 style="@style/label" 76 android:textSize="@dimen/bottom_text_size" 77 android:gravity="center" 78 android:visibility="gone" 79 /> 80 <TextView android:id="@+id/nextAlarm" 81 android:layout_width="wrap_content" 82 android:layout_height="wrap_content" 83 android:drawablePadding="2dip" 84 android:drawableLeft="@drawable/ic_alarm_small" 85 android:drawableStart="@drawable/ic_alarm_small" 86 android:textColor="@color/clock_gray" 87 style="@style/label" 88 android:textSize="@dimen/bottom_text_size" 89 android:layout_marginLeft="8dip" 90 android:layout_marginStart="8dip" 91 android:gravity="center" 92 android:visibility="gone" 93 /> 94 </LinearLayout> 95 </LinearLayout> 96 </LinearLayout> 97