• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps android Gridview reloading array

pooh15

Lurker
I am working on GridView for the first time and came across the following issue. I am referring this tutorial Android Custom GridView with Images and Text - Example well the icons and text are displayed exactly in the sequence as it is in array. as shown in the following screenshot(have attached all 3 screenshots with the post)
1st screenshot:image from the tutorial link


but when i increase the columns width and height so that not all the data is seen at once(i.e i need to scroll down to see the data at the end.i guess the following screenshots might help.

2nd screenshot: Is the part viewed before scrolling up.

3rd screenshot this are the remaining contents that can be viewed after scrolling down:enter image description here

If you compare the actual array of text i.e "String[] web" from the link or the 1st screenshot. Till stumbleUpon it is displaying the correct sequence of array but after that 'github' ,'google' and 'facebook' is being displayed instead of "SoundCloud","Reddit", "Blogger".

Now my question is: why is this happening? does the adapter only loads the contents that are visible and it reloads the contents once other part is made visible? may i know what is the solution for this? or what is the right approach to use gridview?
If you are not able to understand my doubts.Please feel free to ask.Thank you in advance.
 

Attachments

  • device-2014-01-05-200542-180x300.png
    device-2014-01-05-200542-180x300.png
    25.5 KB · Views: 64
  • device-2014-06-30-163456.jpg
    device-2014-06-30-163456.jpg
    20 KB · Views: 52
  • device-2014-06-30-163714.jpg
    device-2014-06-30-163714.jpg
    19.3 KB · Views: 49
Back
Top Bottom