F
F
FNY3PM2020-02-09 18:32:58
Java
FNY3PM, 2020-02-09 18:32:58

How to generate elements in android?

I am studying android and the question arose: how can I generate elements and attach some information to it? Let's say I have posts and I need to generate their display and somehow add an ID to each so that I can switch to a new activity and pass this ID to it. On the web, I would use the data attribute to further work the element with JS or generate a link to the post by embedding the ID directly into it - I need an analog of something like this in android. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FNY3PM, 2020-02-09
@FNY3PM

With RecyclerView

T
tiroman, 2020-02-09
@tiroman

Go to startandroid and start reading carefully from the first lesson

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question