I have two activities in my application. Activity1 has a list view and two buttons(say button1 and button2). Based on which button user clicks the content in the listview changes accordingly. The default loading of activity is having button1 click contents loaded in activity1.
In my Activity2, I have a button(say button3) which when clicked, has to load activity1 but with the listview loaded with button2 click results, not with the default display which shows the button1 click results.
Any help on how can I acheive this? On the onclick event of button3 in activity2 I can load activity1 but that will load with the default state showing button1 click results.
I have two activities in my application. Activity1 has a list view and two
Share
Save the state of your ListView by passing a extra string with IntentHandler when switching between the activities:
Then in your recieving activities onCreate() method (in this case yourActivity) you can get the state with: