diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2011-10-31 15:52:55 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2011-11-01 14:48:34 -0700 |
commit | ec1e06a00d26a783fb948e739ad8157c03e55302 (patch) | |
tree | 517c75471a4de5a41f5456437522577fd8d34777 /core/res/res/layout-sw600dp | |
parent | 2333a02e152616c4b982c149ea2a5c9e9615e274 (diff) | |
download | frameworks_base-ec1e06a00d26a783fb948e739ad8157c03e55302.zip frameworks_base-ec1e06a00d26a783fb948e739ad8157c03e55302.tar.gz frameworks_base-ec1e06a00d26a783fb948e739ad8157c03e55302.tar.bz2 |
Updating NumberPicker, TimePicker, DatePicker to fit different screen and font sizes.
1. Now the NumberPicker has minWidth/minHeight that is the lower bound
of the correspodning size for which the widget looks well enough to
be usable. There is also maxWidth/masHeight that is the upper bound
of the corresponding size for which the widget looks best. The picker
tries to greedily reach the max dimesions for which it looks best.
2. The NumberPicker was not taking care of the max width of the items
is shows numbers/strings mapped to numbers. Now if not explicitly
specified the widget computes the maxWidth at which it looks best
based on the content it shows.
3. Removed an unnecessary layout for number picker on tablets.
4. Updated the TimePicker/DatePicker to not hard-code width for the
number pickers it uses, rahter wrap the content.
bug:5417100
Change-Id: I432aa96185961e59a058a2565b15265ba7394818
Diffstat (limited to 'core/res/res/layout-sw600dp')
-rw-r--r-- | core/res/res/layout-sw600dp/date_picker_dialog.xml | 2 | ||||
-rw-r--r-- | core/res/res/layout-sw600dp/number_picker.xml | 39 |
2 files changed, 2 insertions, 39 deletions
diff --git a/core/res/res/layout-sw600dp/date_picker_dialog.xml b/core/res/res/layout-sw600dp/date_picker_dialog.xml index 004d52a..f9b247f 100644 --- a/core/res/res/layout-sw600dp/date_picker_dialog.xml +++ b/core/res/res/layout-sw600dp/date_picker_dialog.xml @@ -22,4 +22,6 @@ android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:spinnersShown="true" + android:calendarViewShown="true" /> diff --git a/core/res/res/layout-sw600dp/number_picker.xml b/core/res/res/layout-sw600dp/number_picker.xml deleted file mode 100644 index 807daf2..0000000 --- a/core/res/res/layout-sw600dp/number_picker.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -** -** Copyright 2008, 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. -*/ ---> - -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - - <ImageButton android:id="@+id/increment" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - style="?android:attr/numberPickerUpButtonStyle" - android:contentDescription="@string/number_picker_increment_button" /> - - <EditText android:id="@+id/numberpicker_input" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - style="?android:attr/numberPickerInputTextStyle" /> - - <ImageButton android:id="@+id/decrement" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - style="?android:attr/numberPickerDownButtonStyle" - android:contentDescription="@string/number_picker_decrement_button" /> - -</merge> |