Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 文本视图中文本的自动大写_Android_Xml_Textview - Fatal编程技术网

Android 文本视图中文本的自动大写

Android 文本视图中文本的自动大写,android,xml,textview,Android,Xml,Textview,如何将android中TextView中的所有文本大写 android:textAllCaps=“true” 适用于ICS及以上版本,但不适用于较低版本。我希望用xml进行大写,而不是通过编程方式使用toUpper()。使用android:inputType=“textCapCharacters”使用android:inputType=“textCapCharacters”请参阅inputType是EditText的属性而不是TextView。请参阅inputType是EditText的属性而不

如何将
android
TextView
中的所有文本大写

android:textAllCaps=“true”


适用于
ICS
及以上版本,但不适用于较低版本。我希望用xml进行
大写
,而不是通过编程方式使用
toUpper()

使用
android:inputType=“textCapCharacters”
使用
android:inputType=“textCapCharacters”

请参阅inputType是EditText的属性而不是TextView。请参阅inputType是EditText的属性而不是TextView。inputType不适用于TextView。它只适用于编辑文本。我特别希望文本视图中的文本大写。那么为什么不以大写形式传递文本呢?我从游标中获取文本,必须在代码中的任何地方添加函数toUpper()。textAllCaps在android 4.1上运行良好。所以我想知道以前版本的xml等价物。inputType不适用于TextView。它只适用于编辑文本。我特别希望文本视图中的文本大写。那么为什么不以大写形式传递文本呢?我从游标中获取文本,必须在代码中的任何地方添加函数toUpper()。textAllCaps在android 4.1上运行良好。所以我想知道以前版本的xml等价物。