Closed ImAnnoying closed 8 years ago
Confirmed, and it's annoying. It's weird because it doesn't happen with app shortcuts or tabs, and they both use the same method for registering to the event.
This question leads to a possible solution, but requires another class to be implemented not to make the code messy.
I had to override a the onInterceptTouchEvent
method of AppWidgetHostView , in this file, so that all long clicks would register on the root HostView and not the widget itself. Without this, long pressing the widget to change it would not work.
I suspect that this is where the problem is.
Also I noticed that it does not trigger widget replacement every time, but every other time. Try with the photo gallery widget for example. The first swipe won't do anything, the second swipe will scroll to next picture and trigger the widget replacement.
Maybe we could store the X and Y coordinate and use that as a threshold. Let's try it!
I think I fixed it, anyone else up for testing?
Test the lastest version of the master branch
@stanipintjuk, sometimes Change widget
still fires when sliding on a placed widget.
Edit: See -link removed-. Edit 2: Sorry I forgot to turn on "Show finger" under development stuff. Oops! Edit 3: Deleted gif from imgur, since it's no longer relevant (and link wouldn't work here anymore).
Really? Could you provide some instructions to replicate?
I just swipe from the left to the right while holding my finger on the widget. And it triggers! See the animation I posted on my previous comment.
It doesn't happen on neither of my phones. But I only tried with the messaging and photo gallery widget. Maybe I should try with the one you are using. What is it called?
It's "Cameras", a Sony specific widget I think. Where can I find your widgets? I don't have the default photo gallery widget
My widgets came preinstalled with cyanogenmod. I think they are default in AOSP so you should have them.
But does this happen on all of your widgets or only on the "Cameras" widget?
I'll try some more later and let you know. But it doesn't happen always either as you see in the GIF
I think it only happens if I swipe on an area which is not occupied by the widget, i.e. on the corners. However, I've now tried the email widget and when I long click on an email item, the select widget doesn't trigger always. Only sometimes. Probably the on movement is very very sensitive.
But with the Google Play widget I'm able to slightly swipe to the app drawer and it still triggers the widget selector.
With some widgets such as the Stamina mode on Sony, it triggers with a single tap! (recorded a video, will upload as a gif when I get the chance).
I think it only happens if I swipe on an area which is not occupied by the widget, i.e. on the corners.
Can confirm. The easiest way to try this is probably with the firefox widget becase it leaves a lot of space in the corners.
I've now tried the email widget and when I long click on an email item, the select widget doesn't trigger always.
Can also confirm.
But neither of these are really big issues.
With some widgets such as the Stamina mode on Sony, it triggers with a single tap!
Cannot confirm because I don't have any of those widget, but if this is the case then this is a more serious issue. I can reopen this thread if you want to
Yeah, the first two aren't that big of a deal. And the third case is a different issue, so world, here I come!
When scrolling through, say, Slide or Chanu's widgets, it will scroll it, but also trigger the widget selection menu.