Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

setCornerRadius(float/int) misleading #71

Closed
zudov opened this issue Jan 8, 2015 · 1 comment
Closed

setCornerRadius(float/int) misleading #71

zudov opened this issue Jan 8, 2015 · 1 comment

Comments

@zudov
Copy link
Contributor

zudov commented Jan 8, 2015

Hi.

I was trying out the library, so I followed the README, but got a problem with corner radius:

riv.setCornerRadius(10)

Was failing with ResourceNotFound exception. From the source code I found out that setCornerRadius(float) and setCornerRadius(int) work very differently, and in order to directly set the corner radius one should make sure that the floatish method is used.

I find it very misleading, perhaps method setCornerRadius(int resId) should be changed to setCornerRadiusFromResource(int resId). I understand that it might not be possible at the moment because of backward compatibility, but please consider that change on major update.

I'll also submit a PR with the change in README's code example.

@vinc3m1
Copy link
Owner

vinc3m1 commented Jan 8, 2015

hm I see your point, there will probably be some minor breaking changes in the next build anyway, so this might not be bad. I'd probably name it setCornerRadiusRes though.

@vinc3m1 vinc3m1 closed this as completed in 0b7e261 Mar 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants