Project: titanium
Issue TIMOB-19802: Android: CardView should use standard property names
The following sample shows that both {{backgroundColor}} and {{cardBackgroundColor}} work, but the one with {{backgroundColor}} doesn't show a border/corner radius. Because of TIMOB-19801 I cannot verify, but I guess when I would set both I would see a rectangle without radius behind one that has? Is there an actual use case to have both (working, if we resolve TIMOB-19801)? If so, then we need to document the difference. If not, then I'd say we rename {{cardBackgroundColor}} to {{backgroundColor}}. {code:javascript} var win = Ti.UI.createWindow({	layout: 'vertical' }); var card1 = Ti.UI.Android.createCardView({	top: 20,	left: 20,	right: 20,	contentPadding: 20,	cardBackgroundColor: '#F00' }); card1.add(Ti.UI.createLabel({	text: 'cardBackgroundColor',	color: '#000' })); win.add(card1); var card2 = Ti.UI.Android.createCardView({	top: 20,	left: 20,	right: 20,	contentPadding: 20,	backgroundColor: '#F00' }); card2.add(Ti.UI.createLabel({	text: 'backgroundColor',	color: '#000' })); win.add(card2); win.open(); {code} *UPDATE:* I'm not convinced deviating from standard properties like [backgroundColor|https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.View-property-backgroundColor], [borderRadius|https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.View-property-borderRadius], [elevation|https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.View-property-elevation] and [*Padding|https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.TextField-property-paddingLeft]. * *Pro:* Easier to translate what you read in the [Android reference|https://developer.android.com/reference/android/support/v7/widget/CardView.html] to your Titanium app. * *Con:* Titanium developers are used to our naming conventions throughout what is after all a cross-platform SDK, even for platform-specific components. Given my experience that most Titanium developers do not read the target platform references but rely on our docs and - lazy as developers are - the predictability of our API I think we should: * Remove the {{card}} prefix from the CardView specific properties. * Rename {{(card)CornerRadius}} to {{borderRadius}}. * Remove the {{content}} prefix from the {{contentPadding*}} properties.
Story points: 3