Search code examples
androidandroid-layoutandroid-edittextandroid-5.0-lollipopandroid-xml

EditText input type textCapSentences not working on Lollipop


I have implemeted android:inputType="textAutoComplete|textCapSentences" in my xml code. When I run it on kitkat, textCapSentence works fine but when build is run on Lollipop device it does not work. Anybody knows how to solve it.


Solution

  • Hi this is because in lollipop if you have disabled Auto - Capitalization in keyboard settings then you can't enable it programmatically.

    here are the steps:-

    • Tap icon of ‘Settings’ on the Home screen of your Android Lollipop Device
    • At the ‘Settings’ screen, scroll down to the PERSONAL section and tap the ‘Language & input’ section.
    • At the ‘Language & input’ section, select your keyboard(which is marked as current keyboard).
    • Now tap the ‘Preferences’.
    • Tap to check the ‘Auto – Capitalization’ to enable it.
    • That’s all!