worstkiller / jetpack_paging3 Goto Github PK
View Code? Open in Web Editor NEWAndroid sample code for new Jetpack Paging3 Library
Android sample code for new Jetpack Paging3 Library
Hi,
When trying your app with the RoomDB page, if user changes the orientation of the device, then list state is not maintained and sometimes also causes the crash with the following exception:
2020-10-22 21:48:36.678 11743-11743/com.vikas.paging3 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.vikas.paging3, PID: 11743
java.io.InvalidObjectException: Invalid state, key should not be null
at com.vikas.paging3.data.DoggoMediator.getKeyPageData(DoggoMediator.kt:77)
at com.vikas.paging3.data.DoggoMediator$getKeyPageData$1.invokeSuspend(Unknown Source:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:238)
at android.app.ActivityThread.main(ActivityThread.java:7798)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
Could you please check and show how we can support orientation changes to save & restore the list position using Paging3 lib?
How to add, update and remove item to PagingDataAdapter or how is it possible to implement this when working with pagination?
Steps to reproduce:
Run the app again and navigate to room tab -> works
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.