[英]Using rating bar in android
<RatingBar
android:id="@+id/RATINGinitialvalueratingID"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/RATINGseekBarID"
android:isIndicator="false"
android:numStars="5" />
Say there are three stars in this .... i have two questions 说这里有三颗星......我有两个问题
Try to add the following attribute to show 5 stars: 尝试添加以下属性以显示5颗星:
android:rating="5"
Also, try to add those to make it not editable: 另外,尝试添加它们以使其不可编辑:
android:isIndicator="true"
android:focusable="false"
android:clickable="false"
Try this.. 尝试这个..
RatingBar ratingBar = (RatingBar)findViewById(R.id.RATINGinitialvalueratingID);
ratingBar.setRating(5);
ratingBar.setFocusable(false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.