Home | History | Annotate | Download | only in layout
      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 <FrameLayout
     18     xmlns:android="http://schemas.android.com/apk/res/android"
     19     android:layout_width="match_parent"
     20     android:layout_height="match_parent" >
     21     <!-- This layout sits as an include in world_clock_list_item, but the LinearLayout needs
     22          to have wrap_content so the separator view can have its width set to the width of the
     23          clock, which means we need the extra parent FrameLayout. -->
     24     <LinearLayout
     25         android:layout_width="wrap_content"
     26         android:layout_height="match_parent"
     27         android:paddingTop="@dimen/medium_space_top"
     28         android:orientation="vertical"
     29         android:layout_gravity="center_horizontal"
     30         android:gravity="center_horizontal" >
     31         <FrameLayout
     32             android:layout_width="wrap_content"
     33             android:layout_height="match_parent">
     34 
     35             <TextClock
     36                 android:id="@+id/digital_clock"
     37                 android:format12Hour="@string/world_clock_12_hours_format"
     38                 android:format24Hour="@string/clock_24_hours_format"
     39                 android:layout_width="wrap_content"
     40                 android:layout_height="wrap_content"
     41                 style="@style/medium_light"
     42                 android:textSize="@dimen/digital_world_clock_text_size"
     43                 android:textColor="@color/clock_white"
     44                 android:baselineAligned="true"
     45                 android:layout_gravity="center"
     46                 android:gravity="center" />
     47             <com.android.deskclock.AnalogClock
     48                 android:id="@+id/analog_clock"
     49                 android:gravity="center"
     50                 android:layout_width="@dimen/world_clock_analog_size"
     51                 android:layout_height="@dimen/world_clock_analog_size"
     52                 android:layout_gravity="center_horizontal"
     53                 android:dial="@drawable/clock_analog_dial_mipmap"
     54                 android:hand_hour="@drawable/clock_analog_hour_mipmap"
     55                 android:hand_minute="@drawable/clock_analog_minute_mipmap"
     56                 android:layout_marginBottom="@dimen/bottom_text_spacing_analog_small"/>
     57         </FrameLayout>
     58         <com.android.deskclock.widget.EllipsizeLayout
     59             android:id="@+id/city_name_layout"
     60             android:layout_height="wrap_content"
     61             android:layout_width="wrap_content"
     62             android:layout_marginLeft="@dimen/label_margin_small"
     63             android:layout_marginStart="@dimen/label_margin_small"
     64             android:paddingBottom="@dimen/medium_space_bottom"
     65             android:gravity="center"
     66             >
     67             <include layout="@layout/world_clock_label"/>
     68         </com.android.deskclock.widget.EllipsizeLayout>
     69 
     70         <View
     71             android:id="@+id/separator"
     72             android:layout_height="1dp"
     73             android:layout_width="match_parent"
     74             android:background="#28ffffff" />
     75     </LinearLayout>
     76 </FrameLayout>