09-20-2012 05:00 PM
Is there a signal (or action) to capture double click (double tap) on a list item in a ListView?
09-20-2012 05:26 PM
double clicks on touch devices are not recommended
you should use TAP (== 1 click)
long-pressed for context menu is also OK, but you should also provide alternate ways for users not recognizing that long click works
09-20-2012 06:18 PM
I use doube tap as a shortcut. Here is simplified scenario:
I have a list with high level groups (countries)
When you tap an item (country) in the list it changes action menus in the nav bar to correspond to actions applicable to this country.
You can long tap to bring action menu, and select "show cities" which switches to another view which displays cities. There are other actions there as well which may be applicable to this country.
Hower when you double tap a country item its sort of like a shortcut to go to the list of cities directly.
I have such scenario in my playbook app and it works very vell (users feel its intuitive).
Would like to keep BB10 version consistent with PlayBook.
09-20-2012 08:36 PM
Hello there!
You can attach a doubletap gesture handler to each individual list item if you choose. It is basically the same as double click.
Here's the qml code
gestureHandlers: [
DoubleTapHandler {
onDoubleTap: {
// do something here
}
}
]
If you want to do this in c++, here's that code:
DoubleTapHandler *pDoubleTapHandler = DoubleTapHandler::create()
.onDoubleTap(pMyObject, SLOT(onDoubleTap(bb::cascades::DoubleTapEvent*)));
[replace this with listitem]->addGestureHandler(pDoubleTapHandler);
Check out http://cascadescode.tumblr.com I have tons more free code snippets, tutorials and posts on BB10 Cascades development.
Good luck on your app!![]()
09-21-2012 01:27 AM
Produktyf wrote:
I use doube tap as a shortcut. Here is simplified scenario:
I have a list with high level groups (countries)
When you tap an item (country) in the list it changes action menus in the nav bar to correspond to actions applicable to this country.
You can long tap to bring action menu, and select "show cities" which switches to another view which displays cities. There are other actions there as well which may be applicable to this country.
Hower when you double tap a country item its sort of like a shortcut to go to the list of cities directly.
I have such scenario in my playbook app and it works very vell (users feel its intuitive).
Would like to keep BB10 version consistent with PlayBook.
ok - if it's only a short cut giving the user an additional short way -
then it's ok ![]()
it shouldn't be the only way
ekke
09-25-2012 03:42 PM
Did the above answers help you out?
Graham