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

RadListPicker adapting item problem

2 Answers 164 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 08 Oct 2020, 08:25 AM
Hello
I have a problem in using RadListPicker, I use telerik ui R3 2020.3.916.1 version for xamarin.
When I use the ListPicker the objects inside the list do not fit on ios while on android they do, for example if my item is very long it is cut and does not allow you to read it all.
The problem occurs exclusively on IOS, I noticed in the forum that some users had reported the same problem on the ListView component and that this had been solved with an update, at the moment I have updated telerik to the latest version available but the problem is not solved .
What can I do?
Thanks bye.

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 09 Oct 2020, 11:19 AM

Hello Federico,

I have checked the default setup of RadListPicker and indeed, on iOS, the item's text is not wrapped - this is due to the different rendering on iOS with bigger fonts. You can quickly resolve it by setting ItemLength property of the control - you would need to adjust the item length, so that two rows to be visible. Here is a quick example:

<telerikInput:RadListPicker Placeholder="Pick a name!" Grid.Row="1" 
                ItemsSource="{Binding Items}" 
                DisplayMemberPath="FullName"
                ItemLength="44">
    <telerikInput:RadListPicker.BindingContext>
        <local:ViewModel/>
    </telerikInput:RadListPicker.BindingContext>
</telerikInput:RadListPicker>

 I've also attached a runnable example for a reference.

On a side note, ListPicker is a different control than ListView and any updates on the ListView are not applicable to ListPicker.

I hope I was of help.  Let me know if I can assist with anything else.

Regards,
Yana
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Federico
Top achievements
Rank 1
answered on 12 Oct 2020, 07:31 AM

Problem solved, thanks for the support.

Regards.

Tags
ListPicker
Asked by
Federico
Top achievements
Rank 1
Answers by
Yana
Telerik team
Federico
Top achievements
Rank 1
Share this question
or