Assuming that I have an object called Item, and that it has text, id, and validation properties, in this case, text is a string, id is an integer, and validation is a Boolean value.
class Item
{
private int id;
private String texto;
private boolean validacao;
//get and set
}
And let this object serve as a parameter for an ArrayAdapter
ArrayAdapter<Item> itemAdapter = new ArrayAdapter<Item(this,R.layout.layoutItem,view)
//no momento os parametros do construtor do ArrayAdapter não são levados em conta
But I need to be able to customize some elements of each row in the ListView according to the items.
Each line will have:
1- an image, which will be chosen according to the validation value of the Item of the current line.
2- An EditText, which will receive and manipulate the text property value of the Item of the current line.
4- an image with the drawing of a recycle bin that when clicked deletes the current item.
5- The item id should be changed according to the position in the array.
How can I customize the rows of the view in this way ?, should I create a class that extends the ArrayAdapter class?, have some examples ?, or an alternative, or standard, best for this need?