Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Android Assessment Template

A modern, clean starter template for Android development assessments and technical interviews. This project follows current best practices (2025-2026) using Kotlin, Hilt, ViewBinding, and clean architecture principles.

🚀 Getting Started

Prerequisites

  • Android Studio Ladybug (or newer)
  • JDK 17+
  • Android SDK 35

Setup

  1. Clone the repository.
  2. Open the project in Android Studio.
  3. Sync Gradle and build the project.
  4. Run the app module on an emulator or physical device.

🛠 Features

  • Hilt Dependency Injection: Pre-configured for scoped dependency management.
  • ViewBinding: Type-safe UI interaction.
  • Simple Adapter Pattern: A production-ready, simplified ListAdapter implementation using DiffUtil for high-performance list updates.
  • Material 3: Pre-integrated Material Design 3 components.

📖 How to Use

1. Using the SimpleStringAdapter

The SimpleStringAdapter is designed to be easily extensible. It currently uses a custom item_simple.xml layout.

// In your Fragment or Activity
private val myAdapter = SimpleStringAdapter()

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    binding.recyclerView.adapter = myAdapter
    myAdapter.submitList(listOf("Item A", "Item B"))
}

2. Customizing for your Data

To use your own data models:

  1. Copy SimpleStringAdapter.kt and rename it (e.g., UserAdapter).
  2. Change the generic type from String to your model (e.g., User).
  3. Update onCreateViewHolder to inflate your specific layout binding.
  4. Update the bind method to map your model fields to your UI.

3. Collecting Live Data

The template includes a placeholder in StarterFragment for collecting data from a ViewModel using repeatOnLifecycle:

viewLifecycleOwner.lifecycleScope.launch {
    viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
        viewModel.uiState.collect { data ->
            stringAdapter.submitList(data)
        }
    }
}

🏗 Project Structure

  • ui/: Contains Fragments and UI logic.
  • ui/SimpleStringAdapter.kt: Standalone list adapter.
  • res/layout/item_simple.xml: Custom card-based item layout.

📝 License

This project is for assessment and educational purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages