Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14567] Android: Setting "color" to null on Label causes color to be transparent

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-08-12T05:55:47.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2013 Sprint 16, 2013 Sprint 16 API, Release 3.2.0
ComponentsAndroid
Labelsmodule_label, parity, qe-testadded
ReporterTony Lukasavage
AssigneeBiju pm
Created2013-07-16T20:35:54.000+0000
Updated2013-10-10T10:32:15.000+0000

Description

problem

When setting the *color* property of a Ti.UI.Label to *null* it makes the color transparent on Android. On iOS and Mobileweb the color is returned to the default black (#000). While the default color can be determined by the underlying platform, it should be a visible color to give parity across the platforms. In others words, setting *color* to null should either make the color transparent on all platforms, or a solid color on all platforms.

expected

When I set the the *color* property of a Ti.UI.Label to *null*, I expect the behavior, whether it makes the Label transparent or a solid color, to be the same on all platforms.

test case

app.js

var win = Ti.UI.createWindow({
	backgroundColor: '#fff',
	modal: false,
	exitOnClose: true
});
var label = Ti.UI.createLabel({
	text: 'just a test label'
});
label.addEventListener('click', function(e) {
	label.color = null;
});

win.add(label);
win.open();

Comments

  1. Biju pm 2013-07-26

    PR:- https://github.com/appcelerator/titanium_mobile/pull/4498
  2. Priya Agarwal 2013-10-10

    Verified the fix with: Appc-Studio: 3.2.0.201310100354 Sdk:3.2.0.v20131009134844 alloy:1.2.2 npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.0.3 Device:Google Nexus 7(v4.3),ipodTouch1(v7.0) Xcode: 5 Setting "color" to null on Label remains by default as black solid color on both the platform iOS and Android.

JSON Source