J
J
justxz2020-01-17 17:56:26
Android
justxz, 2020-01-17 17:56:26

Is it possible to use multiple layouts for one arrayadapter?

I have a list and I need to display it. Can I make some elements display text and an image, while others only display text? Tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2020-01-17
@zagayevskiy

Yes, you can. Judging by arrayadapter'u, you use ListView. Do not do it this way. Use RecyclerView.
https://developer.android.com/reference/android/su... I
also recommend using the AdapterDelegates library.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question