Code example for SimpleAdapter

Methods: notifyDataSetChanged

0
        	tempMap.put("url", tempServer.getUrl());
        	tempMap.put("id", Integer.toString(tempServer.getId()));
        	listMap.add(tempMap);
        } 
        serverDatabase.close();
        listAdapter.notifyDataSetChanged();
	} 
	public void listItemClick(int position) 
	{ 
		SharedPreferences prefs = getSharedPreferences("prefs",MODE_PRIVATE);
		SharedPreferences.Editor prefsEditor = prefs.edit();
		prefsEditor.putInt("prefServerId", Integer.parseInt( listMap.get(position).get("id") ) );
		ServerDatabaseHandler serverDatabase = new ServerDatabaseHandler(this);
    	Server currentServer = serverDatabase.getServer(Integer.parseInt( listMap.get(position).get("id") ) );
    	prefsEditor.putInt("prefTestbedId",serverDatabase.getDefaultTestbed(currentServer.getId()));
    	prefsEditor.commit();
    	serverDatabase.close();
		new DownloadTask().execute( currentServer.getUrl(), Integer.toString(prefs.getInt("prefTestbedId", 0)) );   
		loadingDialog = ProgressDialog.show(this, getString(R.string.loading), getString(R.string.loading_please_wait), true);
		 
	}