更新时间:2022-06-16 06:37:05
在你的 EditText
上设置属性 android:focusable="false"
和 android:enabled="真"
.并将 OnClickListener
设置为该 EditText
.单击该 Edittext 会触发 onClick()
方法,但无法对其进行编辑.我刚试过.
On your EditText
set attributes android:focusable="false"
and android:enabled="true"
.
And set OnClickListener
to that EditText
. The click on that Edittext triggers the onClick()
method but it can't be edited. I just tried it.