I have a TabActivity with two Activities. One Li开发者_如何学编程stView for the inbox and another for the outbox. When I click on an item(a thread) on the ListActivityThreads, I get the messages of that thread, in another ListActivityThreadDetail. When I am on that activity and answer a message I want to modify that single thread and passing it back to the ListActivityThreads.
Following the normal way to set results back to the previous activity I do this:
I use startActivityForResult
in ListActivityThreads and in ListActivityThreadDetail I set a result for the intent. But I cant get any data on onActivityResult in ListActivityThreads.
I have tried different ways to start activities and passing values on a TabActivity. But no luck so far... I cant use a BroadcastReceiver as my class already extends ListActivity. Also I have been trying this example using TabgroupActivity and startChildActivity. But cant receive anything using the method onActivityResult, neither implementing finishFromChildActivity on my parent acitivty.
I am really stuck with this, any help would be really appreciate!
There is one alternative for this problem is that you can take one static
variable in parent activity and you can access that static variable in child activity and in child activity you can modify that variable and so you will get modified value in parent activity
精彩评论