Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Android java 中,如何使 TimePicker 不可更改?就像使用 EditText 可编辑或启用一样。我正在制作一个应用程序,它显示预设时间,然后我不希望用户能够更改它,直到他们勾选一个复选框。谢谢!
如果 setEnabled(false) 不起作用,请尝试扩展 DatePicker 小部件,覆盖 onTouch 并从 DatePicker(或 DatePicker 子项)中移除焦点