We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfRating frequently renders the wrong value when set to Half precision

Thread ID:





129290 Mar 9,2017 09:53 PM UTC Mar 10,2017 12:09 PM UTC Xamarin.Forms 1
Tags: SfRating
Matthew Robbins
Asked On March 9, 2017 09:53 PM UTC

Associated Repository: https://github.com/matthewrdev/syncfusion-star-rating-bug

## Description
When using the `SfRating` control to display a star rating value set to half-precision, the Android version of the control frequently displays values incorrectly.

**Key Files:**
 - [StarRatingBugPage.xaml](StarRatingBug/StarRatingBugPage.xaml): The UI for this app. Here we are data-binding an integer value of 0-10 to the star rating control, dividing it by 2 using a value converter and then using the `SfRating` control to display that value at `Half` precision (EG: 0, 0.5, 1, 1.5 etc through to 5).

**Sample Xaml:**
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
<local:HalfIntConverter x:Key="halfIntConverter"/>
<local:ValueToMessageConverter x:Key="valueToMessageConverter"/>
<StackLayout Padding="0,20,0,0">
<sf:SfRating Precision="Half" Value="{Binding Value, Converter={StaticResource halfIntConverter}}">
<sf:SfRatingSettings RatedFill="#F6FF00"
<Button HorizontalOptions="Center"
Text="Tap for random int value from 0 to 10"
   Command="{Binding RandomNumberCommand}"/>
<Label Text="{Binding Value, Converter={StaticResource valueToMessageConverter}, Mode=OneWay}"/>

## Steps To Reproduce
 1. Clone the following repository: https://github.com/matthewrdev/syncfusion-star-rating-bug
 2. Open StarRatingBug.sln in Xamarin Studio for Mac.
 3. Build the project.
 4. **IMPORTANT: Run project on an ANDROID emulator/device**
 5. Repeatedly tap the button titled `TAP FOR RANDOM INT VALUE FROM 0 TO 10`.
 6. Observe that the text saying the expected rating and the star rating are matching.
 7. Eventually, the star rating control will display a value half a value out or sync.

## Expected Result
The star rating control correctly displays decimal values at half-precision.

## Actual Result
The star rating control frequently displays an incorrect half-precision value.

Rathana Kumar Sekar [Syncfusion]
Replied On March 10, 2017 12:09 PM UTC

Hi Matthew,

Thanks for contacting Syncfusion Support.

We could reproduce the reported issue "SfRating frequently renders the wrong value when set to half precision" from our side and fix for the reported issue will be available in our upcoming Volume 2 release which will be available by the mid of the April.

Please let us if you have any other queries.

Rathanakumar S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon