Juky-App / SquircleView

SquircleView is a library which provides you with Squircle views to use for buttons, views, etc.
Other
105 stars 5 forks source link

SquircleButton: set textAllCaps=false doesn't work #10

Closed eriksquare closed 3 years ago

eriksquare commented 3 years ago

Thanks for the amazing library! I have this issue that textAllCaps false doesn't actually work (is also visible in layout preview), the only way i've found to make it work is by setting a button.transformationMethod = null on the fragment, but would be better to have a way to have a global style with that attribute.

Nielssg commented 3 years ago

@eriksquare thanks for the issue and the compliment 😄

From what I can tell, it has to do with my implementation of the button. In order to have the text appear to be text from a button, I load the following text appearance by default: android.R.attr.textAppearanceButton. This unfortunately overrides any property set in the xml manually. I'll have to find a nice way around it, you could temporarily circumvent this by using a SquircleConstraintLayout and manually using an TextView inside of it (though it of course isn't preferred)

eriksquare commented 3 years ago

yeah this also prevent from setting different fonts using textAppearance and other styling stuff

Nielssg commented 3 years ago

Yes indeed, currently have an implementation (testing at the moment) which will set the required text appearance attributes if there is no override. I'll expect an patch to be out this evening 😄

Nielssg commented 3 years ago

Thanks for the report @eriksquare, it has been solved in version 0.4.2 which will be online at maven central in a couple of hours I presume 😄