Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
d3v3l0p3r
Posts: 168
Registered: ‎07-19-2012
My Device: Q5, Q10, Z10, Z30, PlayBook
My Carrier: Carrier

Double click on a list item

Is there a signal (or action) to capture double click (double tap) on a list item in a ListView?

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
ekke
Posts: 1,504
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Double click on a list item

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

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
d3v3l0p3r
Posts: 168
Registered: ‎07-19-2012
My Device: Q5, Q10, Z10, Z30, PlayBook
My Carrier: Carrier

Re: Double click on a list item

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. 

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
greenback
Posts: 527
Registered: ‎10-17-2010
My Device: BlackBerry Z10, DAC

Re: Double click on a list item

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!

:Rockon:

 

Please use plain text.
Developer
ekke
Posts: 1,504
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Double click on a list item


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 :smileyhappy:

 

it shouldn't be the only way

 

ekke

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
BlackBerry Development Advisor (Retired)
gperry
Posts: 138
Registered: ‎05-11-2012
My Device: Developer
My Carrier: Developer

Re: Double click on a list item

Did the above answers help you out?

 

Graham

Please use plain text.