android中EditText點擊右邊叉叉按鈕(或圖片)清除輸入框內的文字的實現

基本思路: 1.在Edittext右邊添加一個有着叉叉背景能的Button(或圖片); 2.根據Edittext的狀況進行判斷Button(或圖片)是否要顯示或隱藏.html 先看效果:java     佈局:android <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"app xmlns:tools
相關文章
相關標籤/搜索