4

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);
Nominalista
  • 4,632
  • 11
  • 43
  • 102
TheOni
  • 810
  • 9
  • 26

0 Answers0