問題:
In my application, I have an EditText that the user only has Read access not Write access.在我的應用程序中,我有一個 EditText,用戶只有讀訪問權限沒有寫訪問權限。
In code I set android:enabled="false"
.在代碼中我設置了android:enabled="false"
。
Although the background of EditText changed to dark, when I click on it the keyboard pops up and I can change the text.雖然 EditText 的背景變成了深色,但當我點擊它時,鍵盤會彈出,我可以更改文本。
What should I set to disable EditText?我應該設置什麼來禁用 EditText?
解決方案:
參考一: https://stackoom.com/question/I22l參考二: Disabling of EditText in Android