I am looking for a way to convert the first letter of a string to a lowercase letter. The code I'm using pulls a random string from an array, displays the string in a text representation, and then uses it to display the image. All lines in the array have their first letter, but the image files stored in the application cannot be capitalized, of course.
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);
Thanks!
cerealspiller
source share