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

Get total height of all rows

4 Answers 313 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Ron asked on 05 Feb 2017, 07:13 PM

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?

4 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 08 Feb 2017, 05:01 PM
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
0
Ron
Top achievements
Rank 1
answered on 09 Feb 2017, 10:56 PM

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?

0
Ves
Telerik team
answered on 14 Feb 2017, 01:49 PM
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
0
Ron
Top achievements
Rank 1
answered on 14 Feb 2017, 03:47 PM

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

Tags
ListView
Asked by
Ron
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Ron
Top achievements
Rank 1
Ves
Telerik team
Share this question
or