Subhan Ali
Subhan Ali

Reputation: 1430

Custom Edit text: InputType

I have created a custom EditText and trying to set its inputType to numberPassword but its still showing me digits.

What I tried:

  1. Add inputType in onDraw method of CustomEditText class.
  2. Setting transformation method.

But still not working.

Current State of my custom EditText: I am not setting inputType anywhere in the custom editText. I am only setting it in xml file just like below:

android:inputType="numberPassword"

Any help will be much appreciated regarding if there is any custom editText settings required in CustomEditText class.

Upvotes: 0

Views: 464

Answers (1)

Mohammad Sommakia
Mohammad Sommakia

Reputation: 1833

this work for me.

mEdit.setTransformationMethod(PasswordTransformationMethod.getInstance());

Upvotes: 2

Related Questions