Skip to content

Grid rows in DataTemplate with no visible content affect layout in Android ListView #1473

Closed

Description

@peternary

Current behavior

Grid rows that contain either a collapsed control or no control still appear to reserve space in a ListView datatemplate, shrinking available space for content-containing rows.

Expected behavior

Empty/unused grid rows should not reserve any space, as in UWP.

How to reproduce it (as minimally and precisely as possible)

In the attached project, launch in Android - the first listview has content visibly cut off, while the second listview displays its content fully. The only difference is the first datatemplate's extra Grid rows containing collapsed controls.
App14.zip

Environment

Nuget Package:
Uno.UI
Package Version(s):
1.46.216-dev.2608
Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • Windows
  • Build tasks

Visual Studio

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    on Sep 4, 2019
  2. added
    platform/android 🤖
    on Sep 4, 2019
  3. removed
    triage/untriaged
    on Oct 9, 2019
  4. MakanWG commented on Oct 9, 2019

    @MakanWG
    Contributor

    The collapsed controls don't seem to change anything to the issue.
    Using the provided sample project, I noticed that the empty RowDefinitions are enough to replicate the issue : The ListViewItems are still kind of shrinked if you remove the Textblocks.

    So investigating more about those I found in the documentation that RowDefinitions have a default Height of 1* and not 0.
    This may be the cause of this issue.

    A quick workaround would be to set the RowDefinitions Height to Auto so that they will forcefully be at 0 Height when they have a collapsed Content.

  5. modified the milestone: 3.1 on Aug 29, 2020
  6. added
    project/items 🧾
    and removed on Sep 21, 2020
  7. added
    area/grid
    on Oct 8, 2020
  8. added
    difficulty/tbd
    on Feb 15, 2021
  9. added
    difficulty/starter 🚀
    and removed
    difficulty/tbd
    on May 31, 2021
  10. carldebilly commented on Jun 1, 2021

    @carldebilly
    Member

    This issue is not present anymore in Uno.UI 3.7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/griddifficulty/starter 🚀kind/bugplatform/android 🤖project/items 🧾

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions