Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24630] Android: TableViewRow - shorthand hex notation for background color causes crash

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2017-06-08T08:10:59.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.2.0
ComponentsAndroid
Labelsn/a
ReporterYordan Banev
AssigneeYordan Banev
Created2017-04-26T08:44:06.000+0000
Updated2017-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)

Comments

  1. Yordan Banev 2017-04-26

    PR: https://github.com/appcelerator/titanium_mobile/pull/8995

JSON Source