I start with a home fragment that opens either a listFragment(Al) or I can choose a normal Fragment(Jim). If my new Fragment(Bob) is called from the listFragment(Al), I want Fragment(Bob) to call XML A. If Fragment(Bob) is called from Fragment(Jim) I want Fragment(Bob) to inflate XML B. How do I pass a value from listFragment(Al) and Fragment(Jim) that can be checked in the onCreateView of Fragment(Bob) so that Fragment(Bob) knows which XML to inflate?
Hope that all makes sense.
Thanks.
Use get/set arguments:
http://developer.android.com/reference/android/app/Fragment.html#getArguments()
[edit]
So when you create Fragment Bob from Fragment Jim you could do something like this:
or you could even in the newInstance method take in the resourceId