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
Posts: 17,011
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany
Accepted Solution

dropdown or list with index

I have some dropdowns with a large number of options (100+), for example a country choice.

 

Other platforms offer an index, similar to the native contact application where you can select a letter on the right side to scroll to a certain letter.

 

Does anybody have code that does something similar or has seen a sample like that?

 

I am currently thinking about using a button that triggers a ControlDelegate with a ListView, maybe with a search field to filter items.

I am not sure how to implement the hovering index though. Any ideas?

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: dropdown or list with index

Not sure it would be possible without writing your own DropDown control.

 

So maybe a ListView with the index in the leader or in a container on the side would be an alternative? 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 17,011
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: dropdown or list with index

Yes, i guess i'll write a custom control for it.

No idea how to create the index bar (like the contact application) yet, but we'll see what i can figure out.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 17,011
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: dropdown or list with index

Not as fancy as the contacts app, and the letter list scrolls as well and has no popup, but it works well.

 

I used two list views in a DockLayout, one for the main content, the other for the index.

In the onTouch event i compare the touched item with the headers of the main list

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: dropdown or list with index

great and easy solution, Simon !

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

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner