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 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:dc="http://schemas.android.com/apk/res-auto" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent" 22 android:background="@color/black" 23 android:orientation="vertical"> 24 25 <!-- Extra layout to let the clock float in the window --> 26 <LinearLayout 27 android:id="@+id/main_clock" 28 android:layout_width="wrap_content" 29 android:layout_height="wrap_content" 30 android:layout_marginBottom="@dimen/screensaver_margin" 31 android:layout_marginEnd="@dimen/screensaver_margin" 32 android:layout_marginStart="@dimen/screensaver_margin" 33 android:layout_marginTop="@dimen/time_margin_top" 34 android:orientation="vertical"> 35 36 <TextClock 37 android:id="@+id/digital_clock" 38 style="@style/big_thin" 39 android:layout_width="wrap_content" 40 android:layout_height="wrap_content" 41 android:layout_gravity="center" 42 android:layout_marginBottom="@dimen/bottom_text_spacing_digital" 43 android:ellipsize="none" 44 android:format12Hour="@string/main_clock_12_hours_format" 45 android:format24Hour="@string/clock_24_hours_format" 46 android:gravity="center" 47 android:singleLine="true" 48 android:textColor="@color/clock_white" 49 android:textSize="@dimen/main_clock_font_size" /> 50 51 <com.android.deskclock.AnalogClock 52 android:id="@+id/analog_clock" 53 android:layout_width="wrap_content" 54 android:layout_height="wrap_content" 55 android:layout_gravity="center_horizontal" 56 android:layout_marginBottom="@dimen/bottom_text_spacing_analog" 57 android:dial="@drawable/clock_analog_dial_mipmap" 58 android:hand_hour="@drawable/clock_analog_hour_mipmap" 59 android:hand_minute="@drawable/clock_analog_minute_mipmap" 60 dc:jewelColor="@color/clock_white" 61 dc:jewelOffset="23dp" 62 dc:jewelRadius="5dp" /> 63 64 <LinearLayout 65 android:layout_width="wrap_content" 66 android:layout_height="wrap_content" 67 android:layout_gravity="center" 68 android:gravity="center"> 69 70 <TextView 71 android:id="@+id/date" 72 style="@style/label" 73 android:layout_width="wrap_content" 74 android:layout_height="wrap_content" 75 android:gravity="center" 76 android:textColor="@color/clock_white" 77 android:textSize="@dimen/bottom_text_size" 78 android:visibility="gone" /> 79 80 <TextView 81 android:id="@+id/nextAlarm" 82 style="@style/label" 83 android:layout_width="wrap_content" 84 android:layout_height="wrap_content" 85 android:layout_marginLeft="8dip" 86 android:layout_marginStart="8dip" 87 android:drawablePadding="2dip" 88 android:drawableStart="@drawable/ic_alarm_small" 89 android:gravity="center" 90 android:textColor="@color/clock_gray" 91 android:textSize="@dimen/bottom_text_size" 92 android:visibility="gone" /> 93 </LinearLayout> 94 </LinearLayout> 95 </LinearLayout> 96