you could use this:
Using java Syntax Highlighting
- int resID = ((Gallery) findViewById(R.id.gallery)).getSelectedItemId();
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
this will work if you alter the getItemId(..)-method in the ImageAdapter we created (make it return the ResourceID):
Using java Syntax Highlighting
- public long getItemId(int position) { return position; }
- // Change to
- public long getItemId(int position) { return myImageIds[position]; }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
then use the code in the :src: [TinyTut] - Get ResourceName by its ID-Tutorial to determine the name 'behind' the resID.
Regards,
plusminus





Btw, cool widget, very useful 

