xamarin/Xamarin.Forms

[Android] ViewCell Enabled not updated with IsEnabled Binding

Open

#4,590 opened on Nov 30, 2018

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

Repository metrics

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

Description

Description

Similar to this isssue https://github.com/xamarin/Xamarin.Forms/issues/4424 I have the bug that the IsEnabled property for the ViewCell is not being updated properl and cells are stuck and cannot get updated anymore.

Steps to Reproduce

  1. Download the sample bewlo
  2. Edit the mentioned file
  3. Open the About Page
  4. Disable Some Options
  5. Go to the Browse Page
  6. Go back to the About Page
  7. Enable some Options again.
  8. At least one option will normally get stuck and cannot get reenabled.

Expected Behavior

The Cells and Switch should get enabled again

Actual Behavior

Nothing happens, the switch is stuck at disabled state.

Basic Information

  • Version with issue: 3.3.0.912540
  • Last known good version: Dont know
  • IDE: Visual Studi 2017
  • Platform Target Frameworks:
    • Android: 8.1
    • UWP: Nuget 6.1.5, 16299
  • Android Support Library Version: 27
  • Nuget Packages: None
  • Affected Devices: None

Reproduction Link

The example from https://github.com/xamarin/Xamarin.Forms/issues/4424 can be used. Just do a quick edit in the Aboutpage.xaml:

<ViewCell IsEnabled="{Binding Visible}">
                    <StackLayout>
                        <StackLayout>
                            <Label Text="{Binding Title}"></Label>
                            <Switch IsToggled="{Binding Modified}" IsEnabled="{Binding Visible}"></Switch>
                        </StackLayout>
                    </StackLayout>
                </ViewCell>

The zip file below must be edited as well! StackLayoutVisibleBug.zip

Contributor guide