我的应用程序中有我的datePicker,并且使用英语,该月的第一个字母为大写。当我将设备语言更改为Español时,它会变成小写字母。就像enero,febrero,marso ...等。我想将本月的首字母大写
datePicker.init(datePicker.getYear(), datePicker.getMonth(), datePicker.getDayOfMonth() + 1, null);
最佳答案
尝试这个
String str=datePicker.getMonth().tostring;
str = str.toLowerCase();
str = Character.toString(str.charAt(0)).toUpperCase()+str.substring(1);