fix(native): no overscroll stretch on Android

The UI asks for no overscroll effect with overscroll-behavior: none on html,
and Chrome honours it. The Android WebView draws the stretch on its root
scroller natively, though, and it scales the whole view, so the top bar and
the bottom dock were pulled along with the page. Found in the emulator.
This commit is contained in:
Maurice
2026-09-24 13:36:27 +02:00
parent 71913eb6e2
commit b1479d939a
@@ -1,6 +1,7 @@
package com.liketrek.trek;
import android.os.Bundle;
import android.view.View;
import com.getcapacitor.BridgeActivity;
public class MainActivity extends BridgeActivity {
@@ -17,5 +18,9 @@ public class MainActivity extends BridgeActivity {
config = TrekServerStore.configFor(this, server);
}
super.onCreate(savedInstanceState);
// The UI asks for no overscroll effect (overscroll-behavior: none on html)
// and Chrome honours that, but the WebView draws the stretch on its root
// scroller natively. It scales the whole view, top bar and bottom dock included.
if (bridge != null) bridge.getWebView().setOverScrollMode(View.OVER_SCROLL_NEVER);
}
}