Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/canerkaseler/jetpack-compose-parameter-management-with-preview-parameter

This repository has a Medium Article which targets to show how to handle parameters and use @PreviewParameter in Jetpack Compose UI.
https://github.com/canerkaseler/jetpack-compose-parameter-management-with-preview-parameter

android android-application android-development android-ui jetpack-compose jetpackcompose kotlin kotlin-android previewparameter

Last synced: 2 days ago
JSON representation

This repository has a Medium Article which targets to show how to handle parameters and use @PreviewParameter in Jetpack Compose UI.

Awesome Lists containing this project

README

        

# How to handle parameters and use @PreviewParameter in Jetpack Compose

This repository has a [Medium Article](https://medium.com/kotlin-academy/slot-api-pattern-previewparameter-in-jetpack-compose-6308e46155e8) which targets to show how to handle parameters and use @PreviewParameter in Jetpack Compose UI.

Screenshot 2024-08-19 at 22 56 22

> If you would like to support my work, coffee is my best friend for writing code and articles: https://buymeacoffee.com/canerkaseler ☕️
>
> You can reach me on social media and other platforms, stay tuned: https://linktr.ee/canerkaseler 🤝

## Introduction of the article

I create a basic Android application with only Jetpack Compose in this article. This app includes a basic card design which includes text, image and button. It does not contain any network request, complex UI or business logic.

Table of contents:
1. Compose Design with Traditional Way (_If you know compose, you can skip this part._)
2. Management of parameters of compose functions in Jetpack Compose
3. @PreviewParameter Approach in Compose Preview
4. References

> Note: _Table of contents may not show bonus parts_ 🎁

## Example images of the results

Screenshot of the component preview from android studio.

Screenshot 2024-08-19 at 22 56 22

Screenshot of Home Screen preview from android studio.

Screenshot 2024-08-19 at 23 01 17

## More details

If you would like to continue reading and learn some details about above parts, please check out the [Medium Article](https://medium.com/kotlin-academy/slot-api-pattern-previewparameter-in-jetpack-compose-6308e46155e8). I hope, this repository and its Medium article will be useful and beneficial for your project! 🙌