Pagination with Pixabay is a simple app that shows a list of cat images from pixabay. It used retrofit to GET
impages and display result in Paged
RecyclerView
.
Api Key was obtained from pixabay
- add
gradle.properties
into.gitignore
file - Place api key in
gradle.properties
file
API_KEY="your pixabay api key"
- Add following line in app level
build.gradle
file,
android {
...
defaultConfig {
...
buildConfigField("String", "API_KEY", API_KEY)
}
}
- Use API key within code using BuildConfig
val API_KEY :String = BuildConfig.API_KEY
MIT