PopupWindow重叠的textView

时间:2018-07-11 15:58:10

标签: android textview android-scrollview android-popupwindow

我将PopupWindow链接到放置在ScrollView内的TextView,但是当视图自动滚动以显示虚拟键盘时,PopupWindow会与文本框完全重叠。如果我使用显示的键盘手动滚动视图,则PopupWindow会自动移到正确的位置。

我的实际代码如下:

    popupBinding = PasswordPopupBinding.inflate(LayoutInflater.from(getContext()));
    View suggestionView = popupBinding.getRoot();
    PopupWindow suggestionPopup = new PopupWindow();
    suggestionPopup.setContentView(suggestionView);
    binding.passwordTextView.setSuggestionPopup(suggestionPopup);

有办法避免重叠吗?

0 个答案:

没有答案