Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

why password text is getting like this in edit text in layout when I add android:inputType="textPassword"

I am trying to add password and confirm password in my register page . But when I am trying to use input type attribute for password and confirm password edit text instead of text I am getting dots .

<EditText
    android:layout_width="329dp"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentBottom="true"
    android:layout_marginEnd="44dp"
    android:layout_marginBottom="356dp"
    android:drawableStart="@drawable/ic_baseline_lock_24"
    android:drawablePadding="10dp"
    android:inputType="textPassword"
    android:text="PASSWORD"
    android:textColor="@color/White" />

<EditText
    android:layout_width="329dp"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentBottom="true"
    android:layout_marginEnd="44dp"
    android:layout_marginBottom="293dp"
    android:drawableStart="@drawable/ic_baseline_lock_24"
    android:drawablePadding="10dp"
    android:inputType="textPassword"
    android:text="CONFIRM PASSWORD"
    android:textColor="@color/White" />

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

If you want placeholder text, you should set it like this:

android:hint="PASSWORD"

instead of this:

android:text="PASSWORD"

Color of the hint text can be set like this:

android:textColorHint="white"

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading