In my app, for particular EditText
, I want first letter of the sentence to be Capital/Upper case. So I used android:inputType="textCapSentences"
.
The strange thing is this works on emulator, but doesn't work on emulator. I even tried android:capitalize="sentences"
even though it's deprecated, but it didn't work.
Related facts:
Emulator OS: 4.0.3
Real device OS: 4.0.4
App minSdk version: 2.3.3
I also tried with emulator with 4.2.2 OS but the result was same.
Can anyone suggest anything I can try? Any help appreciated.
Have you tried setting this programmatically?
EditText input = new EditText(this);
input.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);
Moreover, you have to be aware that "Input method editors (IMEs) do not have to honor all the settings in android:inputType. Those are suggestions or requests that you are making, not demands."( android:inputType="textCapSentences" Not Always Honored )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.