[TIMOB-15515] Android: Add support for shadowOffset, shadowColor and shadowRadius on Label & Button
| GitHub Issue | n/a |
|---|---|
| Type | Sub-task |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-10-22T23:34:57.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Vishal Duggal |
| Assignee | Ping Wang |
| Created | 2013-10-17T21:08:36.000+0000 |
| Updated | 2017-03-16T21:01:39.000+0000 |
PR: https://github.com/appcelerator/titanium_mobile/pull/4811 Test case:
For FR, run the above test case and click the "change ..." button. Should see the shadow in the label and button.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();Closing ticket as fixed.