xamarin/Xamarin.Forms

[Android] list views' HasUnevenRows not working properly

开放

#3,427 创建于 2018年7月28日

 (2 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/listviewe/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南