Skip to content

VarunBhatheja/UserListApp

Repository files navigation

UserListApp

Welcome! This project is my submission for the Android Developer assignment. It's a fully functional native Android app that fetches user data from a REST API and displays it in a clean, user-friendly interface.

Key Features & Functionality ✨

I've implemented all the core and bonus features required for this assignment:

  • Dynamic User List: A smooth, scrollable list of users fetched from the network, built with RecyclerView.
  • Detailed User Profiles: Tapping a user seamlessly navigates to a detailed view with more information about their contact, address, and company.
  • Real-Time Search: A search bar in the toolbar allows users to instantly filter the list by name, email, or username.
  • Pull-to-Refresh: Users can swipe down on the list to fetch the latest data from the API.
  • Persistent Dark Mode: A dedicated settings screen features a toggle for Light and Dark themes. The app remembers the user's choice the next time it's launched using SharedPreferences.
  • Adaptive UI: The layouts are designed to be responsive and look great on different screen sizes.

Architectural Approach 🏛️

To build a clean, scalable, and maintainable app, I chose the modern MVVM (Model-View-ViewModel) architecture.

This pattern creates a strong separation of concerns by dividing the app into three logical layers:

  • View (Fragments): The UI layer, which is responsible only for displaying data and forwarding user interactions. It's kept "dumb" on purpose.
  • ViewModel: The logic holder. It survives configuration changes (like screen rotation), manages the UI state with LiveData, and handles all user actions.
  • Model (Repository & Network): The data layer. A Repository abstracts the data source, providing a clean API for the ViewModel to fetch data without needing to know how or from where it's fetched.

Tech Stack & Libraries 📚

This project is built using modern, industry-standard tools and libraries:

  • Language: 100% Kotlin
  • Asynchronicity: Coroutines for managing background threads and network calls.
  • Networking: Retrofit & Gson for efficient and type-safe communication with the REST API.
  • Image Loading: Glide for loading, caching, and displaying images smoothly.
  • Architecture Components:
    • ViewModel: To manage UI state.
    • LiveData: To create observable data streams.
    • Navigation Component: To handle all fragment transactions and navigation logic.
  • UI: Material Components for building a modern user interface that conforms to Material Design guidelines (MaterialToolbar, CardView, SwitchMaterial).

Getting Started 🚀

  1. Clone this repository to your local machine.
  2. Open the project in Android Studio.
  3. Allow Gradle to sync and download all the necessary dependencies.
  4. Build and run the app on an Android emulator or a physical device.

About

Android assignment to display a list of users from an API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages