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',
borderRadius:0,
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.
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.