Get total height of all rows

5 posts, 0 answers
  1. Ron
    Ron avatar
    18 posts
    Member since:
    Jan 2017

    Posted 05 Feb Link to this post

    I have a RadListView with uneven row heights that I need to place inside a ScrollView in Xamarin Forms. Due to scrolling issues (on Android) I need to set the overall height of the RadListView to show all the rows.

    How can I calculate the total height of all rows when they are dynamically sized according to their content?

  2. Tsvyatko
    Admin
    Tsvyatko avatar
    858 posts

    Posted 08 Feb Link to this post

    Hello Ron,

    You could get this length in android, however it will require adding a custom renderer and some platform specific code.
     
    Would it be possible to share the issues you are facing in Android with the list view, so we can check if there is an alternative aproach

    Regards,
    Tsvyatko
    Telerik by Progress
    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. Ron
    Ron avatar
    18 posts
    Member since:
    Jan 2017

    Posted 09 Feb in reply to Tsvyatko Link to this post

    Here are some more details. As it turns out, scrolling works fine for a RadListView in a ScrollView in Xamarin Forms for Android API 22. However, when I test on a device running Android API 19 (kitkat) the scrolling for the RadListView doesn't work. 

    So with no code changes, it works great for API 22, but it doesn't for API 19. What is the minimum API that the scrolling will work on?

  4. Ves
    Admin
    Ves avatar
    2914 posts

    Posted 14 Feb Link to this post

    Hi Ron,

    The required minimum API level for our controls is 15. However, putting scrollable content within scrollable content is generally not recommended and problems might arise. So the purpose of Tsvyatko's question was to actually get a better understanding of your scenario and see if we can provide a suggestion for alternative approach.

    Best regards,
    Ves
    Telerik by Progress
    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
  5. Ron
    Ron avatar
    18 posts
    Member since:
    Jan 2017

    Posted 14 Feb in reply to Ves Link to this post

    Hi, I found the answer in this Stack Overflow post:

    http://stackoverflow.com/questions/6210895/listview-inside-scrollview-is-not-scrolling-on-android

    The accepted answer is: "Starting from API Level 21 (Lollipop) nested scroll containers are officially supported by Android SDK."

    So, the RadListView is working great. It's just an underlying Android thing. From API 21 and above nested scrolling is supported.

    Thanks,

    Ron

Back to Top