Make Apps Simple

Working on ways to improve apps from planning, requirement gathering to end-user experience.

Follow publication

Smiley 😍 Rating Bar using Jetpack Compose

Abhimanyu
Make Apps Simple
Published in
1 min readAug 22, 2022

--

Smiley rating bar using Jetpack Compose

Tired of the same old rating bar with stars? Let's create something different.

Overview of implementation

  • We will use emojis from the internet directly using the URL for the smileys.
  • The smiley will be displayed from the URL by using AsyncImage composable from Coil Compose.
  • The rating bar will get a list of URLs and labels as input to create the UI.
  • For animations, we will use basics Jetpack compose animations APIs β€” animateDpAsState and animateFloatAsState .
  • Upon selection, we will change the color filter of the image, size, text color, and padding for smooth animation.

SmileyData: A simple data class to hold the URL and label of a smiley

Smiley: A composable to represent a single smiley

SmileyRatingBar

It stores the rating as an Int.

We can pass any list of URLs and titles.

SmileyRatingBarSample: To demonstrate how to use the rating bar

Please comment with your valuable feedback. It would help me to improvise.

Kindly πŸ‘πŸ‘πŸ‘ if this was useful.

Please follow if you would like to see more content related to Android Jetpack Compose.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Make Apps Simple
Make Apps Simple

Published in Make Apps Simple

Working on ways to improve apps from planning, requirement gathering to end-user experience.

No responses yet

Write a response