android - How to set the Rating bar is non clickable and touchable in HTC mobile

前端 未结 4 851
野的像风
野的像风 2020-12-23 02:28

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

4条回答
  •  温柔的废话
    2020-12-23 03:07

    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);
    

提交回复
热议问题