I have a custom listview, with images and text:
private void createListView() {
//Criamos nossa lista que preenchera o ListView
itens = new ArrayList<ItemListView>();
ItemListView item1 = new ItemListView("Alimentacao", R.drawable.alimentacao);
ItemListView item2 = new ItemListView("Esporte", R.drawable.esporte);
ItemListView item3 = new ItemListView("Saude", R.drawable.saude);
itens.add(item1);
itens.add(item2);
itens.add(item3);
//Cria o adapter
adapterListView = new AdapterListView(this, itens);
//Define o Adapter
listView.setAdapter(adapterListView);
//Cor quando a lista é selecionada para ralagem.
listView.setCacheColorHint(Color.TRANSPARENT);
}
There are many items. The best way to work would be to pass the string.xml to the item? how to call the item?