>  기사  >  Java  >  Android WebView가 소프트 키보드를 팝업할 수 없는 이유와 해결 방법

Android WebView가 소프트 키보드를 팝업할 수 없는 이유와 해결 방법

高洛峰
高洛峰원래의
2017-01-07 11:44:192486검색

requestFoucs()가 유효하지 않습니다.

requestFoucsFromTouch()가 유효하지 않습니다.

webview.setTouchListener가 잘못되었습니다.

문제:

WebView를 상속할 때 구성 방법에 주의하세요.

public CommonWebView(Context context) {
super(context);
init();
}
public CommonWebView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public CommonWebView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}

defStyleAttr이 통과할 수 없습니다. 0, 다음과 같이 틀린 글씨:

public CommonWebView(Context context) {
this(context,null,0);
}
public CommonWebView(Context context, AttributeSet attrs) {
this(context, attrs,0);
}
public CommonWebView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}

위 내용은 Android WebView가 소프트 키보드를 팝업할 수 없는 이유와 편집기에서 소개한 솔루션입니다. 모든 사람에게 도움이 되기를 바랍니다. 질문이 있는 경우 메시지를 남겨주시면 편집자가 제때에 답변해 드리겠습니다. 또한 PHP 중국어 웹사이트를 지원해 주신 모든 분들께 감사드립니다!

Android WebView가 소프트 키보드를 팝업할 수 없는 이유와 해결 방법에 대한 자세한 관련 기사를 보려면 PHP 중국어 웹사이트에 주목하세요!


성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.