1. Download our Official Android App: Forums for Android!

PopupWindow overlapping textView

Discussion in 'Android Development' started by TheOni, Jul 11, 2018.

  1. TheOni

    TheOni Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Jul 11, 2018

    Jul 11, 2018
    1
    0
    5
    I'm linking a PopupWindow to a TextView placed inside a ScrollView but when the view automatically scrolls to show the virtual keyboard the PopupWindow completely overlap the text box. If I manually scroll the view with the keyboard shown the PopupWindow moves automatically to the right place.

    My actual code is the following:

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

    Is there a way to avoid the overlap?
     

    Advertisement

Share This Page

Loading...