如何在Android中获取TextView的首字母?

use*_*219 1 android textview

我还没有找到有关如何获取TextView?中值的第一个字母的文档。

Luc*_*fer 5

很容易,

String strTextview = textView.getText().toString();
strTextView = strTextView.substring(0,1);
Run Code Online (Sandbox Code Playgroud)

另外,您也可以尝试以下方式

char firstCharacter = textView.getText().toString().charAt(0);
Run Code Online (Sandbox Code Playgroud)