Answer the question
In order to leave comments, you need to log in
In a custom ListView element, how to draw this or that picture depending on the variable?
I create a list using a custom adapter. Inside the instance class - list element 2 fields:
String title and Boolean icon1;
When drawing items, how can one or another picture be inserted into the element depending on the value of a boolean variable?
Answer the question
In order to leave comments, you need to log in
and what's the problem then? implement your adapter and do whatever you want in it,
for example, for the ArrayAdapter heirs in the method
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question