RatingBar onClick

后端 未结 5 888
孤街浪徒
孤街浪徒 2020-12-25 13:59

I have a ListView that uses different XML files to create Views and make items out of. One of these XML files contains a RatingBar. Everything displays and looks excellent

5条回答
  •  猫巷女王i
    2020-12-25 14:32

    ratingBar1.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
    
            @Override
            public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser) {
    
                String rateValue = String.valueOf(ratingbar1.getRating());
                System.out.println("Rate for Module is"+rateValue);
            }
        });             
    

提交回复
热议问题