Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15584] Android: Spinner picker does not layout correctly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-11-04T20:52:27.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 23, 2013 Sprint 23 API, Release 3.2.0
ComponentsAndroid
Labelskitchensink, qe-testadded, regression
ReporterPing Wang
AssigneePing Wang
Created2013-10-25T21:16:22.000+0000
Updated2014-04-22T10:12:21.000+0000

Description

This is a regression in master (3.2.0). 3.1.3.GA works fine. To reproduce: 1. KS->Controls->Picker->Android "useSpinner"-text. i) Expected behavior: show 3 spinners. Actual behavior: only show 1 spinner. See the attached screenshot for the latest master and 3.1.3.GA. ii) Click the button "Add 'Manny'" and then scroll the spinner. The app crashes. The log is
W/dalvikvm(16260): threadid=1: thread exiting with uncaught exception (group=0x40a3d1f8)
E/TiApplication(16260): (main) [32538,34141] Sending event: exception on thread: main msg:java.lang.IllegalArgumentException: Layout: -20 < 0; Titanium 3.2.0,2013/10/25 13:41,9b2cd09
E/TiApplication(16260): java.lang.IllegalArgumentException: Layout: -20 < 0
E/TiApplication(16260): 	at android.text.Layout.<init>(Layout.java:140)
E/TiApplication(16260): 	at android.text.StaticLayout.<init>(StaticLayout.java:104)
E/TiApplication(16260): 	at android.text.StaticLayout.<init>(StaticLayout.java:90)
E/TiApplication(16260): 	at kankan.wheel.widget.WheelView.createLayouts(WheelView.java:504)
E/TiApplication(16260): 	at kankan.wheel.widget.WheelView.onDraw(WheelView.java:564)
E/TiApplication(16260): 	at android.view.View.draw(View.java:10978)
E/TiApplication(16260): 	at android.view.View.getDisplayList(View.java:10417)
E/TiApplication(16260): 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
E/TiApplication(16260): 	at android.view.View.getDisplayList(View.java:10380)
E/TiApplication(16260): 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
E/TiApplication(16260): 	at android.view.View.getDisplayList(View.java:10380)
E/TiApplication(16260): 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
E/TiApplication(16260): 	at android.view.View.getDisplayList(View.java:10380)
E/TiApplication(16260): 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
E/TiApplication(16260): 	at android.view.View.getDisplayList(View.java:10380)
E/TiApplication(16260): 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
E/TiApplication(16260): 	at android.view.View.getDisplayList(View.java:10380)
E/TiApplication(16260): 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
E/TiApplication(16260): 	at android.view.View.getDisplayList(View.java:10380)
E/TiApplication(16260): 	at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:842)
E/TiApplication(16260): 	at android.view.ViewRootImpl.draw(ViewRootImpl.java:1910)
E/TiApplication(16260): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1634)
E/TiApplication(16260): 	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
E/TiApplication(16260): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/TiApplication(16260): 	at android.os.Looper.loop(Looper.java:137)
E/TiApplication(16260): 	at android.app.ActivityThread.main(ActivityThread.java:4424)
E/TiApplication(16260): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/TiApplication(16260): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/TiApplication(16260): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/TiApplication(16260): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/TiApplication(16260): 	at dalvik.system.NativeStart.main(Native Method)
2. KS->Controls->Picker->Android "useSpinner"-text2. Some spinners do not show. See the attached screenshot for the latest master and 3.1.3.GA.

Attachments

FileDateSize
3.1.3_useSpinner_text.png2013-10-25T21:17:11.000+0000487120
3.1.3_useSpinner_text2.png2013-10-25T21:17:11.000+0000575821
master_useSpinner_text.png2013-10-25T21:17:11.000+0000447030
master_useSpinner_text2.png2013-10-25T21:17:11.000+0000492762

Comments

  1. Ping Wang 2013-10-30

    The regression is caused by [PR#4300](https://github.com/appcelerator/titanium_mobile/pull/4300/). PR: https://github.com/appcelerator/titanium_mobile/pull/4883 For FR, please also test TIMOB-11567.
  2. Samuel Dowse 2013-11-06

    Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311060354 Titanium SDK, build: 3.2.0.v20131106120148 CLI: 3.2.0 Alloy: 1.3.0 Android Emulator: 2.3.3, 4.0.3, 4.4 Android Device: Sony Ericsson Xperia Arc S, 4.0.4 All three spinners appear on screen on device and simulators. Adding "Manny" to the screen and scrolling the spinner does not crash app either. Closing.

JSON Source