private void buildView() { ServiceAcctInfo[] tempList = new ServiceAcctInfo[accountList.size()]; final ServiceAcctInfo[] acctList = accountList.toArray(tempList); AcctInfoAdapter adapter = new AcctInfoAdapter(this, acctList); setListAdapter(adapter); ListView lv = getListView(); lv.setChoiceMode(ListView.CHOICE_MODE_SINGLE); lv.setOnItemClickListener( new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int pos, long id) { acctSelected(acctList[pos]); } }); }