Wednesday 17 July 2013

Android Avoid Showing Last Charecter Typed in PassWord Filed.

Hello Frieds,
By this post we are going to learn about how to Avoid Showing Last Charecter Typed in PassWord Filed.

Use the following code to achieve this.

 To show text as password we should use the following attribute in EditText : android:inputType="textPassword"

To avoid showing last text typed should use the following attribute in Edittext :

android:password="true"

So Completed Edit text will be look like this.

<EditText android:textSize="18.0sp" android:id="@+id/mypassword" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="10.0dip" android:layout_marginRight="10.0dip" android:password="true" android:inputType="textPassword" />

Hope this helps. Happy Coding.

No comments: