[TIMOB-19803] Android: CardView should not have both borderRadius and cardCornerRadius
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2015-11-19T09:04:42.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | Release 5.1.2 |
Components | Android |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Ashraf Abu |
Created | 2015-10-27T12:12:36.000+0000 |
Updated | 2015-12-02T22:56:33.000+0000 |
Description
The CardView is documented to have both
borderRadius
and cardCornerRadius
. Both also work, be it with different result because cardCornerRadius does not use the default unit (TIMOB-19798).
Unless there is a valid reason to have both (which should then be clearly documented) I suggest that we only have borderRadius
for consistency within the SDK.
var win = Ti.UI.createWindow({
layout: 'vertical'
});
var card1 = Ti.UI.Android.createCardView({
top: 20,
left: 20,
right: 20,
contentPadding: 20,
cardCornerRadius: 20
});
card1.add(Ti.UI.createLabel({
text: 'cardCornerRadius',
color: '#000'
}));
win.add(card1);
var card2 = Ti.UI.Android.createCardView({
top: 20,
left: 20,
right: 20,
contentPadding: 20,
borderRadius: 20
});
card2.add(Ti.UI.createLabel({
text: 'borderRadius',
color: '#000'
}));
win.add(card2);
var card3 = Ti.UI.Android.createCardView({
top: 20,
left: 20,
right: 20,
contentPadding: 20,
borderRadius: 20,
cardCornerRadius: 20
});
card3.add(Ti.UI.createLabel({
text: 'cardCornerRadius + borderRadius',
color: '#000'
}));
win.add(card3);
win.open();
Attachments
File | Date | Size |
---|---|---|
android_20151027-130738.png | 2015-10-27T12:12:20.000+0000 | 61083 |
That valid reason to use
cardCornerRadius
might be that we now follow the [original API](https://developer.android.com/reference/android/support/v7/widget/CardView.html) exactly. I think that might be better indeed, but then we should make sure thatborderRadius
is not there in the API reference or document the difference (use cases).Closing as this is addressed through TIMOB-19802