how to read and display rating bar value
i[0] // should be selected value private OnClickListener onclickbutton1 = new OnClickListener() { public void onCli
var ratingBar = findViewById(R.id.ratingBarid); var btn= findViewById(R.id.buttonid); var text1 = findViewById(R.id.textViewid) /* 3rd rules of if (ratingBar!=null){ btn.setOnClickListener { val msg = ratingBar.rating.toString(); text1.setText("The result of $msg") } } // rating bar click to show the text view // ratingBar.setOnRatingBarChangeListener(this) // 1st rules of Rating Bar.. ratingBar.setOnRatingBarChangeListener(object: RatingBar.OnRatingBarChangeListener{ override fun onRatingChanged(ratingBar: RatingBar?, rating: Float, fromUser: Boolean) { // TODO("not implemented") //To change body of created functions use File | Settings | File Templates. text1.text = "Rating bar result $rating" } }) } // 2nd rules of Rating bar .... override fun onRatingChanged(ratingBar: RatingBar?, rating: Float, fromUser: Boolean) { //TODO("not implemented") //To change body of created functions use File | Settings | File Templates. var text1 = findViewById(R.id.textViewid) text1.text = "Rating Bar Result : $rating" */ }