Android:将字符串的第一个字母转换为小写字母

我正在寻找一种方法将字符串的第一个字母转换为小写字母.我正在使用的代码从数组中提取随机字符串,在文本视图中显示字符串,然后使用它来显示图像.数组中的所有字符串的首字母大写,但存储在应用程序中的图像文件当然不能包含大写字母.
String source = "drawable/"
//monb is randomly selected from an array,not hardcoded as it is here
String monb = "Picture";

//I need code here that will take monb and convert it from "Picture" to "picture"

String uri = source + monb;
    int imageResource = getResources().getIdentifier(uri,null,getPackageName());
    ImageView imageView = (ImageView) findViewById(R.id.monpic);
    Drawable image = getResources().getDrawable(imageResource);
    imageView.setimageDrawable(image);

谢谢!

解决方法

if (monb.length() <= 1) {
        monb = monb.toLowerCase();
    } else {
        monb = monb.substring(0,1).toLowerCase() + monb.substring(1);
    }

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...