massivemadness / Fragula

🧛 Fragula is a swipe-to-dismiss extension for navigation component library for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi Fragula Bug With viewpager2

professorDeveloper opened this issue · comments

hello, if there is viewpager2 in my fragment, scrolling is not working, how to fix it, please help

Hi @professorDeveloper, this is nested scrolling problem. You can disable fragula viewpager using SwipeController:

val swipeController = findSwipeController()

// onViewCreated
swipeController.setScrollingEnabled(false)

// onDestroyView
swipeController.setScrollingEnabled(true)

or something similar

hello thank you very much for the reply now ,I will try and write you an answer, please stay online

@massivemadness

bro , I did what you said, and this error occurred

image

I'm not sure why this happens, you can try to upgrade JDK version to 17 in your module

compileOptions {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

It didn't work. Please help me. I couldn't find a good swipe back library for the fragment other than yours. Please help me with this error. @massivemadness

Can you tell me which JDK version are you using? You can check it in terminal $ java -version
or in Settings > Build, Execution, Deployment > Build Tools > Gradle
Снимок экрана 2023-08-06 в 18 00 18

Hmm it should work I guess. Maybe you set different version in android studio settings? Check the screenshot

You're using JDK 11 for this project, try to change Gradle JDK to 17

this worked thanks bro ❤️ 🔥

You're using JDK 11 for this project, try to change Gradle JDK to 17

I'll downgrade it to JDK 11 in the next version for convenience