xamarin/Xamarin.Forms

[Bug] [Android] TableView ViewCell content enabled state has undefined behaviour

Open

#6,874 opened on Jul 15, 2019

 (1 comment) (0 reactions) (0 assignees)C# (1,926 forks)batch import
a/listviewe/4 :clock4:help wantedp/Androidt/bug :bug:up-for-grabs

Repository metrics

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

Description

Description

TableView ViewCell content enabled state shows undefined behaviour. Having multiple ViewCells with Entry elements in them alter the enabled state of each other. Probably some under the hood caching issue.

Steps to Reproduce

  1. use the attached exampple, that is a plain list of viewcells containing some EntryCells with Entrys set as IsEnabled == False
  2. scroll a viewcell (with isenabled == false) out of the screen, and the new one scrolling in will be disabled even though it is enabled!

(In the sample I set the top two entries to disabled, so scrolling down will cause some appearing bottom entries to become disabled. Scrolling back up sometimes also causes the disabled ones on the top to become enabled, rendering the tableview totally useless. You may need to adjust the number of viewcells to be able to see the onappearing misbehaviour.)

Expected Behavior

the views in different viewcells should have no effect to one another.

Actual Behavior

Basic Information

  • Version with issue: checked 2.4 through 4.1
  • Last known good version: never
  • IDE:
  • Platform Target Frameworks:
    • Android: tested with 8+

Repro

AndroidBug.zip

Contributor guide