How to do something after user clicks on my EditText

后端 未结 6 1842
庸人自扰
庸人自扰 2020-11-30 03:01

I have an EditText that shows time. After user clicks the EditText I want to show a TimePickerDialog, so I set a View.OnClickLis

6条回答
  •  长情又很酷
    2020-11-30 03:22

    It sounds like you don't want the user to actually be able to type in the EditText. You just want them to be able to pick a time via a time picker. So why not just a button that pops up a TimePickerDialog? You could display the time that was picked in a TextView.

    Or you could just replace the EditText view with a TimePicker view (not a dialog, just a regular view).

提交回复
热议问题