![](/img/trans.png)
[英]Android: White View shown when keyboard shown on Pie and Oreo Version
[英]Error with the keyboard on a WebView - when the keyboard is shown, it causes a white background
当键盘可见时,我必须找到带有底部视图的滚动父视图的解决方案。
KeyboardVisibilityEvent.setEventListener(
getActivity(),
new KeyboardVisibilityEventListener() {
@Override
public void onVisibilityChanged(boolean isOpen) {
// some code depending on keyboard status
if ((isOpen) &&(getUserVisibleHint())) {
if (nestVPageDetail != null) {
nestVPageDetail.post(new Runnable() {
@Override
public void run() {
if ((nestVPageDetail != null) && (rvContentArrayDetail != null)) {
nestVPageDetail.scrollTo(0,
rvContentArrayDetail.getBottom());
}
}
});
}
}
}
});
这是lib检查键盘:
implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.