android - How to set the Rating bar is non clickable and touchable in HTC mobile
Solution 1:
You could also set the RatingBar as indicator from the xml with the following:
android:isIndicator="true"
Solution 2:
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);
Solution 3:
Do not set enabled to false as this will dim the control. What you want to do is override the on touch listener like this:
import android.view.View.OnTouchListener;
RatingBar ratingBar = (RatingBar)findViewById(R.id.ratingBar);
ratingBar.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
So basically you intercept the touch and do nothing with it
Also add the following code too to block trackball rollovers
ratingBar.setFocusable(false);