0

I have a grid view with images, when I click an image I start a new activity. What I need now is that I have specific data (text,images) about the image in the grid view, I want them to retrieve them from Sqlite, i need directions what all can I do.

I can get the position of the clicked image by

intent.putExtra("Index", position);

how to get that image in the new intent and how to retrieve the row from sqlite

Mohsin Mushtaq
  • 133
  • 1
  • 5
  • 17
  • In your adapter, on the onClickListener, can't you get the src of the image using the view ? I guess you should get the path to your image, and put it in extra to your new intent. – Damien R. Aug 21 '13 at 08:22
  • you can retrieve a data from database in onCreate method with your new Activity.. – Piyush Aug 21 '13 at 08:46

1 Answers1

0

I hope I good understand what you want to do.

You can do this using caching images - it will be the fastest way. (Caching images library - lazy list)

Then you can put into new activity link into images (which is showing in gridview) and in new activity load that images.

Or if you want to use database - load images into database as table of int which you can get from bitmap (or just from ImageView)

Dariusz Mazur
  • 587
  • 5
  • 21