question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doubletap/click couses trouble on Android.

See original GitHub issue

Problems 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.

exception

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danielkatzcommented, Oct 24, 2018

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.

0reactions
oddbearcommented, Oct 24, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found