This repository has been archived by the owner on May 1, 2024. It is now read-only.
[Bug] ListView RefreshCommand ActivityIndicator does disappear on Android if CanExecute is changed to false #8384
Labels
e/5 🕔
5
help wanted
We welcome community contributions to any issue, but these might be a good place to start!
inactive
Issue is older than 6 months and needs to be retested
p/Android
t/bug 🐛
up-for-grabs
We welcome community contributions to any issue, but these might be a good place to start!
Description
A Command is used in a ToolbarItem.Command and in a ListView.RefreshCommand. The Command starts a Bluetooth discovery and is disabled (CanExecute returns false) while the discovery is running.
In case the command is executed via ToolbarItem the ActivityIndicator appears on screen.
In case the command is executed via ListView.RefreshCommand(PullToRefresh) the ActivityIndicator disappears when CanExecute is changed to false.
It looks like ListView.RefreshAllowed is set to false
and this causes SwipeRefreshLayout.Enabled = false
From Xamarin documentation:
Is that the desired behavior? If yes, why do I need additional properties IsPullToRefreshEnabled and IsRefreshing?
I think CanExecute should be checked to avoid executing a Command twice but the ActivityIndicator should not disappear. For this logic we have the IsRefreshing property.
My current workaround:
Steps to Reproduce
Expected Behavior
ActivityIndicator is visible
Actual Behavior
ActivityIndicator is not visible
Basic Information
Screenshots
Reproduction Link
The text was updated successfully, but these errors were encountered: