how to get RatingBar value

前端 未结 9 2379
傲寒
傲寒 2021-02-13 18:55

how to read and display rating bar value

i[0] // should be selected value

private OnClickListener onclickbutton1 = new OnClickListener() {
    public void onCli         


        
9条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-13 19:26

    Simple call

      ratingBar.getRating() ; GET RATING BAR VALUE
    

    When you want to get the rating value when changed

         public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromTouch) {
    
         final int numStars = ratingBar.getNumStars();
         ratingBar.getRating() ;
         final float ratingBarStepSize = ratingBar.getStepSize();
    
    }
    

提交回复
热议问题