I am writing an app and I have run into a problem.
The first activity has a list with many options, each list object consists of a picture and some text. The goal is a user picks a list option and it opens a new activity.
I have a Array List with instances of a class that contains the image, text, and name of activity that needs to start. When I call StartActivity in my onListItemClick(), how can I get the activity name in the new Intent and make it accept the name? Is this possible or is this a terrible way of going at what I want?
I am very new to android and am sorry for any confusion.
Any help is very appreciated.
I am writing an app and I have run into a problem. The first
Share
Why don’t you make your custom list class that contains the image, text, and name of the activity also have another field that is an instance of a Class object of the Activity you want to start? That way, you can just use that to start the new Activity.