转载请标明:大飞_rflyee http://blog.youkuaiyun.com/rflyee/article/details/50810025
android:focusableInTouchMode="false"
editText.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
editText.setFocusableInTouchMode(true);
return false;
}
});
editText.setFocusable(false);
或者:
editText.setEnable(false);
或者:
editText.setInputType(InputType.TYPE_NULL);来禁止手机软键盘。 (xml中设置inputtype为none不行)
editText.setInputType(InputType.TYPE_CLASS_TEXT);来开启软键盘。
android:windowSoftInputMode="stateVisible"
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
android:cursorVisible="false"
android:focusableInTouchMode="true"
android:background="@drawable/bg_chat_keyboard_input_et"
437



被折叠的 条评论
为什么被折叠?



