Get information from a activity inside a tab
I have a tabHost, with to tabs and an activity each one of them.
In the tabHost i also have a menu, with the save action. when i press the save in the menu,
i must get all the stuff that are inside those activities, like EditText text value content, checkbox checked value. Im running throw google and i only find how to setup the tabs.. but i cant find how to do what i've describe above.
I ha开发者_开发百科ve tried usind the findViewById passing the EditText or the CheckBox that are on those activities.. the result was null..
Any thougths?
Thanks in advance.
The link above is one solution. I will repeat it here for everyone. You can then call functions in each tab's activity which writes the data.
Another option is to write to shared preferences on text change for the edit text widgets and then get that information for the tab host.
Link: Android: How to call function of Activity inside of tab from the tabhost
精彩评论