0

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.

ahsanali274
  • 471
  • 2
  • 14
Subhan Ali
  • 1,370
  • 13
  • 17

1 Answers1

2

this work for me.

mEdit.setTransformationMethod(PasswordTransformationMethod.getInstance());
Mohammad Sommakia
  • 1,773
  • 3
  • 15
  • 48
  • 1
    hi Mohammad, Thanks for your answer. I also tried it but its not working for me. I also edited my question. – Subhan Ali Jun 14 '19 at 12:42