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

Force Cell Layout Calculation

1 Answer 305 Views
ListView
This is a migrated thread and some comments may be shown as answers.
IanV
Top achievements
Rank 1
Veteran
IanV asked on 08 Jan 2019, 09:40 PM

We have a problem with only the Android version, iOS is fine.

 

On a very complex Cell UI and using a Selector, often the Labels are rendered 1 letter wide. Rotating the device Landscape then Portrait causes a refresh and the labels render fine. Pull-to-refresh will also often fix the issue. The initial render fails.

 

How can I force the RadListView to recalculate the layout of the cells so that the Labels redraw. I can do that in a timer after the data is loaded. A work around.

 

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 11 Jan 2019, 12:14 PM
Hello Ian,

We've been reported a similar issue with inaccurate measurement of ListView items on Android, you could find the bug report on our public portal below:
https://feedback.telerik.com/xamarin/1366399-listview-android-inaccurate-measure-when-pull-to-refresh-is-enabled

If that's not the case you have, can you try to isolate the issue in a sample project and send it to us? We will need to reproduce the issue at our side in order to test it and investigate it further.

As to the question about forcing cell layout update - If the ItemsSource of the RadListView is bound in TwoWay mode and the underlying collection is ObservableCollection, the ListView component should be automatically updated whenever the collection changes.  So, basically, you could use this approach to recalculate the layout.

I am looking forward to your reply.

Regards,
Yana
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
ListView
Asked by
IanV
Top achievements
Rank 1
Veteran
Answers by
Yana
Telerik team
Share this question
or