How to Implement the ImageAdapter for this listView Code?

Posted by iDroid Explorer on Stack Overflow See other posts from Stack Overflow or by iDroid Explorer
Published on 2011-11-21T09:46:24Z Indexed on 2011/11/21 9:51 UTC
Read the original article Hit count: 412

Code of Lost View is like:

public final static String ITEM_TITLE = "title";   
    public final static String ITEM_CAPTION = "caption";   
    public Resources resources;
    public static Uri path;
    public static File file;
    public static ProgressDialog  m_progressDialog;
    public static ListView list;

    @Override  
    public void onCreate(Bundle icicle) {   
        super.onCreate(icicle);  
        setContentView(R.layout.main);

        // create our list and custom adapter   
        SeparatedListAdapter adapter = new SeparatedListAdapter(this);   
        adapter.addSection("Local documents:", new ArrayAdapter<String>(this,   
            R.layout.list_item, new String[] { "WindowsONE Mobile PK", "WindowsorONE Moldings","Filet for a burger video" }));
        adapter.addSection("Non-local resources:", new ArrayAdapter<String>(this,   
                R.layout.list_item, new String[] { "Launch Photo slideshow link", "Dealer locator link" }));
        adapter.addSection("Send emails:", new ArrayAdapter<String>(this,   
                R.layout.list_item, new String[] { "Send Dealer Locator email", "Send Catalog email","Send install instrucation link" })); 
        //For extra Information in Listview    
        //adapter.addSection("Non-local resources:", new SimpleAdapter(this, security, R.layout.list_complex,   
        //new String[] { ITEM_TITLE, ITEM_CAPTION }, new int[] { R.id.list_complex_title, R.id.list_complex_caption }));        
        list = getListView();
        list.setAdapter(adapter);   
        list.setTextFilterEnabled(true);
        list.setOnItemClickListener(this); 
     }

}

© Stack Overflow or respective owner

Related posts about android

Related posts about android-layout