What To Use To Display 2 Photos?


#1

I’m trying to display an interior and exterior photo when the user swipes.

The photos are called via an api call On Create of the page.

Should be able to swipe from left to right or visa versa and the images continue to rotate in sequence no matter how many images present (usually 2 or 3).


#2

If it’s dynamic data, you’ll want to use dynamic views to do it. Depending on how you want it to look and feel will depend on the element to use. Things like listviews, and card decks and such will help with dynamic data on the Android side. Things like Tableviews and Collectionviews are the types of things to look into on the iOS side.


#3

I set it up with a Card Deck, Card View, and then an image view inside of the Card View.

It asks me to bind a data source but i’m calling the images from page variables brought onto the page by the previous page.

Should I be using a horizontal scroll view instead?

I’m trying to display an exterior photo, plus interior photo, when the user swipes left/right, with the exterior photo being the default photo displayed on page load.


#4

Hi @justincrabbe The issue you’ll have here is dynamic elements are filled with dynamic incoming data. So things like card views, tables, etc… these get populated from a list of incoming data since we’re not really setup for creating arrays of internal data in the platform so when you want to fill things that have a dynamic view count based on the amount of data populating it like card views, lists, collection views etc… you need to match up dynamic data with those dynamic elements.

So if you want to display photos from a previous view, make an API call with the previous views object Id or something so that your backend delivers a list of photos or photo urls for instance, then you can load something like a card view up with the dynamic data.


#5

So I did that and called the object using the unique ID.

I setup the Card Deck with 1 Card View + 2 Image Views overlapping each other (0px top bottom edge to edge) similar to how instagram shows a list of side swiping images.

image

I can see the response coming back from the api so that’s working.

Then On Load I set the two image views to the two image URL’s coming back from the response (Interior and Exterior photo) but for some reason all I get are blank white boxes for the images.

Am I missing something?

What about the settings ‘on swipe left’ and ‘on swipe right’? Do I not need to do anything with these?

image


#6

Is this the same issue as the other forum post you created? Just want to make sure I’m not trying to help solve the same problem in 2 places.

Also, in that final image… Are you giving it a url string to go retrieve the image? I’m just wondering since App_dropsource_exterior_image_text doesn’t sound like a url would live there but I could be wrong.


#7

@wade yes two different issues, in this case I’m trying to setup a Card Deck with Card Views.

Yes the string (text) contains a complete URL to an image in the database and it works OK in the app elsewhere just can’t figure out why it’s not loading here inside of the Card Deck.

What about the settings ‘on swipe left’ and ‘on swipe right’? Do I not need to do anything with these?

I can see text bound to a text view on the page just fine, and I’ve set the On Load event to display an image from an image URL, but that doesn’t want to change for some reason.

Build ID: 1151524111273509844

If you auto cred login click the 3 dot dropdown menu in the top app bar, click ‘Shuttles’ and it will take you to the page with the card deck + card view + image view i’m referring too where the image won’t load but text views do load.

URL of image file is good.