Doubletap/click couses trouble on Android.
See original GitHub issueProblems with double click/tap on binded navigation commands.
Ex.
public Command AddContact {
get {
return new Command (async () => {
await CoreMethods.PushPageModel<ContactPageModel> ();
});
}
}
Can be reproduced in the FreshMvvmSampleApp.Droid project on Nexus 5 (lollipop) emulator (mac os x).
“Basic Navigation” -> 2x click on Quotes. Opens the Quotes page 2 times. Two pages is put on the stack, before the application navigates to the one of them. (I have the same problem on my testapp on a physical Nexus 5X)
Clicking on the ADD button (ex. on Master detail page) like a maniac, crashes the app with NullReferenceException.
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
How to resolve double tap on Button Issue in android?
2. synchronize the onClick, and disable your button by setEnabled(false) on first click, and setEnabled(true) onResume. – Chor Wai Chun. May 21, ...
Read more >How to Turn Off Double Tap on Android? (3 Minute Read)
Open the App Drawer. · Tap "Settings". · Go to "Advanced Features". · Select "Motions and gestures" from this list. · Near the...
Read more >How To Turn Off Double Tap on Android
Here is the step-by-step process to disable the double tap feature in an Android phone. Go to your app screen. Click Settings >...
Read more >How Do I Turn Off Double Click on Android?
How to turn off double click on Android? This common problem can be fixed in two ways – by using the DTSO app...
Read more >Touchscreen Oversensitivity (like unwanted double taps)
3 ZVJ Rom) on my Optimus S, and my touchscreen is often registering a double tap when I did not double tap. It's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think that it’s better to generalize the problem for disabling the command during any async process by implementing AsyncCommand. There are several implementations of this pattern, we used this as a base for our solution.
@danielkatz Nice. This seems like a great solution, and actually quite similar to the PR.
It has a interesting approach to solve the “sharelock” issue also (through the ExecuteSubmitAsync, CanExecuteSubmit), that is, if you press one button, then immediately another button. Therefor a shared state between the commands is needed to not allow this.
I guess the biggest difference would be that the AsyncCommand is more Xamarin.Forms focused, and probably easier and more familiar to work with. While the approach in the PR is probably easier if you need that extra level of control, or also use it outside of XF.