private void refreshAccounts() { ListView accountsList = (ListView) findViewById(R.id.listView); ArrayAdapter<AccountLine> adapter = new ArrayAdapter<AccountLine>( this, android.R.layout.simple_list_item_1, accountRepository.getAccounts()); accountsList.setAdapter(adapter); }