Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7669329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:34:11+00:00 2026-05-31T15:34:11+00:00

Good day, I have a photo gallery that pulls from a json feed. The

  • 0

Good day,

I have a photo gallery that pulls from a json feed. The json gallery contains 600 photos, but I am pushing out 10 at a time, with the gallery reloading on the tenth feed.

Now I have two arrays.
PhotoList.length – carries a count of how many photos are in the feed
currentPhotoIndex. – It holds the index or place of the images.

The problem: currentPhotoIndex only shows 10 indexs no matter what. When I reload more data from the feed it overwrites the old data, keeping the index the same.

How to I add more index space to an array? I am thinking I can do an append to currentPhotoIndex, but how?

I need something like, currentPhotoIndex = currentPhotoIndex + 10; (this by the way gives me a current index of 20 instead of creating 10 empty spaces.)

Any help is appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:34:12+00:00Added an answer on May 31, 2026 at 3:34 pm

    It sounds like you need to use an array list.

    Here is a java code example to show the basics of how it works.

    If it is not what you had in mind, try this:

    Step1: Create an array of size 10, when it is full make a temporary array of array.size*2.

    Step2: Now add the contents of the first array to the temp array.

    Step3: Re-initialize the array with a new size (temp array size).

    Step4: Now add the contents of the temp array to the resized array.

    Step5: Repeat from step 1 as many times as neaded

    Here is an example in java:

    String array[] = new String[10];
    //add items to array
    String tempArray[] = new String[array.length*2];
    tempArray = array;
    array = new String[tempArray.length];
    //add more items to the array
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day everyone. I have an audio class, that plays a .wav file. But
Good day, I have a script in PHP that gets contents from a URL.
Good day! I right now have a function the drags an element from a
Good day, I have a local csv file with values that change daily called
Good day all; I have an UIImageView that I animate around a large UIView.
Good day all, I have a preset situation that can't be changed, that revolves
Good day all, I have written an application that i require to have a
Good day code knights, I have a tricky problem that I cannot see a
Good Day, I have a number of binary strings that were created by a
Good day, I have searched far and wide but all I can find is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.