RatingBar Android Studio - GoogleMaps API

1

[]

Hi, I would like to add a rating to each bookmark, the second picture is the layout where the RatingBar is and the third I want to change the value of the stars but it gives me null I wait for their answers. Thanks

    
asked by Kyo Shiro 08.12.2016 в 22:04
source

1 answer

0

Based on your error message

indicates that there is no RatingBar with id ratingbar in the layout that loads your Activity.

For this reason mark NullPointerException.

The RatingBar with id ratingbar must be contained in the layout that is uploaded to Travez de setContentView() :

 @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ...
        ...
    
answered by 08.12.2016 в 22:30