tags:

views:

87

answers:

3

Hi friends,

i am using grid view for display images,i want to scroll move automatically,whenever i add another images in gridview,is it possible,please give code for that...

Thanks All

+1  A: 

Either call setSelection() or use smoothScrollToPosition().

Romain Guy
@i am fresher,so can you give any example code for that,Thanks
sivaraj
@Thanks,I got result
sivaraj
+3  A: 

I think you have to read a little bit more ::

http://developer.android.com/intl/fr/reference/android/widget/AdapterView.html#setSelection(int)

ListView.setSelection(position);

http://developer.android.com/intl/fr/reference/android/widget/AbsListView.html#smoothScrollToPosition(int)

ListView.smoothScrollToPosition(position).
Jorgesys
@Thanks your answers,i got result..
sivaraj
A: 

I got result using GridView.setSelection(GridView.getCount()),so scroll bar automatically move to last element of Grid View

sivaraj