关于 ratingBar
参考 资料写的demo
http://www.cnblogs.com/over140/archive/2010/11/18/1880391.html
写道
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/tv_hotel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="China hotel"
android:textSize="18dp" />
<ImageView
android:id="@+id/iv_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_right" />
<TextView
android:id="@+id/tv_distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:layout_toLeftOf="@+id/iv_right"
android:text="30km" />
<RatingBar
android:id="@+id/rb_stars"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/tv_distance"
android:isIndicator="true"
android:numStars="6"
android:rating="5.0"
android:stepSize="1.0" />
</RelativeLayout>
分享到:
相关推荐
android ratingBar星星demo
可以动态改变星星颜色的RatingBar的Demo,带代码注释。比如当少于三颗星的时候,Ratingbar的星星为红色,少于五颗星的时候,RatingBar的星星颜色为蓝色,五颗星的时候,RatingBar的星星颜色为黄色。
RatingBar位于android.widget包中,是基于SeekBar和ProgressBar的扩展,用星型来显示等级评定。使用RatingBar的默认大小时,用户可以触摸/拖动或使用键来设置评分
星星评分Demo,自定义RatingBar
简明、完整、全面的安卓开发demo集合,包含如下示例 1、LinearLayout Button、RadioGroup、 CheckBox 2、TableLayout 3、FrameLayout 霓虹灯效果 4、RelativeLayout 梅花效果 5、自定义view跟着触点走的小球 6、 ...
本例收集了垂直和水平自定义SeekBar、Animation、ExpandableListView、RatingBar的简单使用,适合初学者
整合了 animation autocomplete chronometer 时间日期 ELview 画廊 Grid imageSwitcher RatingBar SeekBar ProgressBar Spinner demo
本例集成了ExpandableListView、水平SeekBar和垂直SeekBar、RatingBar、Animation的用法,适合初学Android者参考
文档介绍了控件介绍,1、ZoomControls 的 Demo,2、Include的Demo,3、VideoView的Demo,4、WebView的Demo,5、RatingBar的Demo,6、Tab的Demo,7、Spinner的Demo,8、Chronometer的Demo,9、ScrollView的Demo
系统自带的RatingBar是可以的,但是实际项目中会用到自己自定义样式的RatingBar,本demo可以实现自定义样式。
ProgressBar SeekBar RatingBar 三种Bar的简单使用
SimpleRatingBar >This is a very simple RatingBar library, which you can just simply extend BaseRatingBar to implement ...Demo Icon made by Freepik from www.flaticon.com What's New (v1.2) Support flo
此代码利用listview制作了一个美食列表,包括利用系统自带的Ratingbar制作了星级评价。
由于项目需要,网上查了很多也没有比较简单合适的demo,所以做了这个demo。demo简单易懂,只有少量代码实现了评分条。
两个TextView和EditText,一个Button,一个星级评价RatingBar控件,布局完事… activity_dynamic的布局,有可能会添加多个,所以外面用ScrollView,因为我们是垂直方向添加,所以使用LinearLayout做容器 <?xml ...