Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b80a3fca authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

Revamping of the NumberPicker widget for improved usablility.

1. Now if the widget is not interacted with shows a smaller selector
   wheel with the increment and decrement arrows at the top and bottom
   respectively.

2. Tapping an arrow button now animates the widget to the new value. i.e.
   rotates the selector whell to the next value.

3. Fixed a bug that double tapping on the input shows the IME but then
   after pressing an arrow button the IME is not hidden.

4. Fixed a bug that was exposed via late changes in the framework or the
   graphics and was manifested of the selector wheel not having fading
   edges.

bug:5251980
bug:5383502

Change-Id: I4a089dc69b07a3b28a514017cddf786cb9f4af16
parent 651e4667
Loading
Loading
Loading
Loading
+271 −130

File changed.

Preview size limit exceeded, changes collapsed.

+0 −4
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        style="?android:attr/numberPickerUpButtonStyle"
        android:paddingTop="22dip"
        android:paddingBottom="22dip"
        android:contentDescription="@string/number_picker_increment_button" />

    <EditText android:id="@+id/numberpicker_input"
@@ -36,8 +34,6 @@
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        style="?android:attr/numberPickerDownButtonStyle"
        android:paddingTop="22dip"
        android:paddingBottom="22dip"
        android:contentDescription="@string/number_picker_decrement_button" />

</merge>
+8 −4
Original line number Diff line number Diff line
@@ -524,10 +524,14 @@ please see styles_device_defaults.xml.

    <style name="Widget.ImageButton.NumberPickerUpButton">
        <item name="android:background">@android:drawable/numberpicker_up_btn</item>
        <item name="android:paddingTop">22dip</item>
        <item name="android:paddingBottom">22dip</item>
    </style>

    <style name="Widget.ImageButton.NumberPickerDownButton">
        <item name="android:background">@android:drawable/numberpicker_down_btn</item>
        <item name="android:paddingTop">22dip</item>
        <item name="android:paddingBottom">22dip</item>
    </style>

    <style name="Widget.EditText.NumberPickerInputText">
@@ -1651,15 +1655,15 @@ please see styles_device_defaults.xml.
    <style name="Widget.Holo.ImageButton.NumberPickerUpButton">
        <item name="android:background">@null</item>
        <item name="android:src">@android:drawable/numberpicker_up_btn_holo_dark</item>
        <item name="android:paddingTop">26dip</item>
        <item name="android:paddingBottom">26dip</item>
        <item name="android:paddingTop">16dip</item>
        <item name="android:paddingBottom">36dip</item>
    </style>

    <style name="Widget.Holo.ImageButton.NumberPickerDownButton">
        <item name="android:background">@null</item>
        <item name="android:src">@android:drawable/numberpicker_down_btn_holo_dark</item>
        <item name="android:paddingTop">26dip</item>
        <item name="android:paddingBottom">26dip</item>
        <item name="android:paddingTop">36dip</item>
        <item name="android:paddingBottom">16dip</item>
    </style>

    <style name="Widget.Holo.EditText.NumberPickerInputText">