- Home
- Forum
- Xamarin.Forms
- Images for Carousel in Android only do not Render
Images for Carousel in Android only do not Render
<ResourceDictionary>
<DataTemplate x:Key="itemTemplate">
<Image Source="abc123.jpg" Aspect="AspectFill">
<Image.GestureRecognizers>
<TapGestureRecognizer
Tapped="OnImageNameTapped"
NumberOfTapsRequired="1" />
</Image.GestureRecognizers>
</Image>
</DataTemplate>
</ResourceDictionary>
</ContentPage.Resources>
<syncfusion:SfCarousel x:Name="carousel" ItemTemplate="{StaticResource itemTemplate}"
Offset="30" RotationAngle="45"
ItemWidth="130" ItemHeight="180"
HeightRequest="180" WidthRequest="130"
ItemsSource="{Binding ImageCollection}"
SelectionChanged="carousel_SelectionChanged">
</syncfusion:SfCarousel>
Thanks for contacting Syncfusion Support.
Query: Need to display Images for carousel in Android.
We have checked the reported issue with version 15.3.0.29 and were able to reproduce the same. It can be resolved by using DataSource Property in SfCarousel.Please find the sample from the below link,
Sample Link: http://www.syncfusion.com/downloads/support/forum/132677/ze/CarouselTester1-1913762210
And the reported issue fix will be available in our upcoming Vol 3 SP2 release, which will be rolled out by the end of september, 2017.
Regards,
Rabhia Beham K.
Thank you, that works.
The documentation at https://help.syncfusion.com/xamarin/sflistview/getting-started should be updated to reflect the requirement for Android, that iOS doesn't seem to have.
Thanks for your update,
We are glad that you have achieved your requirement. we will modify the change in UG and the changes will be included in our Volume 3 Service pack 2 which is expected to be rolled out by the end of September 2017.
Regards,
Eswaran AT.
The sample you provide does not work. No images are rendered. Try downloading the sample and building it form scratch then running on an Android device or emulator. You get a blank screen because the DataSource Binding is not pulling in the source collection correctly. The Binding context and the Data source properties are being set correctly and it works correctly on iOS, so the bug must be in your SFCarousel Renderer for Android. If the data source is set to a local collection in the code behind, rather then bound using data binding, then it renders correctly.
This bug makes this control completely unsuitable for any project using MVVM. As Xamarin.Forms is designed to use MVVM, it is useless for use with Xamarin.Forms.
In addition, much of your basic documentation and NuGet information is incorrect. For example, the latest version of the control 15.3.033 states that it has a dependency on Xamarin.Forms >= 2.3.3.180. Whilst this may the the case in terms of build compatibility, running it with XF 2.3.3.180 on Android causes a crash when it tries to render.
The very basic nature of this bug, and the lack of clarity on compatible versions, suggests poor quality control and lack of testing. I cant therefore recommend using your product in production for client projects.
Thanks for your update.
We are unable to reproduce the reported issue “Running SfCarousel with XF 2.3.3.180 on Android causes a crash” from our side. Our SfCarousel control completely supports the MVVM Pattern. We have prepared a sample using the MVVM Pattern and we have also prepared a video demonstrating the carousel control. Please find the sample and video from the below link.
Sample Link: http://www.syncfusion.com/downloads/support/forum/132677/ze/CarouselTester11733123456
Video Link: http://www.syncfusion.com/downloads/support/forum/132677/ze/device-2017-11-13-113604-1783535075
If you still face issues with SfCarousel in MVVM, please revert us with issue reproducing sample. This will help us to provide appropriate solution on this.
Regards,
Eswaran AT
- 5 Replies
- 4 Participants
-
JL J Lundgren
- Sep 15, 2017 04:34 AM UTC
- Nov 13, 2017 09:47 AM UTC