[ALOY-751] Android: some Style properties are not removed using $.removeClass

GitHub Issuen/a
Resolution Date2013-07-18T18:57:33.000+0000
Affected Version/sAlloy 1.2.0
Fix Version/s2013 Sprint 15
ComponentsRuntime, Styling
ReporterFederico Casali
AssigneeTony Lukasavage


Problem description

Using Dynamic Styling, not all styles properties seems to be correctly removed on Android when using $.removeClass unless they have a value and is different from null

Steps to reproduce

1. Run https://github.com/appcelerator/alloy/tree/master/test/apps/advanced/dynamic_styling on Android emulator or device 2. Check the 'Add/Remove Classes' example. Result: class styles are correctly added to 'test label 1', however when removing them, the 'backgroundColor' and 'borderRadius' properties from the '.redbg' class are still applied ('color' property, also defined in the .redbg class, is correctly removed) On iOS it works as expected. 3. Modify the '.medium' class included in 'classes.tss', changing backgroundColor value from null to something else and adding a borderRadius value different from null ex:
'.medium': {
	font: {
		fontSize: '24dp',
		fontWeight: 'bold'
	backgroundColor: 'orange',
	height: null,
	width: null
Result: in this case it works as expected - when removing the class, backgroundColor is back to 'orange' value and borderRadius is back to '0'. Note that height and weight values behave correctly also if set to null.


  1. Tony Lukasavage 2013-07-18 I cannot reproduce. I think you probably pulled a version of Alloy while I was in the process of resolving ALOY-717. Try your same exact steps as listed and you should see that it behaves as expected on both Android and iOS. Re-open the ticket if you still encounter the issue, otherwise please confirm it as closed.

JSON Source