Skip to content

A demonstration of how to implement a UI feature in Android's Jetpack Compose

Notifications You must be signed in to change notification settings

LloydBlv/BookmarkButton

Repository files navigation

🌟 Bookmark Button Demo with Jetpack Compose 🌟

ezgif-2-d14c09418d

This project is a practical demonstration of the concepts discussed in the article "Can You Create a Bookmark Button in Jetpack Compose?" 📖. It showcases the creation of a bookmark button in Jetpack Compose with three states - Bookmarked 📌, Not bookmarked ❌, and Toggling 🔄. The project emphasizes not just on the UI implementation but also on testing 🧪, performance 🚀, handling configuration changes 🔄, and other key aspects of feature development in Android.

🎉 Features

  • Bookmark Button Implementation: A fully functional bookmark button with three distinct states, demonstrating state management and UI updates in Jetpack Compose.
  • Unit and UI Testing: Examples of how to write tests for the bookmark button, ensuring its functionality remains consistent across app updates.
  • Performance Metrics: Implementation of Jetpack Compose performance metrics to monitor and optimize the UI's performance.
  • Handling Configuration Changes: Demonstrates how to preserve the bookmark button's state across configuration changes, ensuring a seamless user experience.
  • Accessibility: Tips on making the bookmark button accessible to all users, including those with disabilities.

🚀 Getting Started

To get a local copy up and running, follow these simple steps:

Prerequisites

  • Android Studio Iguana | 2023.2.1 RC 1 🛠️
  • Kotlin 1.9.22 or later 🕹️

Installation

  1. Clone the repo
    git clone https://github.com/LloydBlv/BookmarkButton.git
  2. Open the project in Android Studio.
  3. Build the project and run on an emulator or a real device.

📖 Usage

This project can be used as a reference for implementing a bookmark button in your own Jetpack Compose applications. It demonstrates not just how to create interactive UI components but also how to ensure they are robust, performant, and accessible.

🤝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🧪 Testing

This project includes both unit tests and UI tests to ensure the bookmark button works as expected:

  • Unit Tests: Verify the logic behind the bookmark button's states and interactions.
  • UI Tests: Ensure the button's integration with the UI is seamless and user interactions are handled correctly.

📬 Contact

Reza - [email protected]

Project Link: https://github.com/LloydBlv/BookmarkButton

💖 Acknowledgements

About

A demonstration of how to implement a UI feature in Android's Jetpack Compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages