3
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);
}
That’s a lot of items. The best way to work would be to pass the string.xml the item ? how to call the item?
But I did not understand how it looks in my project, q I use a model class, which receives the Item and Image, as it would look in my case? Itemlistview is the class I created, in case I would no longer use it?
– War Lock
It worked mann!! , thanks
– War Lock