This is a migrated thread and some comments may be shown as answers.

Displaying Images, OK on Android, KO on Ios

3 Answers 98 Views
SegmentedControl
This is a migrated thread and some comments may be shown as answers.
Guittier
Top achievements
Rank 1
Guittier asked on 12 Feb 2019, 03:41 PM

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 ?

3 Answers, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 13 Feb 2019, 12:38 PM
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
0
Guittier
Top achievements
Rank 1
answered on 18 Feb 2019, 09:14 AM

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.

 

0
Didi
Telerik team
answered on 18 Feb 2019, 09:55 AM
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
Tags
SegmentedControl
Asked by
Guittier
Top achievements
Rank 1
Answers by
Didi
Telerik team
Guittier
Top achievements
Rank 1
Share this question
or