Paging3: Testing

Note This is a four-part series covering pagination. Here are the links: Paging3: Introduction Paging3: Character module Paging3: App module Paging3: Testing <—- You are here Introduction Now that you’ve implemented Paging3, it’s essential to pair it with a robust testing strategy. This involves testing data loading components (PagingSource) to ensure they work as expected, as well as testing the pager flow passed to the UI to verify it passes the correct states to the UI as expected....

December 25, 2023 · 11 min

Paging3: App module

Note This is a four-part series covering pagination. Here are the links: Paging3: Introduction Paging3: Character module Paging3: App module <—- You are here Paging3: Testing Setup This is our main app module and most of it is very basic. This module also contains our viewmodel and activitiy which we’ll be focusing on. Our build.gradle.kts setup is pretty straightforward: plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) } android { namespace = "dev.kadirkid.pagingtest" defaultConfig { applicationId = "dev....

December 25, 2023 · 4 min

Paging3: Character module

Note This is a four-part series covering pagination. Here are the links: Paging3: Introduction Paging3: Character module <—- You are here Paging3: App module Paging3: Testing Setup This module is an android-library module and contains all the data required for fetching and playing with the character-related data, which includes: Api Data models PagingSource PagingSource’s factory Here is the build.gradle.kts setup: plugins { alias(libs.plugins.android.library) alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.kapt) alias(libs.plugins.kotlin.serialization) alias(libs.plugins.anvil) alias(libs.plugins.ksp) } android.namespace = "dev....

December 21, 2023 · 5 min

Paging3: Introduction

Note This is a four-part series covering pagination. Here are the links: Paging3: Introduction <—- You are here Paging3: Character module Paging3: App module Paging3: Testing What is Paging3? Android Paging3 is a Library provided by the Android Jetpack components that helps you load and display data from large datasets efficiently. It’s designed to handle the challenges of loading data in chunks or pages, such as handling network latency, managing data in memory, and providing a smooth user experience....

December 21, 2023 · 2 min