Android numeric password field

后端 未结 8 1645
春和景丽
春和景丽 2020-12-05 00:15

I have an EditText field which needs to be a numeric password field. Everything works OK in portrait mode; not in landscape. When the user selects the EditText field, the UI

8条回答
  •  伪装坚强ぢ
    2020-12-05 00:34

    Try with this:

    EditText input = (EditText) findViewById(R.id.input);
    input.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
    

    More info HERE

提交回复
热议问题