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
LoganSix
Posts: 265
Registered: ‎01-02-2011
My Device: Z30, PlayBook
My Carrier: AT&T

Re: Rearranging items in a list

And in 10.2.1 the Quick Settings has an option to Rearrange.

 

Would be nice if BB would share.

_________________
Meetup for BlackBerry 10
Meetup Search Tool - not available at the moment
Please use plain text.
Developer
BBSJdev
Posts: 6,089
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: Rearranging items in a list

Well spotted, I missed that.

However it's no surprise that they would wish to trial something internally before releasing it to all developers.

 

Looking forward to this now and I was wondering how they would implement it, now  we know.


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

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
ahretour
Posts: 27
Registered: ‎12-03-2013
My Device: BlackBerry Z10
My Carrier: T-Mobile

Re: Rearranging items in a list

Have you seen the ArrayDataModel? This has the methods to rearrange the ListItems. Maybe this is used in the App 'Lazy Lists'.

Please use plain text.
Developer
BBSJdev
Posts: 6,089
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: Rearranging items in a list

Rearranging of the model data is not the problem this can be done with all the data models.

 

The problem was coming up with a consistant approach to rearranging lists that would be okay with users.

I held off doing it myself in the hope that the BlackBerry way would be implemented soon, that was over a year ago now. :smileyhappy:

 

Doing what Lazy Lists has done would be fairly easy but it goes against some of the BlackBerry guidelines, frankly I'm surprised it got a Build For BlackBerry certification. Actually I'm *not* surprised, we all know what a mess was made of entry in to that program.

 

Now it's been pointed out that this list rearrangement exists in Settings, if you look, it's in a few other places as well such as the Hub settings.

 

The BlackBerry approach fits in to the current UIX maintaining long-hold integrity as a context menu invoker as Lazy Lists does not.

 

I look forward to finally getting to implement it in my app on the next NDK iteration. Fingers crossed!


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

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
knobtviker
Posts: 127
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: Rearranging items in a list

I know I am resurrecting a thread but it seemed like a good place to ask:

As of 10.3 SDK Cascades has a RearrangeHandler in ListView and it works quite well and it's easy to implement.

However I have a problem that it works only in the opposite direction of the list orientation in StackListLayout... ?

I'm using the move function on ArrayDataModel to actually move list items.

 

Any examples or docs or suggestions how to properly use RearrangeHandler?

Please use plain text.
Developer
knobtviker
Posts: 127
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: Rearranging items in a list

A sample has been added to offical docs. However there is still a bug of one direction drag only when using ArrayDataModel.

FYI OS Settings app doesn't use this API AFAIK.

Please use plain text.
Developer
BBSJdev
Posts: 6,089
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: Rearranging items in a list

Actually it's a bug in the move function and unfortunately there doesn't seem to be a work around.
Using a copy or cut triggers the ListView to reset so is not workable.

The bug is already in DIT, do a search and you'll find it..

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

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
knobtviker
Posts: 127
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: Rearranging items in a list

I already have and I am aware of it. It's classified as a major bug which it is. However it's like that for months now. Really, there must be some solution that can be used to fix it.

Perhaps a change of model type?

Please use plain text.
Developer
BBSJdev
Posts: 6,089
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: Rearranging items in a list

Possibly I've tried some approaches in to BlackBerry asking for workarounds but the lack of response indicates none at this point.

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

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
knobtviker
Posts: 127
Registered: ‎05-31-2013
My Device: BlackBerry Z10 Limited Edition
My Carrier: Bonbon

Re: Rearranging items in a list

Bump up with this.

Also, a little secret bird beta tester informed me that this hasn't been fixed yet on the latest running build on Passport.

To my knowledge all that has to be done is disengage parent scrolling upon onMoveStarted. Perhaps there is more to it than I can see in a closed source Cascades control. :smileyhappy:

Please use plain text.