[英]How to hide the soft keyboard on EditText
我也想在EditText上隱藏軟鍵盤,即使在單擊時也是如此。 我的意思是說我的活動中不應有可見的軟鍵盤,因為我有自己的鍵盤來輸入數據。 請幫助我...謝謝...
editText_input_field.setOnTouchListener(otl);
private OnTouchListener otl = new OnTouchListener() {
public boolean onTouch (View v, MotionEvent event) {
return true; // the listener has consumed the event
}
};
像這樣將EditText小部件的inputType設置為null
,
editTExt.setInputType(TYPE_NULL);
將以下代碼粘貼到xml文件中的edittext標簽下
android:textIsSelectable="true"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.