Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.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:inputType,textCapCharacters后面的textCapWords不起作用_Android_Android Edittext_Input Filtering - Fatal编程技术网

android:inputType,textCapCharacters后面的textCapWords不起作用

android:inputType,textCapCharacters后面的textCapWords不起作用,android,android-edittext,input-filtering,Android,Android Edittext,Input Filtering,我有一个EditText,我先设置输入过滤器,我给textCapCharacters,当显示软键盘时,它的工作原理应该是所有输入都是大写的(仅限大写字母),然后我得到了另一个带有输入过滤器textCapWords的EditText,当显示软键盘时,字母仍然是大写的,并且第一个字符的输入仍然是大写的,就像它们得到了textCapCharacters的输入过滤器一样,甚至第二个字段也得到了textCapWords的属性。这就像textCapCharacters设置了一些特殊的标志,表示它不会被其他文

我有一个EditText,我先设置输入过滤器,我给textCapCharacters,当显示软键盘时,它的工作原理应该是所有输入都是大写的(仅限大写字母),然后我得到了另一个带有输入过滤器textCapWords的EditText,当显示软键盘时,字母仍然是大写的,并且第一个字符的输入仍然是大写的,就像它们得到了textCapCharacters的输入过滤器一样,甚至第二个字段也得到了textCapWords的属性。这就像textCapCharacters设置了一些特殊的标志,表示它不会被其他文件清除

<EditText
    android:inputType="textCapCharacters" 
    />

<EditText
    android:inputType="textCapWords" 
    />


您使用的是什么模拟器和/或设备?你的目标是什么?这两个属性在我的手中都能正常工作。2.3 HTC Desire。你确定它们工作得很好吗?试着把注意力集中在第一个编辑文本上,然后键入ABC,它们都应该是大写的,而不用手动更改大写字母,然后转到第二个编辑文本“textCapWords”,开始键入John Smith,只有J和S应该是大写的。在我的例子中,它写道JOHN SMITH如果我想要小写字母,我必须手动更改大写字母。输入过滤器不进行任何更改。IME应在第二个字母中更改为小写字母。你试过模拟器吗?也许这是一个欲望bug?我试过HTC的另一个欲望,它很管用。我猜是我的设计出了问题也许我需要做一些数据工厂重置。我在运行2.1的HTC Hero上也有这个问题,但在运行4.0.4的HTC One X上没有。。。在给自己买One X之前,英雄是我的主要手机,我没有这个问题。在购买了One X之后,我在Hero上安装了一个新的ROM(基本上都有根目录和一个新内核),这就是我开始注意到这个问题的地方。可能与ROM/内核有关?我也使用默认的输入法。