Skip to content

Fix scrolling up beyond normal bound (issue #1574)

Steps to reproduce issue #1574 (closed)

  1. Launch the app.
  2. Visit Audio tab.
  3. Visit another tab (for example, More tab).
  4. Scroll up all the way to the top.

Expected result is:

MoreFragment_Normal

Actual result is:

MoreFragment_Error

(notice that the 2 buttons SETTINGS and ABOUT half disappeared)

I created a simple Android project to reproduce this excessively scrolled up behavior and I realized that this behavior comes from the CoordinatorLayout itself. Perhaps this is a bug of CoordinatorLayout, or perhaps this is just the way it works.

To solve this problem, I've tried various approaches and finally came up with this workaround: instead of toggling the visibility of TabLayout, we could toggle it's height between 0 and wrap_content.

I have verified that this approach works, both in the Emulator and in a physical phone.

Merge request reports

Loading