Reputation: 3061
I have a dialog box that i have created. this is the code for edittext box. but i want the text to be like password textbox. what change can i do?
android:inputType="textPassword"
final EditText input = new EditText(Setting.this);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT);
input.setLayoutParams(lp);
Upvotes: 0
Views: 1394
Reputation: 144
May be this
EditText dt = new EditText(this);
dt.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
Set inputType for an EditText?
Upvotes: 1
Reputation: 189
input.setInputType(InputType.TYPE_CLASS_TEXT | inputType.TYPE_TEXT_VARIATION_PASSWORD);
Upvotes: 0