0

I need to show all the letters in uppercase while the user is writing. I'm using this: android:inputType="textCapCharacters"

But, when I push shift it turns to lowercase. I need something permanent.

2 Answers2

0

In code you can try this:

searchView.setInputType(InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS);

Hope it helps.

Andrea Ebano
  • 563
  • 1
  • 4
  • 16
0

just add android:textAllCaps="true" in the xml

example:

<android.support.v7.internal.widget.CompatTextView
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:textAllCaps="true"/>
cristian franco
  • 266
  • 2
  • 13