xamarin/Xamarin.Forms

[Android] list views' HasUnevenRows not working properly

Open

#3,427 opened on Jul 28, 2018

View on GitHub
 (2 comments) (0 reactions) (0 assignees)C# (1,926 forks)batch import
a/listviewe/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

HasUnevenRows is supposed to be used only if the list view has rows on uneven height. However, it's not working on Android. You have to set it to true no matter what for the listview to work properly at all. This also means that you lose the functional difference between false and true: you cannot set a list view to have even rows and still function properly.

Steps to Reproduce

  1. Put a ListView on your page.
  2. Make sure the item is large enough, say, put three or four Labels vertically in a StackLayout.
  3. Don't set HasUnevenRows

Expected Behavior

All list items should be large enough to show whats in them.

Actual Behavior

The list items will be clipped, they will not grow to contain what the item layout calls for. If you set HasUnevenRows to true, the items will appear.

However, if you are forced to set HasUnevenRows to true, this will obviously instruct XF to have uneven rows. If you collapse something in the list item programmatically, the corresponding item will be smaller. There is no combination that allows you to have fully visible items and still have a uniform row height.

Basic Information

  • Version with issue: current ones
  • Last known good version: none
  • Android: 27.0.2.1

Link to previous mention

https://github.com/xamarin/Xamarin.Forms/issues/2093#issuecomment-408558310

Contributor guide