1
    <EditText
    android:id="@+id/password"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="textPassword"
    android:hint="Password"
    />

This is the code I have in my xml file, the line android:inputType="textPassword" from my understanding is supposed to make the text entered in the field appear hidden. When run on and android device the text is not hidden.

Adarsh Yadav
  • 3,752
  • 3
  • 24
  • 46

1 Answers1

0

Try this :

    <EditText 
android:layout_height="wrap_content"
android:gravity="center" 
android:password="true" 
android:layout_width="match_parent"
android:id="@+id/password" 
android:hint="password" 
android:maxLines="1">
</EditText>
Shishupal Shakya
  • 1,632
  • 2
  • 18
  • 41