How to make the text lowercase for MaterialButton
? textAllCaps="false"
is not working for me. I am using com.google.android.material:material:1.0.0-alpha3
<com.google.android.material.button.MaterialButton
android:id="@+id/material_button"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_label_enabled"/>
There is a property in <Button> that is android:textAllCaps="false" that make characters in which you want in your own Small and caps. By Default its became True so write this code and make textAllCaps=false then you can write text on button in small and Caps letter as per your requirement.
Material Buttons are slightly different to traditional Android buttons in that they do not include additional insets (4dp on the left/right) and have more letter-spacing, different default colors and other attributes that improve legibility and affordance amongst other components.
Add icons to the start, center, or end of this button using the app:icon , app:iconPadding , app:iconTint , app:iconTintMode and app:iconGravity attributes. If a start-aligned icon is added to this button, please use a style like one of the ". Icon" styles specified in the default MaterialButton styles.
You need to set both textAllCaps
and android:textAllCaps
to false to disable all capitalize setting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With