5 Star Rating Bar Displaying 10 Stars in Xamarin.Android

Hello Team,

I am Creating Rating Bar With 5 stars and displayed it in AlertDialog
in this I have set NumStars = 5 and StepSize = 1.0f but it is displaying 10 stars.
My Code as per below.
can anyone suggest me how to get proper solution.

alert.SetTitle("Rating");
                alert.SetMessage("Ratting Message");
                RatingBar ratings = new RatingBar(this);
                ratings.LayoutParameters = new          ViewGroup.LayoutParams(ViewGroup.LayoutParams.WrapContent,ViewGroup.LayoutParams.WrapContent);  
                ratings.NumStars = 5;
                ratings.StepSize = 1.0f;

                alert.SetView(ratings);
                alert.SetPositiveButton ("Rate Now", (senderAlert, args) => {

            } );

            alert.SetNegativeButton ("Later", (senderAlert, args) => {

            } );

            RunOnUiThread (() => {
                alert.Show();
            } )
Sign In or Register to comment.