开发了这么久,一直都没发现,在Button上设置的小写字母,竟然会全都被转成了大写字母。
解决:在Button的xml里添加android:textAllCaps=“false” 属性。
完整代码:
<Button
android:id="@+id/btn_login_getcheck"
style="?android:attr/borderlessButtonStyle"
android:layout_width="130dp"
android:layout_height="@dimen/dp_50"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/shape_circle_e4e4e4"
android:text="获取验证码"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="parent"
android:textSize="@dimen/sp_15"
app:layout_constraintTop_toBottomOf="@+id/et_login_phonenum" />
记录一下~避免小坑困扰~