Android RatingBar
RatingBar:
RatingBar is a user interface element that allows customers to pick out a score or score by way of touching or dragging a sequence of score indicators.
It visually represents a rating in the shape of stars or other symbols, generally allowing users to specific their opinions or preferences in a numeric or qualitative way.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".RatingBarExample"
android:orientation="vertical"
android:gravity="center">
<RatingBar
android:id="@+id/rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:rating="3.5"
android:stepSize="0.5"
android:numStars="5"/>
<Button
android:id="@+id/ratingbar_submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rating"
android:textColor="@color/colorWhite"
android:background="@color/colorAccent"
android:layout_marginTop="16dp"
/>
</LinearLayout>
Output