Android 如何使用小的Ratingbar

来源:互联网 发布:知乎匿名回答在哪看 编辑:程序博客网 时间:2024/05/19 13:16

1.布局文件中

<RatingBar    android:layout_marginLeft="@dimen/app_margin_top"    style="@style/Base.Widget.AppCompat.RatingBar.Small"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:max="5"    android:progress="2"    android:progressTint="@color/event6"    android:theme="@style/RatingBar_CustomColor"    />

2.style.xml中创建style

<!--自定义RatingBar Color--><style name="RatingBar_CustomColor" parent="@android:style/Widget.Holo.RatingBar.Indicator">    <!--Background Color-->    <item name="colorControlNormal">#D7D7D7</item>    <!--Progress Color-->    <item name="colorControlActivated">#F49800</item></style>
原创粉丝点击