I've a string with complete language name and I wanted to set first two characters of that language name to my text view. Like I've a language name AFRIKAANS and I only wanted to set AF on my text view. How can I do this
String string = "AFRIKAANS";
yourTextView.setText(string.substring(0, 2));