android - Smaller Custom RatingBar: Material Design -


i building app uses non-clickable (indicator) ratingbar. now, when ratingbar clickable, has 2 different modes. when clicked icons turn red (red accentcolor in styles). when not clicked, stars ugly gray black outline. when rating bar set unclickable (indicator), stars permanently black-and-gray.

additionally, make stars smaller. can both of above things without defining custom drawables? if must define custom drawables, how can access preexisting "clicked star" drawable, not need create own?

thanks

                <ratingbar                     style="@style/ratingbar"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content"                     android:numstars="5"                     android:rating="3.5"                     android:stepsize="0.5" /> 

and add in styles xml file

<style name="ratingbar"    parent="android:style/widget.material.ratingbar.small"> <item name="colorcontrolnormal">@color/primary_light</item> <item name="colorcontrolactivated">@color/primary_dark</item> </style> 

visit my blog post , see working example. way dont need customise ratingbar.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -