json parser images shown in lstview please help me
-
my json parser ------------------------ { "default_bundels": [ "P0001", "P0002", "P0003", "P0004", "P0005", "P0006" ], "product_bundles": { "P0001": [ { "name": "Animals", "cost": 0, "images_counts": 6, "category": "Animals" } ], "P0002": [ { "name": "Buildings", "cost": 0, "images_counts": 6, "category": "Buildings" } ], "P0003": [ { "name": "Cars", "cost": 0, "images_counts": 6, "category": "Cars" } ], "P0004": [ { "name": "Sports", "cost": 0, "images_counts": 6, "category": "Sports" } ], "P0005": [ { "name": "Fruits", "cost": 0, "images_counts": 6, "category": "Fruits" } ], "P0006": [ { "name": "Personalities", "cost": 0, "images_counts": 6, "category": "Personalities" } ], "P0007": [ { "name": "AnimationMovies", "cost": 0.99, "images_counts": 15, "category": "AnimationMovies" } ], "P0008": [ { "name": "ArtPaintings", "cost": 0.99, "images_counts": 10, "category": "ArtPaintings" } ], "P0009": [ { "name": "Cartoons", "cost": 0.99, "images_counts": 8, "category": "Cartoons" } ], "P0010": [ { "name": "Celebrities", "cost": 0.99, "images_counts": 10, "category": "Celebrities" } ], "P0011": [ { "name": "ExploreIndia", "cost": 0.99, "images_counts": 10, "category": "ExploreIndia" } ], "P0012": [ { "name": "Flowers", "cost": 0.99, "images_counts": 8, "category": "Flowers" } ], "P0013": [ { "name": "FoodAndDrink", "cost": 0.99, "images_counts": 11, "category": "FoodAndDrink" } ], "P0014": [ { "name": "Historical", "cost": 0.99, "images_counts": 8, "category": "Historical" } ], "P0015": [ { "name": "KidsAndBabies", "cost": 0.99, "images_counts": 8, "category": "KidsAndBabies" } ], "P0016": [ { "name": "Nature", "cost": 0.99, "images_counts": 9, "category": "Nature" } ] } } i tried like this ------------------------------ private class GetContacts extends AsyncTask { @Override protected void onPreExecute() { super.onPreExecute(); // Showing progress dialog pDialog = new ProgressDialog(MainActivity.this); pDialog.setMessage("Please wait..."); pDialog.setCancelable(false); pDialog.show(); } @Override protected Void doInBackground(Void... arg0) { // Creating service handler class instance ServiceHandler sh = new Serv
-
my json parser ------------------------ { "default_bundels": [ "P0001", "P0002", "P0003", "P0004", "P0005", "P0006" ], "product_bundles": { "P0001": [ { "name": "Animals", "cost": 0, "images_counts": 6, "category": "Animals" } ], "P0002": [ { "name": "Buildings", "cost": 0, "images_counts": 6, "category": "Buildings" } ], "P0003": [ { "name": "Cars", "cost": 0, "images_counts": 6, "category": "Cars" } ], "P0004": [ { "name": "Sports", "cost": 0, "images_counts": 6, "category": "Sports" } ], "P0005": [ { "name": "Fruits", "cost": 0, "images_counts": 6, "category": "Fruits" } ], "P0006": [ { "name": "Personalities", "cost": 0, "images_counts": 6, "category": "Personalities" } ], "P0007": [ { "name": "AnimationMovies", "cost": 0.99, "images_counts": 15, "category": "AnimationMovies" } ], "P0008": [ { "name": "ArtPaintings", "cost": 0.99, "images_counts": 10, "category": "ArtPaintings" } ], "P0009": [ { "name": "Cartoons", "cost": 0.99, "images_counts": 8, "category": "Cartoons" } ], "P0010": [ { "name": "Celebrities", "cost": 0.99, "images_counts": 10, "category": "Celebrities" } ], "P0011": [ { "name": "ExploreIndia", "cost": 0.99, "images_counts": 10, "category": "ExploreIndia" } ], "P0012": [ { "name": "Flowers", "cost": 0.99, "images_counts": 8, "category": "Flowers" } ], "P0013": [ { "name": "FoodAndDrink", "cost": 0.99, "images_counts": 11, "category": "FoodAndDrink" } ], "P0014": [ { "name": "Historical", "cost": 0.99, "images_counts": 8, "category": "Historical" } ], "P0015": [ { "name": "KidsAndBabies", "cost": 0.99, "images_counts": 8, "category": "KidsAndBabies" } ], "P0016": [ { "name": "Nature", "cost": 0.99, "images_counts": 9, "category": "Nature" } ] } } i tried like this ------------------------------ private class GetContacts extends AsyncTask { @Override protected void onPreExecute() { super.onPreExecute(); // Showing progress dialog pDialog = new ProgressDialog(MainActivity.this); pDialog.setMessage("Please wait..."); pDialog.setCancelable(false); pDialog.show(); } @Override protected Void doInBackground(Void... arg0) { // Creating service handler class instance ServiceHandler sh = new Serv
http://www.androidhive.info/category/json/[^] This is just for reference, may you be find the ways for the errors. :)