Code example for ListView

Methods: setAdapter, invalidate

0
        } 
 
        accounts.addAll(Arrays.asList(realAccounts));
        AccountsAdapter adapter = new AccountsAdapter(accounts);
        ListView listView = getListView();
        listView.setAdapter(adapter);
        listView.invalidate();
    } 
 
    /** 
     * Implementing decide whether or not to display special accounts in the list. 
     * 
     * @return {@code true}, if special accounts should be listed. {@code false}, otherwise. 
     */ 
    protected abstract boolean displaySpecialAccounts(); 
 
    /** 
     * This method will be called when an account was selected. 
     * 
     * @param account 
     *         The account the user selected.