New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ListView: avoid that disabling RefreshAllowed cancels refresh indicator on Android, fixes #8384 #14816
Conversation
indicator on Android, fixes xamarin#8384 RefreshAllowed is bound to ListView.RefreshCommand.CanExecute(). Often an implementation of RefreshCommand might update its CanExecute status after execution starts. This caused ListViewRenderer to immediately disable the SwipeRefreshLayout, thereby cancelling the refresh/activity indicator on top of the list view. The solution is to NOT disable it while refreshing, but waiting for the next chance when current refresh activity/command is done.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hey @cpraehaus! Thanks so much for this contribution and your very first, wow! Hope your experience was good :) I will make sure to have a look at this asap! |
Oops seems like there is a build error, would you be able to fix that?
|
…UI unit tests) Otherwise we get 'InitializeComponent' not found error when compiling UI unit test projects.
@jfversluis Thanks for the nice feedback and the hint - build should be fixed now. Didn't have a hard time to delve into XF details since I'm working with it for quite a while now. Mostly as user of XF of course - but from time to time you want/need to look into the details/code as well :-). Since I'm submitting issues myself I thought its time to contribute and help to (hopefully) reduce the number of issues in the backlog ... |
Azure Pipelines successfully started running 1 pipeline(s). |
Appreciate the help @cpraehaus and thanks for sharing! I see a lot of similarities with how I started :) Let me know if you need anything! |
Description of Change
RefreshAllowed is bound to ListView.RefreshCommand.CanExecute(). Often an implementation of RefreshCommand might update its CanExecute status after execution starts, e.g. to disable button when action starts. This caused ListViewRenderer to immediately disable the SwipeRefreshLayout, thereby cancelling the refresh/activity indicator on top of the list view.
The solution is to NOT disable it while refreshing, but waiting for the next chance when current refresh activity/command is done.
Issues Resolved
API Changes
None
Platforms Affected
Behavioral/Visual Changes
None
Before/After Screenshots
Not applicable
Testing Procedure
Launch Xamarin.Forms.ControlGallery.Android and navigate to issue 8384. Follow the steps there to test the issue.
PR Checklist