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. Image for the cookie policy date
close icon

I have included SfCarousel library in my xamarin.android native app but was unable to see the images scattered

I have following part of code of fragment but was unable to see the carousel sliders scattered and selected one in center.


            View rootView = inflater.Inflate(Resource.Layout.DashboardTabLayoutNew, container, false);
          
            LinearLayout linearLayout= rootView.FindViewById<LinearLayout>(Resource.Id.linear_layout);
          
            SfCarousel carousel = new SfCarousel(this.Context);
            
         
            List<SfCarouselItem> items = new List<SfCarouselItem>();

            for (int i = 0; i <= 5; i++)
            {
                ImageView imageView = new ImageView(this.Context);
                imageView.SetImageResource(Resource.Drawable.ic_news1New);
                SfCarouselItem itemImage = new SfCarouselItem(this.Context);
                itemImage.ContentView = imageView;
                items.Add(itemImage);
            }
            carousel.DataSource = items;
          //  carousel.ItemWidth = 170;
          //  carousel.ItemHeight = 250;          
            carousel.RotationAngle = 45;
            carousel.Offset = 30;
           // carousel.SelectedItemOffset = 5;
            carousel.SelectedIndex = 2;
            //  carousel.ScaleOffset = 0.7f;
            // carousel.ItemSpacing = 5;
            // carousel.ViewMode = ViewMode.Linear;            
        
            linearLayout.AddView(carousel);
            return rootView;

3 Replies

RB Rabhia Beham Kathar Mideenar Syncfusion Team August 28, 2017 09:13 AM UTC

Hi Ishwor Khanal, 
Thanks for contacting Syncfusion Support.

Query: I have included SfCarousel library in my xamarin.android native app but was unable to see the images scattered.

The reported issue has been checked with our latest Syncfusion assemblies (15.3451.0.26). We were unable to reproduce the reported issue at our end. We have created a sample based on your code example. Please download the sample from below link

Link: http://www.syncfusion.com/downloads/support/forum/132339/ze/CarouselSample_(2)778642491 
  
We have attached a screenshot that was captured while testing the provided sample which is available in the below link. 
  
 Please have a look at the sample and if the issue still persist, update us the modified sample to analyze further and provide the solution.

Regards,
Rabhia Beham K.  
  
  



IK Ishwor Khanal August 29, 2017 04:37 AM UTC

Thank you for your quick reply. I really appreciate that. I will have a look and let you know.



ET Eswaran Thirugnanasambandam Syncfusion Team August 30, 2017 01:42 PM UTC

Hi Ishwor Khanal, 
  
Thanks for your update. 
  
We will wait until hear from you. 
  
Regards, 
Eswaran AT. 


Loader.
Live Chat Icon For mobile
Up arrow icon