package com.dome.pokiiez;


import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;
@SuppressWarnings("deprecation")
public class Shootim extends Activity
{
public void onCreate ( Bundle savedInstanceState )
{
super.onCreate ( savedInstanceState );
this.setContentView ( R.layout.shotim);

int [ ] imageID = { R.drawable.shooting, R.drawable.shooting2, R.drawable.shooting3 };
ImageAdapter adapter = new ImageAdapter ( this, imageID );
Gallery gallery = ( Gallery ) this.findViewById ( R.id.gallery );
gallery.setAdapter ( adapter );
}
protected class ImageAdapter extends BaseAdapter
{
private Context context;
private int [ ] imageID;
public ImageAdapter ( Context context, int [ ] imageID )
{
this.context = context;
this.imageID = imageID;
}
public int getCount ( )
{
return this.imageID.length;
}
public Object getItem ( int position )
{
return null;
}
public long getItemId ( int position )
{
return position;
}
public View getView ( int position, View convertView, ViewGroup parent )
{
ImageView imageView = new ImageView ( this.context );
imageView.setImageResource ( this.imageID [ position ] );
return imageView;
}
}
}