編輯:關於Android編程
android:editable is deprecated: Use an <EditText> to make it editable
android:editable is deprecated: Use inputType instead
分析:關於EditText控件的read-only問題,即: 無法通過UI更改其中的內容, 但可以選定部分內容, 進行復制.在早期的sdk, EditText有Editable屬性, 現在這個屬性已經deprecated了.
解決方法:
其實只需一行代碼就能搞定et.setKeyListener(null);
注意, 這裡不是setOnKeyListener, 而是setKeyListener. 此方法是TextView的成員, 調用後的效果完全符合預期, 並且獲得焦點後不會彈出輸入法.
下面是官方文檔的解釋
Sets the key listener to be used with this TextView. This can be null to disallow user input. Note that this method has significant and subtle interactions with soft keyboards and other input method: see KeyListener.getContentType() for important details. Calling this method will replace the current content type of the text view with the content type returned by the key listener.
Be warned that if you want a TextView with a key listener or movement method not to be focusable, or if you want a TextView without a key listener or movement method to be focusable, you must call setFocusable again after calling this to get the focusability back the way you want it.
wifi相關的文件位置:WIFI Settings應用程序位於packages/apps/Settings/src/com/android/settings/wifi/J
一 、 測試環境講解:1.一台win7電腦2.安裝好sdk,在 sdk\platform-tools 目錄下,可以看到adb.exe 文件3.為了方便輸入,可以設置環境變
Android 手機無法連接mac解決辦法一般的android連接mac 很方便不用安裝驅動就可以啦,可是不知道為什麼二般情況下有的android手機(小米2,華為等)就
介紹 在谷歌的官網我們可以看到它是這樣介紹的:RecyclerView is a more advanced and flexible version of List