Thursday, December 8, 2011

Android Ratting Bar Styles

Things to know about Android ratting bar before we use them,
a. RattingBar is not editable by default until we set the isIndicator property to "false".
b. There are few styles available for Ratting Bar, one is "?android:attr/ratingBarStyleSmall".

<RatingBar 
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:id="@+id/doc_dialog_ratingbar"
android:numStars="5"
android:stepSize="1.0"
android:rating="2"
android:isIndicator="false"/>

<RatingBar android:id="@+id/list_ratingbar_small"
android:layout_width="wrap_content" android:focusable="false"
android:layout_height="wrap_content"
style="?android:attr/ratingBarStyleSmall"
android:rating="3"
android:numStars="5"/>

No comments: