multiplatform-paging icon indicating copy to clipboard operation
multiplatform-paging copied to clipboard

Not able to find paging functions in Android

Open ahmedsalemelzeiny opened this issue 4 years ago • 1 comments

Hi @kuuuurt , I'm using the version 4.7 but on Android I can only access pagingData and I can't access loadNext or loadPrevious or any other functions.

    cocoapods {

            framework {
                export("io.github.kuuuurt:multiplatform-paging:0.4.7")
            }
        }
          
    sourceSets {
        val commonMain by getting {
            dependencies {
                api("io.github.kuuuurt:multiplatform-paging:0.4.7")
            }
        }
        val androidMain by getting {
            dependencies {

            }
        }

        val iosX64Main by getting
        val iosArm64Main by getting
        val iosSimulatorArm64Main by getting

        val iosMain by creating {
            dependsOn(commonMain)
            iosX64Main.dependsOn(this)
            iosArm64Main.dependsOn(this)
            iosSimulatorArm64Main.dependsOn(this)
            dependencies {
            }
        }
    }

Any insights ?

ahmedsalemelzeiny avatar Feb 11 '22 01:02 ahmedsalemelzeiny

Hi @ahmedsalemelzeiny. The loadNext and loadPrevious functions are for iOS only. For Android, you have to use the paging library and hook it to your adapter. The RecyclerView would handle the calls for loading the next or previous items.

kuuuurt avatar Feb 11 '22 02:02 kuuuurt