Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19822] Android: Picker spinner columns and its items are not sized/positioned correctly on Android 5.0 and higher

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-05-11T22:58:07.000+0000
Affected Version/sRelease 5.0.2
Fix Version/sRelease 7.3.0
ComponentsAndroid
Labelsandroid, picker, spinner
ReporterRodolfo Perottoni
AssigneeJoshua Quick
Created2015-10-07T14:43:53.000+0000
Updated2018-06-25T22:43:45.000+0000

Description

Steps to reproduce: * Create a view with a
 <Picker useSpinner="true"/> 
* Create a PickerColumn with 9 PickerRows and add it into the Picker. * It will look strange (see attached image). The number is not in the middle of the selection indicator. !Screen Shot 2015-10-07 at 11.29.08.png|thumbnail! * Try setting your PickerColumn height or width to double its size: it gets worse. The selection indicator always shows 2 rows below what is currently selected. In the image below the first 3 picker columns are selecting the first row (0), but what is actually being shown is that the 2 is selected. The 4th column selecting the last row (9), but what is being shown is that white space. !Screen Shot 2015-10-07 at 11.31.06.png|thumbnail! What i've tried: * Tested on Ti SDK 4.1.0GA, 5.0.1GA and 5.0.3.v20151002003129 * Tested on both android 5.1.0 (simulator) and 4.4.2 (real device) * Setting each picker row's height doesn't change anything

Attachments

FileDateSize
Screen Shot 2015-10-07 at 11.29.08.png2015-10-07T14:32:54.000+000015321
Screen Shot 2015-10-07 at 11.31.06.png2015-10-07T14:34:44.000+000044203
SpinnerTest.js2018-05-09T22:39:00.000+00001537
SpinnerTest-bad.png2018-05-09T22:39:07.000+0000337135
SpinnerTest-good.png2018-05-09T22:50:04.000+0000321420

Comments

  1. Aminul Islam 2015-10-28

    I have tested this issue. As described, the number is not in the middle of the selection indicator in picker and the another things is when I set custom height or width, it gets worse . This is a valid issue. *Test Environment*
       Appcelerator Studio, build: 5.1.0.201508271018
       Nexus 7 (android 5.1)
       Operating System
         Name                        = Mac OS X
         Version                     = 10.10.5
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 8589934592
       Node.js
         Node.js Version             = 0.10.37
         npm Version                 = 1.4.28
       Titanium CLI
         CLI Version                 = 5.0.5
       Titanium SDK
         SDK Version                 = 5.0.2.GA
         SDK Path                    = /Users/Raju/Library/Application Support/Titanium/mobilesdk/osx/4.1.1.GA
         Target Platform             = android
       Command
       
    Thanks
  2. Marian Kucharcik 2017-08-01

    Hi guys, any news on this? Or is there any other way to create multi collumn picker? Thank you
  3. Joshua Quick 2017-11-09

    *Note:* We can only reproduce this issue on Android 5.0 (aka: API Level 21) and newer OS versions... and only when selecting the row index 0 or 1.
  4. Maggie Chen 2017-12-12

    https://github.com/appcelerator/titanium_mobile/pull/9674
  5. Lokesh Choudhary 2018-05-11

    FR Passed. Waiting for merge to be enabled.
  6. Lokesh Choudhary 2018-05-11

    PR Merged.
  7. Samir Mohammed 2018-06-25

    Closing Ticket: Verified fix in SDK Version 7.3.0.v20180613110103 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/9674

JSON Source