From f39d65028092d55ef8eade401f1a813ba11e084e Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Wed, 14 Jan 2015 16:58:05 -0800 Subject: [PATCH] Make the DatePicker dialog fit on smaller screens in landscape mode Bug: 18933437 Change-Id: Id40351d52a7eab81e15e1f0120a9da961ef21d0a --- core/res/res/layout-land/date_picker_holo.xml | 6 ++++-- core/res/res/layout/date_picker_selected_date.xml | 12 ++++++------ core/res/res/values/dimens.xml | 5 +++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/core/res/res/layout-land/date_picker_holo.xml b/core/res/res/layout-land/date_picker_holo.xml index 9a9b8b0ec3808..991888c2daf53 100644 --- a/core/res/res/layout-land/date_picker_holo.xml +++ b/core/res/res/layout-land/date_picker_holo.xml @@ -18,12 +18,14 @@ android:layout_width="match_parent" android:layout_height="@dimen/datepicker_view_animator_height" android:gravity="center" - android:orientation="horizontal" > + android:orientation="horizontal" + android:minWidth="@dimen/datepicker_dialog_width" > + android:layout_height="match_parent" + android:layout_weight="1" /> diff --git a/core/res/res/layout/date_picker_selected_date.xml b/core/res/res/layout/date_picker_selected_date.xml index d212cb0f23b35..9becb817c12a7 100644 --- a/core/res/res/layout/date_picker_selected_date.xml +++ b/core/res/res/layout/date_picker_selected_date.xml @@ -20,22 +20,22 @@ android:layout_width="@dimen/datepicker_component_width" android:layout_height="wrap_content" android:gravity="center" - android:paddingBottom="8dp" android:orientation="vertical"> + android:importantForAccessibility="no" /> @@ -57,8 +57,8 @@ android:id="@+id/date_picker_day" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="-10dip" - android:layout_marginBottom="-10dip" + android:layout_marginTop="-23dp" + android:layout_marginBottom="-20dp" android:duplicateParentState="true" android:gravity="center" /> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index ae7698450e5dd..02fa128c550e5 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -385,12 +385,13 @@ 12sp 48dp 16dp - 244dp + 226dp 8dp 64dp 22dp - 270dp + 260dp + 520dp 88dp 24dp 24dp