← Back to Projects
Android Development Lifestyle Declarative UI Reusable Components

Affirmations App

A simple Android application that displays positive affirmations in a clean, scrollable list. The project focuses on building reusable UI components, displaying data with Jetpack Compose, and developing foundational Android programming skills.

affirmations.app
✨
Affirmations

A clean, scrollable list of positive affirmations to brighten your day.

Tech Stack

Languages

Kotlin

Mobile Development

Jetpack Compose Android Studio

Tools and Workflow

Git GitHub

🚀 Overview

The Affirmations App is a simple Android application built with Kotlin and Jetpack Compose. It displays a collection of positive affirmations in a clean, scrollable list. The project was created as a learning exercise to build foundational Android programming skills, with a focus on reusable UI components and displaying data effectively using Jetpack Compose.

The app demonstrates the core concepts of declarative UI development—composable functions, state, and layouts—while keeping the feature set intentionally simple. Each affirmation is rendered as a reusable list item, making it easy to extend the app with more content in the future.

✨ Key Features

  • Scrollable Affirmation List: A clean, scrollable list of positive affirmations displayed using Jetpack Compose's LazyColumn.
  • Reusable UI Components: Each affirmation item is built as a reusable composable, promoting consistency and maintainability.
  • Declarative UI: Built entirely with Jetpack Compose for a modern, reactive user interface.
  • Clean Layout: Thoughtful spacing, typography, and visual hierarchy make the affirmations easy to read.
  • Foundational Android Skills: Practiced core Android development concepts such as activities, composables, and resource management.
  • Simple Data Source: Affirmations are defined as a data source that feeds the list, demonstrating data-to-UI flow.

💡 Technical Challenges

Challenge 1: Building Reusable Composable Components

Problem: When building a list of similar items, it's important to avoid duplicating UI code. Without reusable components, the codebase becomes hard to maintain and extend.

Solution: Created a reusable composable function for each affirmation list item. The composable accepts the affirmation text and other relevant data as parameters, allowing it to be reused across the list with different content.

Challenge 2: Displaying Data Efficiently in a List

Problem: Displaying a potentially long list of affirmations efficiently requires using a lazy layout that only composes visible items, rather than rendering everything at once.

Solution: Used Jetpack Compose's LazyColumn to render the affirmation list. LazyColumn only composes and lays out the items that are currently visible, which keeps the app performant even as the list grows.

Challenge 3: Learning Declarative UI Fundamentals

Problem: Moving from an imperative to a declarative UI mindset can be challenging, especially when learning how state and recomposition work in Jetpack Compose.

Solution: Started with a simple, static list to understand composable functions and layout modifiers. Gradually introduced state concepts, building a solid foundation for more complex Compose apps in the future.

📈 Outcome / Lessons Learned

Architecture & Engineering Excellence

  • Jetpack Compose Basics: Gained a solid understanding of composable functions, layouts, and modifiers.
  • Reusable Components: Learned to design composables that are reusable and parameterized.
  • Efficient Lists: Practiced using LazyColumn for performant, scrollable lists.

Product Impact

  • Positive Experience: Delivered a simple, uplifting app that presents affirmations in a clean, readable format.
  • Easy to Extend: The reusable component architecture makes it straightforward to add more affirmations or features.
  • Smooth Scrolling: LazyColumn ensures the list scrolls smoothly regardless of how many affirmations are added.

Real-World Learning

  • Declarative Thinking: Developed an understanding of how to describe UI in terms of state rather than imperative steps.
  • Android Fundamentals: Strengthened foundational Android skills that apply to more complex apps.
  • Component Reusability: Learned the value of building small, focused composables that can be combined to create larger UIs.