01-25-2013 09:18 AM
I have a customcontrol that uses OnTouch() to detect a swipe from left to right, the trouble is I have to disable peek to stop the peek functionality from happening inadvertently (not desirable).
I've messed around with Touch Policies but can't seem to get it to work and I'm starting to suspect that the OS peek gets the signal first thus locking me out from affecting it.
On the other hand I can't believe it's not possible, does anyone have some example code of how to stop this happening?
As a side observation why does peek have to work from any left to right swipe? Why not just bezel to right?
01-25-2013 01:08 PM
01-25-2013 04:41 PM
Thanks for your answer wasn't aware of this differentiation.
I still feel that more programmatic control is needed over this feature.
01-25-2013 04:45 PM
01-30-2013 05:26 PM
Thanks I was aware of this and am disabling it in QML at the moment.
I would like my users to be able to use this feature however so I really need an example of someone implementing onTouch in a CustomControl which does not effect Peek?
02-05-2013 06:17 AM
I'm not surprised there's no answer as even Cascade controls don't cope well.
Try this simple example and you'll see that scrolling left to right is broken, peeking to the previous screen instead of scrolling.
ListView {
dataModel: XmlDataModel { source: "models/recipemodel.xml" }
layout: StackListLayout {
headerMode: ListHeaderMode.None
orientation: LayoutOrientation.LeftToRight
}
listItemComponents: [
ListItemComponent {
type: "recipeitem"
ImageView {
rightMargin: 6
bottomMargin: 6
imageSource: ListItemData.image
}
]
}
02-05-2013 06:19 AM
If BlackBerry want developers to use Peek can we have a solution to this problem.
Thanks.
02-21-2013 12:32 AM
No response so I've submitted as bug.
https://www.blackberry.com/jira/browse/BBTEN-811
An example of this is that BlackBerry world suffers with this issue, on a dev alpha or z10 in BlackBerry World select an app with screenshots. Scroll the screenshots to the right then back to the left the obvious intention is to scroll back to the first screenshot instead peek is invoked and you end up on previous screen.
02-21-2013 01:42 AM
02-21-2013 05:23 AM - edited 02-21-2013 05:33 AM
xtravanta wrote:
Is it a option to disable it on touch and enable on touch up or cancel ? This is what I did to fix it..
My customcontrol is in C++ and the navigation page to control peek 2 pages back all in QML.
To do this I'd need to pass a variable on the navmain page through two pages and in to a property for the custom control so possible but incredibly yucky.
Why should a custom control have knowledge of what layout environment its in (several containers up), its bad programming.
AFAIK what's missing is a way of simply turning it on and off within C++?
Blocking the signal to peek would do this but I can't find this in any of the documentation.
Did your solution get around this?
If we are all having to write workarounds for this then it warrents calling it a bug.