My application have rating bars. I want to set the Rating bar is non-click able and no-touchable. For this i added the following code in xml
file of each rating bar.
It is working in samsung galaxy Apollo GT-i5801. But it is not working in the HTC mobile. Why?
xml code
android:clickable="false" android:focusableInTouchMode="false" android:focusable="false"
thanks
android:attr/ratingBarStyleSmall" or scaleX/scaleY the click interaction with RatingBar is disabled. This works for me. Hope this helps you!
android.widget.RatingBar. A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in stars. The user can touch/drag or use arrow keys to set the rating when using the default size RatingBar.
You could also set the RatingBar as indicator from the xml with the following:
android:isIndicator="true"
This is it write this code in your setOnRatingBarChangeListener
ratingaddrate.setIsIndicator(true);
Update :
You can use this example in your XML
android:isIndicator="true"
also add this line to the Code
ratingBar.setFocusable(false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With