10-26-2012 11:28 AM
First, I just find that samples run fine but as soon as I try to create a real app with QML by for instance combining samples they just don't work.
onTouch is sent for some ImageViews and not others. I have systematically tried to isolate problem but cannot see any difference in code. Went back and created a separate app with an ImageView in a separate QML file and imbedded in main several of this ImageView several times. In my test each ImageView responds to touch (click in emulator) and I know this because I rotate image. I also changed image as well.
So then I went back to my original app, copying the code that just worked (I copied QML file etc etc) into container A.
But the same problem occured again with images. Only the first image still rotated, none of the other images received onTouch (I also displayed message on log). So I get two onTouches for Image at positionX and none for rest of images. (By the way had them all vertical in positionX and they worked).
The same ImageViews in Container B all respond to onTouch. This was original problem A except for positionX 0 do not respond. B all respond.
Copied one image from A to B and one Image from B to A.
The original B image responds as usual in Container A and the original A image does not respond in B.
Actual image makes no difference positionX or PositionY makes no difference. Code is same except for id/objectName and positionX & Y in each imageView.
changing propogation makes no difference except when none no imageViews receive on Touch. Setting progration for container A also applied to B.
I get message "Context: Failed to find target node with id xx" for each imageView instance but this has no effect on whether onTouch even is received.
10-29-2012 11:37 AM
Further information. I made some changes moving ImageViews out of container and everything appeared to be "now" working ok. Then, I wnet back and trued to correct slider, labels and toggle button that were not displaying porperly. And lo and behold the same issue occurred. Only now the onTouch is only sent to the last ImageView in the line. Before it was the first ImageView on the line.
Definitely the onTouch is not being sent to the ImageView as all ImageViews are defined with the same QML object on both lines so I know the onTouch is not being sent.
Has anyone experienced this problem of onTouch's not being sent or that they start stop as changes are mode to the UI?
11-05-2012 07:44 AM
I experience also an issue with touch and imageView:
I catch the onTouch only if I touch the first 100px and the last px. If I touch the middle of the image, no event is fired.
11-05-2012 12:14 PM
I reported an issue where the touch events do get fired for controls that have not really been touched. For example - toucing to the left of the control will trigger onTouch event with negative X coordinate. I wonder if this has something to do with that.
Other than that - take a look at TouchPropagationMode. This will allow you to control how the touch is propagated if you have controls that sit on top of each other.
It is possible that some other transparent object is covering your imageView as well.
12-11-2012 04:01 PM
I have a similar problem. I have a series of imagebuttons and have a container with an absolute layout which is used to position text on the imagebuttons. The problem is that none of the buttons now respond to taps. If I remove the container with absolute layout, it works fine.
I have tried setting TouchPropagationMode for the container but no joy. Can you please help?
12-11-2012 05:00 PM
First, I gave up on any layout but absolute because the others were unpredictable. I lost flexibility but could make sure layout was as I wanted.
Then, I gave up on ImageButtons in those containers. They work else where.
I use ImageView with onTouch with if (event.isDown) to respond.
I have currentImage, defaultImage, pressedImage, and disabledImage file for each for each one which.
In some cases, I took a screen dump with the buttons before I replaced them and cut the ImageButton and turned it into its own png file in paint.Net.
A little bit or work but not impossible - took me half a day to create images and program and haven't had a problem since. Of course, I have not tested with the "Gold" version yet
12-11-2012 11:52 PM
I ran into the issues with docked overlapped images not passing onTouches along. They only solution I found was to use TapHandlers (Gesture Handler) to capture the presses.
12-16-2012 01:27 PM
I've been able to repoduce this bug in a lot of circumstances - and it has some annoying effects - like not letting cotext handlers function.
You can vote or watch this issue here.