xamarin/Xamarin.Forms

[Bug] CollectionView EmptyViewTemplate not resizing accordingly when using WindowSoftInputModeAdjust.Resize

开放

#6,850 创建于 2019年7月10日

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

仓库指标

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

描述

Description

CollectionView provides an EmptyViewTemplate to deal with empty datasource. However, when using WindowSoftInputModeAdjust.Resize (i.e., Android only), the provided EmptyView won't resize accordingly.

Steps to Reproduce

  1. Create a new ContentPage.
  2. Add a SearchBar.
  3. Add a CollectionView with some random ItemsSource and provide a EmptyView / EmptyViewTemplate.
  4. Add some logic to handle Searchbar input and update the ItemsSource of the CollectionView.
  5. Run the application.
  6. Focus on the Searchbar and type anything that will result in empty data source.
  7. The EmptyView is correctly rendered, filling the available space.
  8. Now, unfocus the Searchbar (i.e. hide the keyboard). The EmptyView won't resize.
  9. If you focus again on the Searchbar (i.e. show the keyboard), the EmptyView will then be resized and fit all the screen and part of the EmptyView will be under the keyboard.

Expected Behavior

The provided EmptyViewTemplate should be resized to fill all the available space.

Actual Behavior

The provided EmptyViewTemplate is not resized.

Basic Information

  • Version with issue: 4.1.0.581479
  • Platform Target Frameworks:
    • Android: 9.0

Screenshots

20190710_145550

Reproduction Link

CollectionView Resize Issue.zip

贡献者指南