M
M
max_vr2016-06-04 09:48:22
Java
max_vr, 2016-06-04 09:48:22

How to manage images in listView?

There is a listview. Each line has 2 textViews and an image. How to manage these pictures from the code separately for each line of the list?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-06-04
@Rou1997

Each line has 2 textViews and an image.

How is it done?
It is believed that there should be a Model (a class with 2 Strings and 1 field with an image) and a ViewModel (Adapter with an array or a list of models), and a list element as a View for each Model, you need to programmatically access it through an Adapter, but in general all this is "strict" MV* is not mandatory, you can always do without extra classes, that is, "do it on the forehead", then the application structure can become worse, but it's simpler and faster, for "temporaries" that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question