I am having main activity called OverallActivity. here I wrote a code to add menu, by selecting the menu I want to perform an action in another activity.
Eg: main Activity: OverallActiviry
menus: Action1 and Action2
If i click action1 it have to call the subActivity1 one. and If i press Action2,it have call the another activity(subActivity2), in that subActivity2 I want set the Listview to display the array(string() value returned by subActivity1. If anyone knows please revert me. Thanks in advance.
I am having main activity called OverallActivity. here I wrote a code to add
Share
At first I misunderstood your question, so now here’s some correction:
To launch an activity, use Shashank Kadne’s code in the code from TofeeqAhmad.
To pass data to
subActivity2you can add additional data to the intent that opens the Activity, in your case, an array ofCharSequenceitems:Then, in your activity’s
onCreatehandler you could check whether the intent contains an extra named “operation” an what its value is: