This project shows a sample workaround of how to perfectly load images from a paged api into android app using search query along with caching into local database for offline usage. This app uses PIXABAY photo search API as an online photo library. Below you can find a stack of technologies that have been used to develop this application. All features that the app currently have are also listed below along with the future improvement targets. To build and run the project please follow the guidelines below, because you can get errors due to the different configurations of Android Studio.
- First
clone
the repository or download the.zip
file of the repository and extract it. - Then delete the
.idea
hidden file from theroot
directory of the cloned project to configure the project with your environment. - Since this project uses
jdk 17
, So, as a next step you have to select thejdk 17
from project configuration. To do that, please follow the guidelines below:- Open
Settings
fromAndroid Studio
-> Click & expandBuild, Execution, Deployment
-> Click & expandBuild Tools
. - Click
Gradle
and selectjbr-17
orcoretto-17
as Gradle JDK. If you can't find any of the mentionedJDK
there, please download one.
- Open
- Sync the project now.
- Open
local.properties
file and place this lineAPI_KEY = "37699167-c79ddc6ba4895b131ee74e6f7"
under thesdk.dir="..."
declaration. - That's it 😊 now Clean & Run the project, you will see a nice UI 😊❤️
N.B: For a quick look, you can install the .apk
file directly in your phone by downloading it from the release folder.
- Single Activity Architecture
- MVVM Architecture
- Android Architecture Components
- Databinding and ConstraintLayout
- Kotlin Coroutines
- Hilt Dependency Injection
- Room Database
- Material Design Components
- Retrofit Network Library
- Android Paging 3
- Coil Image Loader
- Android Navigation Components
- Default image search for "fruits"
- List of images as a search result
- Offline search
- Details info of images
- HD quality image in details
- Details show confirmation
- App exit confirmation
- Full screen view of HD image with pinch zoom
- Automatic HD image loading in response of network availability
- Automatic response to network
- Automatic refresh of search result when network restores
- Smooth handling of configuration changes
- Restore states after configuration changes
- Splash screen
- Dynamic changes in number of images per row depending on the oriyentation of the scren
- Implementation of unit and instrumental tests
- Image download options
- Fully configuration of night or dark theme
- 🧐 If you find anything wrong then please create an Issue
- ⭐️ If you find this project helpful then don't forget to star it
- 🍀 Meanwhile You can also checkout my blogs on Medium
- 🥰 Feel free to visit my other Repositories, there might be something waiting for you