DKG
DKG

Reputation: 1137

How to create layouts dynamically with each layout having unique functionality

I have 2 layout first one takes input and based on query show give output as shown in pic2. However I am not able to introduce these layouts dynamically.

Each dynamic layout must have a unique id so that when "BOOK" is clicked specific ticket is booked.

https://i.sstatic.net/ez4DP.png

Upvotes: 1

Views: 190

Answers (1)

Gangnus
Gangnus

Reputation: 24484

You should make the second layout not dynamic, but as a usual ListActivity of vertical LinearLayouts. And fill the ListActivity from the DB query.

The functionality you need is not unique at all, it only takes different DB table rows as a parameter. It is standard.

Upvotes: 1

Related Questions