Scotter Active Member Licensed User Dec 6, 2016 #1 Before I go too far into building this, I want to ask for any advice you all want to give. I'm pulling the banner images from a URL that I get from a database. That part I know how to do. I know how to put them in a list. What I'm anticipating taking some time/research is to figure out how to tell that list to start filling imgBanner view that I've put in my main layout and change them out on a timer. Ideas? Thanks!
Before I go too far into building this, I want to ask for any advice you all want to give. I'm pulling the banner images from a URL that I get from a database. That part I know how to do. I know how to put them in a list. What I'm anticipating taking some time/research is to figure out how to tell that list to start filling imgBanner view that I've put in my main layout and change them out on a timer. Ideas? Thanks!
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2016 #2 Code: Copy Sub Process_Globals Private ImagesList As List Private ImageIndex As Int End Sub Sub Timer1_Tick ImageIndex = (ImageIndex + 1) Mod ImagesList.Size imgBanner.Bitmap = ImagesList.Get(ImageIndex) End Sub Upvote 0
Code: Copy Sub Process_Globals Private ImagesList As List Private ImageIndex As Int End Sub Sub Timer1_Tick ImageIndex = (ImageIndex + 1) Mod ImagesList.Size imgBanner.Bitmap = ImagesList.Get(ImageIndex) End Sub
Scotter Active Member Licensed User Dec 6, 2016 #3 Erel said: Code: Copy Sub Process_Globals Private ImagesList As List Private ImageIndex As Int End Sub Sub Timer1_Tick ImageIndex = (ImageIndex + 1) Mod ImagesList.Size imgBanner.Bitmap = ImagesList.Get(ImageIndex) End Sub Click to expand... Thank you! Where I'm caught up now is: I actually don't know how to grab images via http. And other problem is the images are huge so I have to figure out how to resize them. I'm going to see if I can create resized versions on the server. Upvote 0
Erel said: Code: Copy Sub Process_Globals Private ImagesList As List Private ImageIndex As Int End Sub Sub Timer1_Tick ImageIndex = (ImageIndex + 1) Mod ImagesList.Size imgBanner.Bitmap = ImagesList.Get(ImageIndex) End Sub Click to expand... Thank you! Where I'm caught up now is: I actually don't know how to grab images via http. And other problem is the images are huge so I have to figure out how to resize them. I'm going to see if I can create resized versions on the server.
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2016 #4 You can use OkHttpUtils2 to download the images. Upvote 0