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

Adobe AIR Development

Reply
Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)

Re: Inserting a photo album

Hmm, so the more I try that the more I realize that I want the swipe gesture to automatically snap to the next image, and I'm not sure if that's do able in a list (Not to mention even with my list being set to Horizonally scroll the list still moves only on the x axis).

 

Today has been an extremely aggravating day trying to get this to work lol. My original question probably should have been HOW do I create a photo album, not can I.

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Inserting a photo album

Then you might want your main display area as a Sprite/UIComponent where you can specify x,y,rotation of each image and the user can directly manipulate each image my moving, totating and dropping them into other lists for organization.  There are mnay examples on the web to do that and once we are able to get gesture events then you can rotate and resize on a particular image.

Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)

Re: Inserting a photo album

Thankfully for me I'm not looking to do anything that complicated. All I want is the top half of my screen to be filled with a different array of images depenedent on which list item is clicked. Then, I want the user to be able to swipe between these images, and I believe I can use the tween function to make them snap to being centered.

 

I think the most aggravating part is I see photo albums in iphone apps all the time so I feel like it should be really simple to do, and I've spent the better part of the last 8 hour realistically achieving nothing.

 

Thanks for the input though guys, it is appreciated.

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Inserting a photo album

It can be simple.  Have your tried using a simple List with a custom renderer/skin for the images that can be selected on?  Will need to set the row height to something more meaningful and the data provider of the list will maintain the array of thumbnails.  If you're stump, post the code and I am certain someone can clean it up  and repost a simple solution.

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Inserting a photo album

Working on something for 8 hours is still productive because you found out what did not work.  Be patient, new plantform, early stage SDK, slow simulator, we all have our hands tied from time to time.  Keep your eye on the goal and dont worry about each step it takes to get there.

Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)

Re: Inserting a photo album

Thanks. I wish I was stumped, as least then it would mean I'd been able to get some code working lol.

 

I've tried using a custom renderer and can't get the images to appear in the list so I scrapped that and went back to trying to work with container that were populated with an array, but maybe I'll go back to the list idea and throw it up here when I do get stuck.

 

Although, I don't need the images to be "selected" per se, just visibile on the screen so the user can swipe between them. That's why I thought implimenting a container would be the best bet because I could change what is in the container easily (or so I thought). It's tough when you're not really aware of what you can do with a system.

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™

Re: Inserting a photo album

It is tough -- I've been working on a single, should be simple item all day too. All I'm trying to do is get a list to redraw itself with new data when the data changes. The data is changing and can be verified as changed, but the display of data isn't updated with any of the List class' methods. Truth be told, I've about had it with trying to work with the SDK, and I've only used Container, Spacer, UISkin and List so far.

Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)

Re: Inserting a photo album

So for a first time developer (of anything), I've pretty much dove into the deep end? lol

- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Inserting a photo album

To update items in a list, are you using the DataProvider methods to get and replace?

Developer
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™

Re: Inserting a photo album

[ Edited ]

I finally got it working after I posted this. I'm copying the DataProvider to an array with a for loop and changing its data in the same loop. When that's done, List.updateItemsAt is called with the array and 0 for index.

 

The data does change when scrolling, if updateItemsAt isn't called, since the set data method is called during SCROLL_MOVE, so that is working as well for when I need to change a single item that may not be currently displayed using the DataProvider.