RadListPicker adapting item problem

3 posts, 0 answers
  1. Federico
    Federico avatar
    2 posts
    Member since:
    Sep 2020

    Posted 08 Oct Link to this post

    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. Yana
    Admin
    Yana avatar
    5002 posts

    Posted 09 Oct Link to this post

    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).

  3. Federico
    Federico avatar
    2 posts
    Member since:
    Sep 2020

    Posted 12 Oct in reply to Yana Link to this post

    Problem solved, thanks for the support.

    Regards.

Back to Top