summaryrefslogtreecommitdiff
path: root/res/layout
diff options
context:
space:
mode:
authorJames Kung <kingkung@google.com>2013-04-08 17:40:49 -0700
committerJames Kung <kingkung@google.com>2013-04-08 17:44:33 -0700
commitddf949ac36c2a3b7a45918814d2c7bc57480aa9b (patch)
treebf1063e19d995c7c59cda1129bcf4fa6061ea1ae /res/layout
parent9901acdd8b577e8bac50971b917572e2aa646675 (diff)
downloaddatetimepicker-ddf949ac36c2a3b7a45918814d2c7bc57480aa9b.tar.gz
Layout for smaller devices e.g. Nexus S
Bug: Change-Id: I210fbab377f49ec58bfa811d76e3dc5172fede63
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/date_picker_header_view.xml25
-rw-r--r--res/layout/date_picker_selected_date.xml79
2 files changed, 56 insertions, 48 deletions
diff --git a/res/layout/date_picker_header_view.xml b/res/layout/date_picker_header_view.xml
new file mode 100644
index 0000000..a141616
--- /dev/null
+++ b/res/layout/date_picker_header_view.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/date_picker_header"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/date_picker_header_height"
+ android:background="@color/calendar_header"
+ android:gravity="center"
+ android:includeFontPadding="false"
+ android:textColor="@color/white"
+ android:textSize="@dimen/date_picker_header_text_size" />
diff --git a/res/layout/date_picker_selected_date.xml b/res/layout/date_picker_selected_date.xml
index c65fd20..3dda64c 100644
--- a/res/layout/date_picker_selected_date.xml
+++ b/res/layout/date_picker_selected_date.xml
@@ -14,73 +14,56 @@
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:id="@+id/day_picker_selected_date_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/selected_date_layout_height"
- android:layout_gravity="center"
android:background="@color/white"
+ android:gravity="center"
android:orientation="vertical" >
- <TextView
- android:id="@+id/date_picker_header"
- android:layout_width="match_parent"
- android:layout_height="@dimen/date_picker_header_height"
- android:background="@color/calendar_header"
- android:gravity="center"
- android:includeFontPadding="false"
- android:textColor="@color/white"
- android:textSize="@dimen/date_picker_header_text_size" />
-
<LinearLayout
+ android:id="@+id/date_picker_month_and_day"
android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_weight="1"
- android:gravity="center"
- android:orientation="vertical" >
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:clickable="true"
+ android:orientation="vertical"
+ android:textColor="@color/date_picker_selector" >
- <LinearLayout
- android:id="@+id/date_picker_month_and_day"
+ <TextView
+ android:id="@+id/date_picker_month"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:clickable="true"
- android:orientation="vertical"
- android:textColor="@color/date_picker_selector" >
-
- <TextView
- android:id="@+id/date_picker_month"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:duplicateParentState="true"
- android:gravity="center_horizontal|bottom"
- android:includeFontPadding="false"
- android:textColor="@color/date_picker_selector"
- android:textSize="@dimen/selected_date_month_size" />
-
- <TextView
- android:id="@+id/date_picker_day"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginBottom="-10dip"
- android:layout_marginTop="-10dip"
- android:duplicateParentState="true"
- android:gravity="center"
- android:includeFontPadding="false"
- android:textColor="@color/date_picker_selector"
- android:textSize="@dimen/selected_date_day_size" />
- </LinearLayout>
+ android:duplicateParentState="true"
+ android:gravity="center_horizontal|bottom"
+ android:includeFontPadding="false"
+ android:textColor="@color/date_picker_selector"
+ android:textSize="@dimen/selected_date_month_size" />
<TextView
- android:id="@+id/date_picker_year"
+ android:id="@+id/date_picker_day"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:gravity="center_horizontal|top"
+ android:layout_marginBottom="-10dip"
+ android:layout_marginTop="-10dip"
+ android:duplicateParentState="true"
+ android:gravity="center"
android:includeFontPadding="false"
android:textColor="@color/date_picker_selector"
- android:textSize="@dimen/selected_date_year_size" />
+ android:textSize="@dimen/selected_date_day_size" />
</LinearLayout>
+ <TextView
+ android:id="@+id/date_picker_year"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:gravity="center_horizontal|top"
+ android:includeFontPadding="false"
+ android:textColor="@color/date_picker_selector"
+ android:textSize="@dimen/selected_date_year_size" />
+
</LinearLayout> \ No newline at end of file