Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15515] Android: Add support for shadowOffset, shadowColor and shadowRadius on Label & Button

GitHub Issuen/a
TypeSub-task
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-22T23:34:57.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsAndroid
Labelsn/a
ReporterVishal Duggal
AssigneePing Wang
Created2013-10-17T21:08:36.000+0000
Updated2017-03-16T21:01:39.000+0000

Description

Comments

  1. Ping Wang 2013-10-19

    PR: https://github.com/appcelerator/titanium_mobile/pull/4811 Test case:
       var win = Ti.UI.createWindow({
       	backgroundColor : 'white',
       	exitOnClose : true,
       	fullscreen : false,
       	layout : 'vertical',
       	title : 'Label Demo'
       });
       
       var label = Ti.UI.createLabel({
       	color : '#900',
       	font : {
       		fontSize : 48
       	},
       	text : 'A simple label',
       	textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER,
       	top : 30,
       	width : 500,
       	height : 200
       });
       
       var button = Ti.UI.createButton({
       	color : 'blue',
       	font : {
       		fontSize : 48
       	},
       	width : 500,
       	height : 200,
       	title : 'A simple button',
       });
       
       var i=0;
       
       var change = Ti.UI.createButton({
       	top: 50,
       	title: "change the shadow of the label and button"
       });
       
       change.addEventListener("click", function(){
       	if (i%2 == 0) {
       		label.shadowColor = "#aaa";
       		label.shadowOffset = {x: 10, y: 10};
       		label.shadowRadius = 3;
       		button.shadowColor = "#aaa";
       		button.shadowOffset = {x: 10, y: 10};
       		button.shadowRadius = 3;
       	} else {
       		label.shadowColor = "yellow";
       		label.shadowOffset = {x: -20, y: -20};
       		label.shadowRadius = 10;
       		button.shadowColor = "yellow";
       		button.shadowOffset = {x: -20, y: -20};
       		button.shadowRadius = 10;
       	}
       	i++;
       });
       
       win.add(label);
       win.add(button);
       win.add(change);
       win.open(); 
       
    For FR, run the above test case and click the "change ..." button. Should see the shadow in the label and button.
  2. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source