Code example for HashMap

Methods: put

0
        return myData;
    } 
 
    protected void addItem(List<Map> data, String name, String path)
    { 
        HashMap temp = new HashMap();
        temp.put("title", name);
        temp.put("path", path);
        data.add(temp);
    } 
 
    protected void onListItemClick(ListView l, View v, int position, long id)
    { 
        Map map = (Map) l.getItemAtPosition(position);
        final String path = (String)map.get("path");
 
        if ((new File(path)).isDirectory()) {
            final CharSequence[] items = {"Open", "Run"};
            AlertDialog.Builder builder = new AlertDialog.Builder(this);
            builder.setTitle("Select an Action");
            builder.setSingleChoiceItems(items, -1,