0

I am facing a problem with onItemClickListener. I have a ListView which contains strings as well as two images from parse.com table. I want to show the strings and images (that i have pushed in parse.com database) in another activity after I click on any item. I successfully get all the strings using getIntent() but I'm not able to find the solution to fetch the images from ListView item dynamically.

What is the best way to acomplish this?

kylieCatt
  • 10,672
  • 5
  • 43
  • 51
Rubal
  • 95
  • 1
  • 1
  • 7
  • U decode a parse file,s url to a thumb in the list adapter. So save aref to it so u can pass to new activity. If u use a good image framework ( uil or aquery ... ) it will have been cached when u call for the urls bmp the second time – Robert Rowntree Feb 10 '15 at 08:24
  • i dont understand...can u please share the code to do the same !! – Rubal Feb 10 '15 at 10:55

1 Answers1

0

In this case, the click event can provide the file Url's string value to another activity via the putExtra

look at the docs for calling $FileObj.'getUrl' that retrieves url as Type string

working with images in persistence you should store both full-sz and thumb-sz, working with the thumb in list-adapter context.

So, if u have store the bitmap for the thumbs file on parse, with "getUrl" you can operate on the URL value of the file( its useful in frameworks like 'Volley')

Read up on using adapters particularly "getView" to load the bitmap whenever you need to provide the bmp to a list adapter from your image lib.

Pass the File-Url-string to new activity in "Extra String Value"

Use Volley for your networking/file retreival and bitmap caching. bit of a guess but Volley and parse should be OK.

Community
  • 1
  • 1
Robert Rowntree
  • 6,230
  • 2
  • 24
  • 43