I have an EditText to enter the password and i set inputType as "textPassword". But when i run it in app or emulator the password is visible. Why it is showing password instead of dots?
<EditText
android:id="@+id/etPassword"
android:layout_width="match_parent"
android:inputType="textPassword"
android:layout_height="wrap_content"
android:hint="@string/Password"
android:layout_marginBottom="10dp"
android:maxLength="15"
android:background="@drawable/ss"/>
drawable file ss:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="10dp"/>
<padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp"/>
<solid android:color="#ffffffff"/>
<stroke android:width="1dp" android:color="#CCCCCC" />
Complete Layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:padding="10dp"
android:orientation="vertical"
android:layout_height="match_parent"
android:background="#ffffffff"
android:gravity="center_vertical" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/foodstall"
android:layout_gravity="center"
android:layout_marginBottom="10dp"/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
android:background="#ffffffff">
<EditText
android:id="@+id/etUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/Username"
android:maxLength="15"
android:background="@drawable/ss"
android:layout_marginBottom="10dp"/>
<EditText
android:id="@+id/etPassword"
android:layout_width="match_parent"
android:inputType="textPassword"
android:layout_height="wrap_content" android:hint="@string/Password"
android:layout_marginBottom="10dp"
android:maxLength="15"
android:background="@drawable/ss"
android:text="askdjhkashdjasdksakdkaskdhkashkdhkashdkjhakshdkjhaskhdkj"/>
<Button
android:id="@+id/bLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_activity_login"
android:background="@color/button"
android:textColor="#ffffffff"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/linearlayout"
android:background="@drawable/ss"
android:layout_marginTop="10dp">
<TextView
android:id="@+id/tvRegisterLink"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/Newuser"
android:gravity="center"
android:layout_weight="1"
android:textStyle="bold"/>
<TextView
android:id="@+id/fpass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/title_activity_forgotpass"
android:layout_weight="1"
android:gravity="center"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>