Reputation: 2480
I have set attribute android:inputType
in EditText
android:inputType="textWebPassword"`
but it still shows the password I'm entering. Is there anything else(or instead) that should be done?
android:layout_width="match_parent"
android:layout_height="@dimen/button_height"
android:background="@drawable/background_edit"
android:ems="10"
android:gravity="center"
android:hint="@string/new_pass_hint"
android:inputType="textWebPassword"
android:textColor="@color/edit_text_text_color"
android:textColorHint="@color/edt_text_hint_color"
android:textSize="@dimen/button_text_size"
Upvotes: 2
Views: 1070
Reputation: 542
Try this please
Edttext.setTransformationMethod(PasswordTransformationMethod.getInstance());
then this in your layout
android:password="true"
Upvotes: 3
Reputation: 6834
it should be textPassword
look at this
<EditText
android:id="@+id/edtPassword"
android:layout_width="fill_parent"
android:layout_height="42dp"
android:layout_marginTop="16dp"
android:hint="Password"
android:inputType="textPassword"
android:padding="5dip"
android:singleLine="true"
android:textColor="#363435"
android:textSize="14sp" />
Upvotes: 0