-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Cannot scroll ScrollView inside bottom sheet #8
Comments
@tommag21 it is normal. N scrollview wont support it. You need to use a NestedScrollView using a class like this: class NestedScrollView extends ScrollView {
createNativeView() {
if (__ANDROID__) {
return new androidx.core.widget.NestedScrollView(this._context);
}
return super.createNativeView();
}
} |
Thanks. Do you have a sample or a demo I can refer to? I don't know how do I have to initialise the component correctly in a NativeScript-Vue app. I tried registering the component on my main like this: Vue.registerElement("NestedScrollView", () => NestedScrollView, {}); But when I try to scroll the bottom sheet (with matching StackTrace
|
I managed to override the methods Stack trace
|
@tommag21 this is your error |
The ScrollView contains a At the moment I'm short on time and cannot continue debugging the nested scrollview, maybe I will continue in the future. |
@tommag21 it's now the future, and if you're still investigating, maybe my experience can help :) After talking to the super helpful guys (like @farfromrefug) on the NativeScript discord, this is what worked for me: Create the native class CustomNestedScrollView
Create the NestedScrollView to use in the markup
Create the markup Notice the
Now you can scroll in the list behind the bottomSheet, you can drag the bottomSheet up and down, AND you can scroll inside the bottomSheet. |
@fpaaske thank you! I ended up disabling the bottom sheet drag, I will try your solution asap. |
Gave it a try finally! That's what I did on NativeScript-Vue: CustomNestedScrollView.ts
app.ts
|
As a side note, I had to set
|
Very nice @tommag21 👍 |
On Android I cannot scroll a ScrollView placed inside a bottom sheet. A RadListView works fine.
I have updated the test repo to test this bug: https://github.com/tommag21/bottomsheet-test
The text was updated successfully, but these errors were encountered: