diff options
author | Filip GruszczyĆski <gruszczy@google.com> | 2014-03-03 09:09:51 -0800 |
---|---|---|
committer | Filip GruszczyĆski <gruszczy@google.com> | 2014-03-03 16:53:08 -0800 |
commit | 66425bd855109ad5c2fcacadf92faf899117dd7e (patch) | |
tree | 96d1a913fc6a4758bfe3228c3a529f50c7aadb2b /core/res | |
parent | e3a6a7b4693e6efd29f973c8cfe91f5778f847f4 (diff) | |
download | frameworks_base-66425bd855109ad5c2fcacadf92faf899117dd7e.zip frameworks_base-66425bd855109ad5c2fcacadf92faf899117dd7e.tar.gz frameworks_base-66425bd855109ad5c2fcacadf92faf899117dd7e.tar.bz2 |
NumberPicker style for wearable devices.
Change-Id: Ib9194fdd951f4486aa833c080d8f7ab661d34a48
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/res/layout/number_picker_with_selector_wheel_micro.xml | 31 | ||||
-rw-r--r-- | core/res/res/values/styles_micro.xml | 11 | ||||
-rw-r--r-- | core/res/res/values/themes_micro.xml | 14 |
3 files changed, 54 insertions, 2 deletions
diff --git a/core/res/res/layout/number_picker_with_selector_wheel_micro.xml b/core/res/res/layout/number_picker_with_selector_wheel_micro.xml new file mode 100644 index 0000000..a1c0921 --- /dev/null +++ b/core/res/res/layout/number_picker_with_selector_wheel_micro.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2012, 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"> + + <view class="android.widget.NumberPicker$CustomEditText" + android:textAppearance="?android:attr/textAppearanceLarge" + android:id="@+id/numberpicker_input" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:singleLine="true" + android:background="@null" /> + +</merge> diff --git a/core/res/res/values/styles_micro.xml b/core/res/res/values/styles_micro.xml index 2fd283e..b368b65 100644 --- a/core/res/res/values/styles_micro.xml +++ b/core/res/res/values/styles_micro.xml @@ -19,4 +19,15 @@ <style name="Widget.Micro.TextView"> <item name="android:fontFamily">sans-serif-condensed</item> </style> + + <style name="Widget.Micro.NumberPicker"> + <item name="android:internalLayout">@android:layout/number_picker_with_selector_wheel_micro</item> + <item name="android:solidColor">@android:color/transparent</item> + <item name="android:selectionDivider">@android:drawable/numberpicker_selection_divider</item> + <item name="android:selectionDividerHeight">0dip</item> + <item name="android:selectionDividersDistance">0dip</item> + <item name="android:internalMinWidth">64dip</item> + <item name="android:internalMaxHeight">180dip</item> + <item name="virtualButtonPressedDrawable">?android:attr/selectableItemBackground</item> + </style> </resources> diff --git a/core/res/res/values/themes_micro.xml b/core/res/res/values/themes_micro.xml index be5fa99..b174d22 100644 --- a/core/res/res/values/themes_micro.xml +++ b/core/res/res/values/themes_micro.xml @@ -14,14 +14,24 @@ limitations under the License. --> <resources> - <style name="Theme.Micro" parent="Theme.Holo" /> + <style name="Theme.Micro" parent="Theme.Holo"> + <item name="numberPickerStyle">@android:style/Widget.Micro.NumberPicker</item> + </style> - <style name="Theme.Micro.Light" parent="Theme.Holo.Light"/> + <style name="Theme.Micro.NoActionBar" parent="Theme.Holo.NoActionBar"> + <item name="textViewStyle">@android:style/Widget.Micro.TextView</item> + <item name="numberPickerStyle">@android:style/Widget.Micro.NumberPicker</item> + </style> + <style name="Theme.Micro.Light" parent="Theme.Holo.Light"> + <item name="numberPickerStyle">@android:style/Widget.Micro.NumberPicker</item> + </style> <style name="Theme.Micro.Light.NoActionBar" parent="Theme.Holo.Light.NoActionBar"> <item name="textViewStyle">@android:style/Widget.Micro.TextView</item> + <item name="numberPickerStyle">@android:style/Widget.Micro.NumberPicker</item> </style> <style name="Theme.Micro.Light.DarkActionBar" parent="Theme.Holo.Light.DarkActionBar"> <item name="textViewStyle">@android:style/Widget.Micro.TextView</item> + <item name="numberPickerStyle">@android:style/Widget.Micro.NumberPicker</item> </style> </resources> |