In this talk, we will explore how to create a custom view that enhances the user experience of a Spin-to-Win feature using Jetpack Compose. The view is a horizontal carousel of images, where the system randomly selects a winner and the carousel stops at the winning image, animating and enlarging it to reveal the product won.
We will dive into the implementation details of the custom view, discussing how to leverage Jetpack Compose's features to create dynamic, responsive, and fluid UIs. We will explore how to draw the carousel and how to create animations with the Animation API. Additionally, we will discuss best practices for measuring and positioning elements, optimizing performance, and handling the system-selected winner.
Come and maybe you will be lucky to win the spin!