Hyperion-Android icon indicating copy to clipboard operation
Hyperion-Android copied to clipboard

Two drawer scrolling issues

Open tir38 opened this issue 7 years ago • 2 comments

~~1. hyperion version number isn't scrolling; other list items are scrolling underneath it~~ [fixed in #130] 2. scrolling extends under bottom home/back/recent nav bar

device-2018-06-23-141535

screen shot 2018-06-23 at 2 13 39 pm

tir38 avatar Jun 23 '18 18:06 tir38

I believe fixing this may also address #99. The issue here being that the drawer layout and friends don't respect window insets at the moment. Unfortunately, it's not as easy as adding android:fitsSystemWindows="true" to the layout, because most ViewGroups will consume the insets which we don't want (this may negatively affect the correctness of the host application). We'll probably need to leverage ViewCompat.setOnApplyWindowInsetsListener here, read the insets, set our own padding, and return them unconsumed.

Kritarie avatar Jun 25 '18 00:06 Kritarie

I dug into this a bit. Regarding problem 2: the bottom system inset is already consumed by the DecorView before we get access to it in HyperionPluginView:

ViewCompat.setOnApplyWindowInsetsListener(this, new android.support.v4.view.OnApplyWindowInsetsListener() {
    @Override
    public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
        setPadding(
                insets.getSystemWindowInsetLeft(),
                insets.getSystemWindowInsetTop(),
                insets.getSystemWindowInsetRight(),
                // bottom is already zero
                insets.getSystemWindowInsetBottom());
        return insets;

I couldn't get to the root problem before I had to move on to other things.

I do have a fix for the first problem. I'll put up a PR.

tir38 avatar Jun 25 '18 16:06 tir38