美文网首页
解决自定义WebView软键盘无法弹出的bug

解决自定义WebView软键盘无法弹出的bug

作者: WotYang | 来源:发表于2018-12-19 09:45 被阅读0次

错误构造方法:

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

正确构造方法:

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

出现这个bug的原因是因为style为0

相关文章

网友评论

      本文标题:解决自定义WebView软键盘无法弹出的bug

      本文链接:https://www.haomeiwen.com/subject/phydkqtx.html