[AC-1481] Ti.UI.createSlider fails to work on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-07-24T23:31:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Studio |
Labels | android, slider, ui |
Reporter | Geoffrey Hoffman |
Assignee | Mauro Parra-Miranda |
Created | 2014-07-11T03:28:39.000+0000 |
Updated | 2016-03-08T07:37:55.000+0000 |
Description
Titanium Studio 3.3.0.201407100905
Pasting the example here http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.UI.Slider
into a new single page app, I am unable do make a workable slider for any Android emulator. I'm testing using a couple of GenY ones.
I get the following errors; I don't know if it is related. Hope it helps.
[ERROR] : TitaniumModule: (KrollRuntimeThread) [33,33] Error occured while formatting string
[ERROR] : TitaniumModule: java.util.IllegalFormatConversionException: %f can't format java.lang.Integer arguments
[ERROR] : TitaniumModule: at java.util.Formatter.badArgumentType(Formatter.java:1489)
[ERROR] : TitaniumModule: at java.util.Formatter.transformFromFloat(Formatter.java:2038)
[ERROR] : TitaniumModule: at java.util.Formatter.transform(Formatter.java:1465)
[ERROR] : TitaniumModule: at java.util.Formatter.doFormat(Formatter.java:1081)
[ERROR] : TitaniumModule: at java.util.Formatter.format(Formatter.java:1042)
[ERROR] : TitaniumModule: at java.util.Formatter.format(Formatter.java:1011)
[ERROR] : TitaniumModule: at java.lang.String.format(String.java:1999)
[ERROR] : TitaniumModule: at java.lang.String.format(String.java:1973)
[ERROR] : TitaniumModule: at ti.modules.titanium.TitaniumModule.stringFormat(TitaniumModule.java:261)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:64)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:884)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1107)
[ERROR] : TitaniumModule: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:327)
[ERROR] : TitaniumModule: at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] : TitaniumModule: at android.os.Looper.loop(Looper.java:136)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[ERROR] : TitaniumModule: (KrollRuntimeThread) [1,34] Error occured while formatting string
[ERROR] : TitaniumModule: java.util.IllegalFormatConversionException: %f can't format java.lang.Integer arguments
[ERROR] : TitaniumModule: at java.util.Formatter.badArgumentType(Formatter.java:1489)
[ERROR] : TitaniumModule: at java.util.Formatter.transformFromFloat(Formatter.java:2038)
[ERROR] : TitaniumModule: at java.util.Formatter.transform(Formatter.java:1465)
[ERROR] : TitaniumModule: at java.util.Formatter.doFormat(Formatter.java:1081)
[ERROR] : TitaniumModule: at java.util.Formatter.format(Formatter.java:1042)
[ERROR] : TitaniumModule: at java.util.Formatter.format(Formatter.java:1011)
[ERROR] : TitaniumModule: at java.lang.String.format(String.java:1999)
[ERROR] : TitaniumModule: at java.lang.String.format(String.java:1973)
[ERROR] : TitaniumModule: at ti.modules.titanium.TitaniumModule.stringFormat(TitaniumModule.java:261)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:64)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:884)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1107)
[ERROR] : TitaniumModule: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:327)
[ERROR] : TitaniumModule: at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] : TitaniumModule: at android.os.Looper.loop(Looper.java:136)
[ERROR] : TitaniumModule: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[WARN] : EGL_genymotion: eglSurfaceAttrib not implemented
[ERROR] : OpenGLRenderer: Getting MAX_TEXTURE_SIZE from GradienCache
[ERROR] : OpenGLRenderer: MAX_TEXTURE_SIZE: 16384
[ERROR] : OpenGLRenderer: Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
[ERROR] : OpenGLRenderer: MAX_TEXTURE_SIZE: 16384
The behavior I was seeing was that the slider was drawn on the screen, but it was not selectable or draggable. Actually, I think you can close this bug. I think I was working in ApplicationWindow.js. When I place the code below into FirstView.js - It works. //FirstView Component Constructor function FirstView() { //create object instance, a parasitic subclass of Observable var self = Ti.UI.createView(); //label using localization-ready strings from
Closed per user comment.