You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My app has a page that allows users to adjust the settings. But the settings will expire in 1 minute. After that, the cells will be greyed out and not allow to be configured.
The problem happens that when the user navigates to this page, one of the picker cells is enabled, though the flag is false. But after scrolling down and up again, that picker cell becomes disabled. Therefore it is suspected that there is some caching issue when reflecting the isEnabled status of the cell.
This only happens on iOS and does not happen on Android.
(For more Information, the picker cell "Recovery Detection Angle" and "Sensing Timer" are binding the same boolean in their IsEnabled properties. Therefore it should not be the program issue as if the flag is not updated properly, both cells would be enabled/disabled at the same time.)
Steps to Reproduce
Create a page with a SettingsView
Bind the isEnabled Flag of the cells to the ViewModels boolean properties.
Set the boolean properties to false in OnNavigatedTo() method.
Navigate to this page, some of the cells that are supposed to be disabled are enabled.
Scroll down and up again, the cells now become disabled.
Platforms
Android
iOS
Basic Information
AiForms.SettingsView 1.3.28
Xamarin.Forms 5.0.0.2083
Video
iOS_isEnabled_Issue.mp4
The text was updated successfully, but these errors were encountered:
More information
For that problematic picker cell, I changed to isEnabled="False" such that it should always be disabled. But the problem persists that when just navigates to the page, the picker cell is still enabled. Once scroll down and back again, the picker cell becomes disabled.
The only difference between this problematic picker cell and other picker cells is that the ItemSource of the problematic picker cell updates dynamically. When the "Fall Detection Angle" value changes, the "Recovery Detection Angle" item source will update accordingly to the "Fall Detection Angle" value. Other picker cells' item sources are initialized in the view model constructor and will not changed.
I have found a workaround for this issue.
Currently the isEnabled is initialized in the method OnNavigatedTo because it is determined by the navigation parameter.
Since I use Prism.Forms, I can implement the IInitialize interface which its method Initialize(INavigationParameters parameters) is executed before OnNavigatedTo. After moving the codes from OnNavigatedTo to Initialize, the picker cell state is now reflected properly when the page shows up.
Description
My app has a page that allows users to adjust the settings. But the settings will expire in 1 minute. After that, the cells will be greyed out and not allow to be configured.
The problem happens that when the user navigates to this page, one of the picker cells is enabled, though the flag is false. But after scrolling down and up again, that picker cell becomes disabled. Therefore it is suspected that there is some caching issue when reflecting the isEnabled status of the cell.
This only happens on iOS and does not happen on Android.
(For more Information, the picker cell "Recovery Detection Angle" and "Sensing Timer" are binding the same boolean in their IsEnabled properties. Therefore it should not be the program issue as if the flag is not updated properly, both cells would be enabled/disabled at the same time.)
Steps to Reproduce
Platforms
Basic Information
Video
iOS_isEnabled_Issue.mp4
The text was updated successfully, but these errors were encountered: