Android-->RatingBar自定义大小,自定义样式(图片)

1:首先声明自定义RatingBar的样式(values/styles.xml)


2:自定义RatingBar的图片(drawable/rating_bar.xml)




   

   

   

3:布局文件中,引用即可(layout/layout.xml)


    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:numStars="5" 
    android:rating="3" 
    android:stepSize="0.5" 
    />

至此: 文章就结束了,如有疑问: QQ群:274306954 欢迎您的加入.

你可能感兴趣的:(Android-->RatingBar自定义大小,自定义样式(图片))