Activity with fragments does not resize when the keyboard opens

前端 未结 7 1558
挽巷
挽巷 2020-12-08 04:38

In my main activity there is a RelativeLayout that has 2 childs:

  • An ImageView which serves as the background
  • A LinearLa
7条回答
  •  时光说笑
    2020-12-08 05:33

    Turns out my problem was caused by a completely unexpected source.

    What happened is that I used a LinearLayout as the parent of my two fragment containers.
    Then, in my expanding animation I raised the bottom container to overlap the other one.

    I don't really know why but since LinearLayout is not supposed to hold overlapping children, switching to a RelativeLayout or a FrameLayout immediately solved the issue.

    Since this cause might not be apparent from the code I posted, I do want to apologize for the lack of information, and will credit the most detailed answer as the best one.

提交回复
热议问题