I am following the standard example of how to add a RatingBar. To control the number of stars I tried to use android:numStars=\"5\". The problem is
RatingBar
android:numStars=\"5\"
This worked for me: RatingBar should be inside LinearLayout other than having layout width set to wrap content for RatingBar.
LinearLayout