1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2012 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<!-- Lots of buttons = need scrolling -->
18<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
19    android:layout_width="match_parent"
20    android:layout_height="match_parent">
21
22    <LinearLayout
23        android:layout_width="wrap_content"
24        android:layout_height="wrap_content"
25        android:orientation="vertical">
26
27        <!-- Default formats -->
28        <TextClock
29            android:layout_width="wrap_content"
30            android:layout_height="wrap_content" />
31
32        <!-- Shows the date only -->
33        <TextClock
34            android:format12Hour="MMM dd, yyyy"
35            android:format24Hour="MMM dd, yyyy"
36
37            android:layout_width="wrap_content"
38            android:layout_height="wrap_content" />
39
40        <!-- Use styles -->
41        <TextClock
42            android:format12Hour="@string/styled_12_hour_clock"
43            android:format24Hour="@string/styled_24_hour_clock"
44
45            android:layout_width="wrap_content"
46            android:layout_height="wrap_content" />
47
48        <!-- Use styles -->
49        <TextClock
50            android:format12Hour="@string/styled_12_hour_clock2"
51            android:format24Hour="@string/styled_24_hour_clock2"
52
53            android:layout_width="wrap_content"
54            android:layout_height="wrap_content" />
55
56        <!-- Shows seconds -->
57        <TextClock
58            android:format12Hour="hh:mm:ss a"
59            android:format24Hour="HH:mm:ss"
60
61            android:textSize="20sp"
62            android:shadowColor="#7fffffff"
63            android:shadowRadius="3.0"
64
65            android:layout_width="wrap_content"
66            android:layout_height="wrap_content" />
67
68        <!-- Use a fixed time zone -->
69        <TextClock
70            android:format12Hour="'Time in Paris:' MMM dd, yyyy h:mma"
71            android:format24Hour="'Time in Paris:' MMM dd, yyyy HH:mm"
72            android:timeZone="Europe/Paris"
73
74            android:layout_width="wrap_content"
75            android:layout_height="wrap_content" />
76
77    </LinearLayout>
78
79</ScrollView>
80