AutoScrolling images in Gallery

All your problems with Audio, Video and Images.

AutoScrolling images in Gallery

Postby Viktoriia » Thu Jun 16, 2011 10:00 am

Hi all! I'd like to do something like slideshow.
But I don't know how I can autoscroll my images in my Gallery. Any ideas?
Code: Select all
private final Integer[] mImage = { R.drawable.picture, R.drawable.picture_1 };

Gallery g = (Gallery) findViewById(;
      g.setAdapter(new ImageAdapter(this));

And my Adapter
Code: Select all
public View getView(final int position, View convertView, ViewGroup parent) {
         view = new ImageView(mContext);
         view.setPadding(20, 20, 20, 20);
         view.setLayoutParams(new Gallery.LayoutParams(360, 190));

         return view;

      public int getCount() {
         return mImage.length;

      public Object getItem(int position) {
         return mImage[position];

      public long getItemId(int position) {
         return position;
Posts: 5
Joined: Wed Jun 08, 2011 11:24 am


Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 15 guests