In a fragment the rating of a RatingBar is set to 5 and the RatingBar is set to show 5 stars. Upon clicking on some button another fragment is presented. After hitting the 'back' key the user returns to the previous fragment (scrolling etc is preserved) but the rating bar is showing only 1 star.
A probably important detail is that (altho it might not be the best thing to do) that in onCreateView the View is saved in a class field (e.g. mView) and returned if it's not null, so no new inflating etc is needed.
However even in this case and after explicitly setting setNumStars(5) the RatingBar is showing 1 star.