P
P
pitimirov_a2015-11-29 18:32:25
Android
pitimirov_a, 2015-11-29 18:32:25

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

1 answer(s)
O
Oleg Gamega, 2015-11-29
@pitimirov_a

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) {

implement whatever you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question