xamarin/Xamarin.Forms

[Android] list views' HasUnevenRows not working properly

Ouverte

#3 427 ouverte le 28 juil. 2018

 (2 commentaires) (0 réaction) (0 personne assignée)C# (1 926 forks)batch import
a/listviewe/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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

Guide contributeur