Displaying Images, OK on Android, KO on Ios

4 posts, 0 answers
  1. Guittier
    Guittier avatar
    5 posts
    Member since:
    Mar 2014

    Posted 12 Feb Link to this post

    Hello,

    I'm using a SegmentedControl in a Content View :

    <telerikInput:RadSegmentedControl Grid.Row="1" HeightRequest="50" HorizontalOptions="Center" VerticalOptions="Center"
                                                  ItemsSource="{Binding LargeImages}"
                                                  SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}"
                                                  AutomationId="ImagesSegmentedControl">
                </telerikInput:RadSegmentedControl>

     

    On my ViewModel : I initialize the LargeImages collections as in the QSF samples.

    this.LargeImages = new ObservableCollection<ImageSource>()
                        {
                            CreateImage("zero2.png"),
                            CreateImage("on.png"),
                            CreateImage("pendule.png")
                        };
     
    private static ImageSource CreateImage(string name)
            {
                if (Device.RuntimePlatform == Device.UWP)
                {
                    name = string.Format("Assets/{0}", name);
                }
     
                return ImageSource.FromFile(name);
            }

    When displaying on Android, all the images keep there original scale.

    On Ios, all the images are "distorted". 

    I make screenshot on a Android example and an Ios example. You can see that on Ios, it's not good.

    I there template options that i can use to make it work ?

  2. Didi
    Admin
    Didi avatar
    240 posts

    Posted 13 Feb Link to this post

    Hi Guittier,

    Thank you for the provided code and images.

    I have tested the scenario on iOS and I could not reproduce the issue with the images inside the SegmentedControl. Could you please give us more information on which iOS device and version the issue could be reproduced. Also, may I ask you to modify the attached project regarding your setup and send it back to me? In this way I could research it further. Please note that you should open a support ticket and attach the project there because in the forum only image attachments are allowed. 

    Thank you in advance.

    Regards,
    Didi
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Guittier
    Guittier avatar
    5 posts
    Member since:
    Mar 2014

    Posted 18 Feb in reply to Didi Link to this post

    Thanks for your answer. I finally find my mistake. 

    My images are too larges. On Android it resize the image to fit the segmentedcontrol but not on Ios.

    I change the images on my Ios projet and it works fine.

     

  4. Didi
    Admin
    Didi avatar
    240 posts

    Posted 18 Feb Link to this post

    Hi Guittier,

    I am glad to hear you have managed to solve the issue with the images.

    Let me know if you have any additional questions or concerns.

    Regards,
    Didi
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top