3

My style for my TextInputLayout

<style name="inputText" parent="Widget.Design.TextInputLayout">
    <item name="android:textColor">@color/neon_blue</item>
    <item name="android:inputType">textVisiblePassword|textCapCharacters</item>
    <item name="android:textSize">20sp</item>
</style>

has inputType

textVisiblePassword|textCapCharacters

I have textCapCharacters to make text all caps. I have textVisiblePassword to prevent key board from underlining text as it is typed.

textVisiblePassword overrides textCapCharacters because passwords are case sensitive.

How can I prevent underlining of typed text and also have all caps?

edit

textNoSuggestions does not remove underline from typing which is why I added textVisiblePassword but textVisiblePassword appears to override textCapCharacters because (I think) that passwords are enforced to be case sensitive.

the_prole
  • 8,275
  • 16
  • 78
  • 163

2 Answers2

0

To prevent key board from underlining text, you have to use textNoSuggestions. Use your style like this -

<style name="inputText" parent="Widget.Design.TextInputLayout">
     <item name="android:textColor">@color/neon_blue</item>
    <item name="android:inputType">textVisiblePassword|textCapCharacters|textNoSuggestions</item>
    <item name="android:textSize">20sp</item>
</style>
Anupam
  • 2,845
  • 2
  • 16
  • 30
0

One thing you can do is..Follow the attachhed link to allow all characters in Uppercase programatically. How to force EditText to accept only specific alphanumerical characters? and give inputType textVisiblePassword

Prachi Singh
  • 564
  • 3
  • 8