问题
As you can see from here, mdButton will set your text with uppercase letters. What if I want to make lowercase?
回答1:
Write your own class using css text-transform such as,
.tolowercase {
text-transform: lowercase;
}
.tocapitalize {
text-transform: capitalize;
}
And apply it to the input/button.
If you want htis behaviour throughout the system override the .md-button class in your css,
.md-button {
text-transform: capitalize !important;/*For Lower case use lowercase*/
}
回答2:
in XML:
android:textAllCaps="false"
Programmatically:
mbutton.setAllCaps(false);
回答3:
Neat. You can also add the bootstrap class text-lowercase to your button to override the defaults. To use capitalization in your button (each word to start with a capital letter), ensure that you write your button name in lowercase, then add the bootstrap class text-capitalize to your button. Easier that way.
回答4:
Remove the text-transform from md-button in CSS:
md-button {
text-transform: none
}
来源:https://stackoverflow.com/questions/33728424/how-do-i-set-mdbutton-text-to-lowercase