6

Customizing RatingBar shows me shadow

How to hide this shadow ?

enter image description here

           <RatingBar
            android:id="@+id/ratingBarMain"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/textView6"
            android:layout_toRightOf="@+id/imgThumbFix"
            android:clickable="false"
            android:progressDrawable="@drawable/ratingbar_red_small"
            android:stepSize="1" />
MAC
  • 15,799
  • 8
  • 54
  • 95

3 Answers3

12

set

android:layout_height="EQUAL_TO_IMAGE_HEIGHT"

example

android:layout_height="35dp"
Chintan Raghwani
  • 3,370
  • 4
  • 22
  • 33
5

The problem here is:

It is repeating the last bit line of the image if the height of your View is 50 px and the height of image is 40 px, then for rest of the 10 px it will be filled by repeating the last bit of your image.

You have to give the exact height equals to your image height to RatingBar.

android:layout_height="40dp" 

Same problem was solved here

Community
  • 1
  • 1
Adil Soomro
  • 37,609
  • 9
  • 103
  • 153
4

Another simple solution woud be to leave a row of empty pixels in the star image using an image editor like photoshop. Then the repeated or stretched row of pixels in the ratingbar would be empty. This aproach solved my issue.

evis
  • 137
  • 1
  • 11