Code example for SimpleAdapter

0
                e.printStackTrace();
            } 
        } 
        setListAdapter(new SimpleAdapter(this, ll, R.layout.simple_list_item_2,
                new String[] { "NAME", "DESC" }, new int[] {
                        android.R.id.text1, android.R.id.text2 }));
 
    } 
 
    private class JsonGetter implements Runnable {
 
        @Override 
        public void run() { 
            HttpClient hc = new HttpClient();
            GetMethod gm = new GetMethod(packages_url);
            final JSONArray ar;
            try { 
                hc.executeMethod(gm);
                Log_OC.e("ASD", gm.getResponseBodyAsString() + "");
                ar = new JSONObject(gm.getResponseBodyAsString())
                        .getJSONArray("apps");