In my android app I have this scenario - I have a Gallery where I have to display some images. I have a total of 13 images each of which I get by calling a function with some parameters.
Now in my adapter for gallery I can only pass 7 images at a time and when the user scrolls through the gallery I should update the gallery items. eg. My images are {0,1,2,3,4,5,6,7,8,9,10,11,12}.
First time I can only get and show {3,4,5,6,7,8,9} with 6 at center-display now if the user scrolls rightwards I want to remove 3 from the left end and add 10 at the right end so that the adapter array becomes {4,5,6,7,8,9,10} with 7 at center and so on.
同样,如果用户向左滚动,我想从右端删除9个,在左端添加2个,使适配器阵列变成 {2,3,4,5,6,7,8},中间有5个。
我用链接列表来储存我的东西
How can I achieve this. Please Help.