Readonly SfRating control doesn't recognize taps

Greetings!
I am using a SfRating control inside a ViewCell element to show rating information about a bindable object on my Xamarin application.
As this rating is just informative, I set the control's ReadOnly property to True.
The ViewCell containing this SfRating control fires a Tapped event that navigates to a new Page.
The full content of the viewcell should be "tappable"; however Android doesn't recognize this interaction if user taps over the rating control.
Can this behavior be overriden somehow? Here is my code excerpt:

<ViewCell x:Name="viewcellAvaliacao" Tapped="viewcellAvaliacao_Tapped">
    <Grid Padding="15,5,0,5">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Label Text="Avaliação"
                FontAttributes="Bold" />
        <rating:SfRating x:Name="sfRatingAvaliacao" 
                            ItemSize="15"
                            Precision="Exact"
                            HorizontalOptions="FillAndExpand"
                            ReadOnly="True"
                            ItemCount="5"
                            ItemSpacing="5"
                            Grid.Row="1"
                            Value="{Binding Ponto, Mode=OneWay, Converter={StaticResource MediaAvaliacoes}}" />
        <Image HorizontalOptions="Center" 
                VerticalOptions="Center"
                Grid.RowSpan="2"
                Grid.Column="1">
            <Image.Source>
                <FontImageSource FontFamily="{DynamicResource MaterialFontFamily}" 
                                    Color="Black" 
                                    Glyph="{StaticResource Next}" Size="30"/>
            </Image.Source>
        </Image>
    </Grid>
</ViewCell>


Thank you in advance!

3 Replies

DV Divya Venkatesan Syncfusion Team March 30, 2020 09:48 AM UTC

Hi Ivan, 
 
Greetings from Syncfusion. 
 
We suggest you to set InputTransparent as true to resolve this reported issue as shown in the below code snippets. 
 
<ViewCell x:Name="viewcellAvaliacao" Tapped="viewcellAvaliacao_Tapped"> 
    <Grid Padding="15,5,0,5"> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="*" /> 
            <RowDefinition Height="*" /> 
        </Grid.RowDefinitions> 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="*" /> 
            <ColumnDefinition Width="Auto" /> 
        </Grid.ColumnDefinitions> 
        <Label Text="Avaliação" 
FontAttributes="Bold" /> 
        <rating:SfRating x:Name="sfRatingAvaliacao"  
            ItemSize="15" 
            Precision="Exact" 
            HorizontalOptions="FillAndExpand" 
            ReadOnly="True" 
            InputTransparent="True" 
            ItemCount="5" 
            ItemSpacing="5" 
            Grid.Row="1" 
            Value="{Binding Ponto, Mode=OneWay, Converter={StaticResource MediaAvaliacoes}}" /> 
        <Image HorizontalOptions="Center"  
VerticalOptions="Center" 
Grid.RowSpan="2" 
Grid.Column="1"> 
            <Image.Source> 
                <FontImageSource FontFamily="{DynamicResource MaterialFontFamily}"  
                    Color="Black"  
                    Glyph="{StaticResource Next}" Size="30"/> 
            </Image.Source> 
        </Image> 
    </Grid> 
</ViewCell> 
 
 
Please get back to us if you need any further assistance. 
 
Regards, 
Divya Venkatesan 



IV Ivan March 30, 2020 03:22 PM UTC

Thanks for your feedback! Setting IsEnabled="False" solved my issue.


DV Divya Venkatesan Syncfusion Team March 31, 2020 07:26 AM UTC

Hi Ivan, 
 
Thanks for the update. Please get back to us if you need any further assistance. 
 
Regards, 
Divya Venkatesan 


Loader.
Up arrow icon