public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Gallery click = (Gallery) findViewById(R.id.gallery);
final List<String> sdcard = ReadSDCard();
click.setAdapter(new ImageAdapter(this, sdcard));
click.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent,
View v, int position, long id) {
Toast.makeText(Galleryy.this,
(CharSequence)sdcard.get(position),
Toast.LENGTH_LONG).show();
}
});
}