[TIMOB-1729] Android: Setting zIndex fails on Views
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-11-05T13:38:12.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | Sprint 2011-37, Release 1.8.0 |
Components | Android |
Labels | n/a |
Reporter | Don Thorp |
Assignee | Natalie Huynh |
Created | 2011-04-15T03:00:42.000+0000 |
Updated | 2011-11-05T13:38:12.000+0000 |
Description
When zIndex is passed as a creation argument it works. Runtime does not. It looks like there might be a setZIndex method that's in the way.
In the latest build, changing the zindex at runtime actually causes an exception.
Associated HD ticket
http://appc.me/c/APP-764736Environment
{noformat} Product: Mobile Titanium SDK: Mobile 1.7.1 Platform OS: Android Platform OS Version: 2.2 {noformat}Console Log output
{panel} 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): (main) [241,422] Sending event: exception on thread: main msg:java.lang.NumberFormatException: unable to parse '1.0' as integer; Titanium 1.7.1,2011/06/13 15:34,4a68cc... 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): java.lang.NumberFormatException: unable to parse '1.0' as integer 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at java.lang.Integer.parse(Integer.java:433) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at java.lang.Integer.parseInt(Integer.java:422) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at java.lang.Integer.parseInt(Integer.java:382) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:253) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at org.appcelerator.titanium.view.TiUIView.propertyChanged(TiUIView.java:325) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:487) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:272) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at android.os.Handler.dispatchMessage(Handler.java:95) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at android.os.Looper.loop(Looper.java:123) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at java.lang.reflect.Method.invokeNative(Native Method) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at java.lang.reflect.Method.invoke(Method.java:521) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 07-23 08:18:01.658: ERROR/TiUncaughtHandler(1143): at dalvik.system.NativeStart.main(Native Method) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): FATAL EXCEPTION: main 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): java.lang.NumberFormatException: unable to parse '1.0' as integer 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at java.lang.Integer.parse(Integer.java:433) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at java.lang.Integer.parseInt(Integer.java:422) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at java.lang.Integer.parseInt(Integer.java:382) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:253) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at org.appcelerator.titanium.view.TiUIView.propertyChanged(TiUIView.java:325) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:487) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:272) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at android.os.Handler.dispatchMessage(Handler.java:95) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at android.os.Looper.loop(Looper.java:123) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at android.app.ActivityThread.main(ActivityThread.java:4627) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at java.lang.reflect.Method.invokeNative(Native Method) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at java.lang.reflect.Method.invoke(Method.java:521) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 07-23 08:18:01.918: ERROR/AndroidRuntime(1143): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) {panel}Workaround
Set an index value to establish the position relative to other sibling views within an event listener.Test code for dynamic zIndex changes
Tested with 1.8.0.v20110914092150 on Nexus S 2.3.4 Hero 2.1 Gslate 3.1
Fixing labels.