I am pulling 4 different items from JSON and storing them in a Map
and would like to take one of those items (and img
URL) and use that in the Universal Image Adapter GridView
option. Is this possible?
The example on GitHub utilizes a static String
of URLs which in my case will not work for me. My JSON look is in my onPostExecute
for(int i=0;i<_results.length();i++){
JSONObject s = _results.getJSONObject(i);
Map<String, String> map = new HashMap<String, String>(2);
String myIMG = s.getString("images");
String quotes = myIMG.replaceAll("\"", "");
String slashes = quotes.replaceAll("\\\\", "");
String myIMG2 = slashes.split("url:")[1];
String myIMG3 = myIMG2.split(",height")[0];
String pinner = s.getString("pinner");
String pinnerQuotes = pinner.replaceAll("\"", "");
String curly = pinnerQuotes.replaceAll("\\}", "");
String pinnerName = curly.split("full_name:")[1];
map.put("desc", s.getString("description"));
map.put("img", myIMG3);
map.put("url", s.getString("link"));
map.put("name", pinnerName);
_pinData.add(map);
So after this point I somehow need to take myIMG3
and use that in the Universal Image Loader GridView. However, I still need the rest of that info so I can pass it through an onClick to a detailed view that utilizes all of that info for that specific image. If anyone has any suggestions, I would be incredibly grateful.