[TIMOB-24630] Android: TableViewRow - shorthand hex notation for background color causes crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2017-06-08T08:10:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.2.0 |
Components | Android |
Labels | n/a |
Reporter | Yordan Banev |
Assignee | Yordan Banev |
Created | 2017-04-26T08:44:06.000+0000 |
Updated | 2017-06-08T08:11:22.000+0000 |
Description
*Problem*
Andorid TableViewRow does not support shorthand hex notation for color strings in the creation dictionary.
Result: No row in the table view
Expected: Row in the table view
Note: Other color formats work just fine
*Test case*
var window = Ti.UI.createWindow();
var tableView = Ti.UI.createTableView();
var tableViewRow = Ti.UI.createTableViewRow({backgroundColor:"#f00"});
tableView.setData([tableViewRow]);
window.add(tableView);
window.open();
*Logs*
E/KrollProxy: (KrollRuntimeThread) [6,6] Error creating proxy
java.lang.IllegalArgumentException: Unknown color
at android.graphics.Color.parseColor(Color.java:226)
at ti.modules.titanium.ui.TableViewRowProxy.handleCreationDict(TableViewRowProxy.java:82)
at org.appcelerator.kroll.KrollProxy.handleCreationArgs(KrollProxy.java:195)
at org.appcelerator.kroll.KrollProxy.setupProxy(KrollProxy.java:128)
at org.appcelerator.kroll.KrollProxy.createProxy(KrollProxy.java:136)
at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:196)
at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:319)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:148)
at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118)
PR: https://github.com/appcelerator/titanium_mobile/pull/8995