问题
I have a problem with a custom PopupWindow
associated with a TextView
with the method setSuggestionPopup
.
When I click in the TextView
and my layout scrolls up so that the TextView
is not covered by the virtual keyboard my custom popup doesn't scroll and it covers the TextView
.
Is there a way to anchor it to the TextView
so that they are both scrolled as if they were a single object?
I associate the PopupWindow
to TextView
like that:
popupBinding = PasswordPopupBinding.inflate(LayoutInflater.from(getContext()));
View suggestionView = popupBinding.getRoot();
PopupWindow suggestionPopup = new PopupWindow();
suggestionPopup.setContentView(suggestionView);
binding.passwordTextView.setSuggestionPopup(suggestionPopup);
来源:https://stackoverflow.com/questions/50743867/anchor-suggestionpopup-to-textview