Alexander
Alexander

Reputation: 41

Create new activity in application

Is it possible to create a new activity in the application (not in Android Studio)?

For example, I have a listview to which I can add new items. What I want is when I click on one of the items, then it will start/create a new activity that are dedicated to that specific item. Is it possible? Or is there another way to do it?

Upvotes: 0

Views: 33

Answers (1)

Ramesh Yankati
Ramesh Yankati

Reputation: 1217

No,You wont be able to create activity run time and its not a good design creating dedicated activity for each list item.

Instead you could have single list item detail or list item info screen activity(Whatever you call) and populate the data based on the selected item. If you have different UI elements for each list item, you might need to have multiple fragments instead.

Upvotes: 1

Related Questions