Code example for RatingBar

Methods: setOnRatingBarChangeListener

0
        new checkrating().execute();
 
    } 
 
    public void listeners() { 
        rb_rate.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
            public void onRatingChanged(RatingBar arg0, float arg1, boolean arg2) {
                rating = (int) arg1;
            } 
 
        }); 
        btn_submit.setOnClickListener(new OnClickListener() {
 
            public void onClick(View arg0) {
                new ratetutor().execute();
            } 
        }); 
    } 
 
    class ratetutor extends AsyncTask<String, Void, String> {