I'm looking for a ViewPager like <https://google.g...
# compose-desktop
s
I'm looking for a ViewPager like https://google.github.io/accompanist/pager/ that also works for Compose for Desktop in a KMP project. Can someone recommend a solution?
1
As far as I can see they tried to build it for KMP, but are "not there yet": https://github.com/google/accompanist/issues/546
m
I ported the non-android specific accompaniest libraries to Compose desktop for my usage, feel free to use them https://github.com/Syer10/accompanist
👍 1
🙏 1
s
I will give it a try 🙂
@Mitchell Syer I use the ViewPager now in my project. Works good. Thank you for your effort. 🙂 Did you think about contributing your changes back to the main project? Looks like they could need help.
👍 1
This works for both Android and Desktop without any issues.
m
Most of my changes were just the build files and libraries used. I just ported them to Compose Desktop, not KMP, which is what they want for desktop support. I could try rewriting it for KMP, but I dont have that much time currently.
s
I don't know what they mean by "KMP", because I just copied the three files that implement the ViewPager into my "commonMain" module and now it works for Android & Desktop...