Well i wanted to take CriminalIntent to the next level. I added tabs using one Activity and 3 fragments.
The first fragment (tab 1 - default) lists categories of crimes.
Tab 2 is the List of all crimes (crimelistfragment)(if you click on the tab its self) - want it to display only the crimes that fall in the category if a list item is clicked on tab 1.
Tab 3 is the details of the crime (crimefragment) Displays first crime when the tab is clicked – want it to display correct crime when a list item is clicked in Tab 2.
What I would like to now implement is passing the UUID’s between the tabs when the item is clicked in the list. In onListItemClick I currently use:
TabHost host = (TabHost) getActivity().findViewById(android.R.id.tabhost);
to move between the tabs.
How do I pass the data between the tab fragments? I have tired everything I can think of.
I have tried passing the data to the hosting Activity and then down to the next tab. I cant get this to work. I am clearly missing something in my understanding.
BTW: your book is outstanding. I got my masters in computer science before java came out and I haven’t programmed in years but using what I have learned in your book I have been able to make a few really nice apps. Thank you. I think I am need to come to one of your classes soon.
Thank you so much for your help.