AndroidRatingBar星星评分控件实例代码-创新互联

效果图:

目前成都创新互联公司已为成百上千的企业提供了网站建设、域名、网站空间、网站托管、服务器租用、企业网站设计、郊区网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

直接上代码:

xml文件:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
  xmlns:android="http://schemas.android.com/apk/res/android" 
  xmlns:app="http://schemas.android.com/apk/res-auto" 
  xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" 
  android:layout_height="match_parent" tools:context="com.example.blogtest.MainActivity"> 
  <!--numStars设置星星的数量,stepSize默认的评分--> 
  <RatingBar 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/rb_main_rating" 
    android:numStars="5" 
    android:stepSize="0.5" 
    /> 
</LinearLayout> 

分享文章:AndroidRatingBar星星评分控件实例代码-创新互联
转载来于:https://www.cdcxhl.com/article0/csccoo.html

成都网站建设公司_创新互联,为您提供小程序开发App设计响应式网站App开发网站设计标签优化

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

外贸网站制作