Mouse events on overlay image interfering - events

I've added a few overlay images which I'm using as buttons/control for showing / hiding some custom layers and this works fine, however they still trigger the usual drag/move events on the map. This isn't that bad but when you go into street view and you click on on of these (the buttons are on the left of the screen) the camera shifts it's view to the left which is going to be very annoying for the users.
Just wondered if someone has encountered this and have advice? I guess I can move the buttons out of the maps area completely but it looks really nice on the map with the standard controls.
Thanks a lot!

Related

In React Native, Can I bind swipe/scroll of a SectionList to another View

I have a SectionList which scrolls/swipes vertically. Can I bind a swipe gesture on it, so that it results in swiping a completely separate View which is behind it? Furthermore, is there an example someone could lead me to, in which a swipe gesture on a SectionList is bound to the animation of another object or objects? Here is a good example of what I am trying to achieve:
When the view is scrolled vertically in the example above it causes a menu to animate in from the top. That is close to the desired effect I'm seeking. I'd also love to know how to achieve that rotational animation tied to the horizontal swipe. I'm thinking that I will likely need the Animated API for this kind of behavior. Any tutorials or code examples you have would really help.

Why can't whatever UIButton in the bottom left corner of the screen show its highlighted state?

Why can't whatever UIButton in the bottom left corner of the screen show its highlighted state?
I added another post a second ago while I was more confused about the issue and quickly got voted down. After more research, I have no clue what is causing this issue still...
The image on the left is what I want to be working, and the one on the right is the closest I have gotten to placing the images in the right spots while they still highlight.
As you can see, I have the buttons all aligned closer than the margin to the edge of the screen at 0 points away. All of the buttons correctly show their highlighted state when pressed except for the one on the bottom left. I have placed them inside a stack view, and tried multiple constraint layouts while shuffling the buttons around. Whichever button is on the bottom left won't highlight.
When I say highlight, the 2nd button in the image is highlighted. There is no UIViewController subclass attached to this storyboard view controller. Only the default state has any imagery attached to it (this is all that is normally required to get the darker highlight version automatically), and each button has both a background image and a main image.
After hurting my brain trying to figure out what was causing the issue I realized that I should have used more troubleshooting techniques before jumping to conclusions.
On my device the bottom left corner of the screen is barely touchable. The phone has had avid use being tested on by myself, and apparently the edges of the screen become less sensitive, especially with a screen protector on.
What I should have done...
Test the bug out in a brand new project to ensure that I am aware of the conditions causing the problem.
Test the project on a different device or simulator.
After doing both of those, I was guarenteed to find my solution to a bug that was very different than I am used to finding, and I will try my best to always use these techniques on future bugs before bothering all of stack overflow with a problem that they will never be able to diagnose.
Using the simulator revealed that my phone was having issues, and I will replace my phone in a couple weeks while continuing to work on my projects in the mean time!

Page animation with visual feedback on drag gesture

I was wondering, I'm currently using a slide in and out page transition when the user presses a Next of Previous button on the appbar.
( concept: going through a set of articles inside a selected category )
This all looks great, I'm also able add the drag / flick gesture listeners to trigger this page transition... so no problems there.
But now I wanted to add the final part, when the user starts the drag / flick gesture, show this visually so that the page follows the gesture and 'slides' out of frame.
But how to do this? An example would be great :)
But there is also a small extra thing, I don't want the user to always do a full drag... so if we are over 2/3 of the screen, auto start the page transition IF the gesture stops ( so the user lifts up his finger )
So I would like to create a nice reading experience that shows the gesture visualy and performs the page transition...
You can check the following link: https://stackoverflow.com/a/9915016/1565574
In the ManipulationCompleted you'll be able to detect the GestureType and take an action there.
And I found that link: https://stackoverflow.com/a/4342558/1565574 (using the GestureService)
I first started with the DragFlickBehavior from #LocalJoost and it actually worked great!
But in the end I switched to a headerless pivot! Works also great!

Drawing on an image which is inside a QScrollArea?

If I subclass QLabel and I add a QLabel directly to my QDialog, it works fine. If I add this label inside a ScrollArea, the thing I’m drawing doesn’t show unless I resize the dialog itself. Yes, weird.
I’ve setup compilable example code that indicates what the problem is. What I am trying to do is to select an area of an image with my mouse, by drawing a rectangle on the corresponding area. The images my program is designed to work with can be very large, and thus, I need to have a scroll area so as the dialog to stay at a logical dimension, and not to fill the entire screen (or even multiple workspaces, if we are talking about a linux machine with multiple desktops).
Everything works fine, except that the drawing (selection-rectangle) isn’t visible unless the dialog is resized – manually. I think I have to update something while drawing, but I’m not sure what. Well, here’s the example code: http://paste.ubuntu.com/1151553/
Another issues that I don’t know how to solve (and I want your suggestions there) are (1) when the user is selecting an area, how to set it to automatically scroll when the user actually selects an area by pushing against to a wall of the scroll area (I guess I am understandable here). (2) is there a way to let the user select a rectangle and then, when he left-clicks on a position with holding down the [Shift] button, the bottom right edge of his previous selection to actually go through the point he clicks at?
The documentation indicates that you have to set a Layout somehow somewhere, but I'm not sure how to do this to my occassion.
Thanks in advance for any help.
about problem (1):
just use of Event. i think mouse Enter Event or Leave Event is good for that.
and to do that i think you can use a hidden rectangular that fill the whole of the screen.
and over write the mouse leave Event for that rectangular and tell in that function , to scroll the page.

handling issue with listbox in a pivot

I'm working on a app in which I used a listbox inside a pivot control just like the outlook app does. The problem is sometimes when I scroll the list, a swipe gesture is triggered and it goes to another pivot item. This is very annoying, and it seems doesn't happen to the outlook app. Am I doing something wrong? How do I fix it? Thanks a lot.
If you're just using the default controls in the default way then you're not doing anything wrong in your code.
You haven't said if you're getting this on the emualtor or on an actual device. I find I sometimes do this on the emulator if holding the mouse at a slight angle or on an actual device if holding that in a funny way (such as when lying down).
Whether you scroll the listbox or the pivot will depend on whether your finger (or mouse-if using the emulator on a non touch-screen PC) first moves vertically or horizontally after first touching the screen. In my experience the scenarios described above can lead to this not always working as expected but I've never seen an issue with this on a real device being held in one hand and scrolled using a thumb.

Resources