I plan to have 3 fragmented files contained in one action. The goal is that you select a conversation option from the first list, then go to the execution list based on what you clicked on the conversation list and then on the start list, depending on what you click, it will go to the final list filming. Should this happen in the fragments themselves (for example, I have one) or cause an operation to process the transmitted data back and forth for the fragments?
public class OptionsActivity extends Activity { protected TalkFragment talk; protected RunFragment run; protected EatFragment eat; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); talk = new TalkFragment(); run = new RunFragment(); eat = new EatFragment(); } } public class TalkFragment extends ListFragment { private Cursor mCursor; int mCurCheckPosition = 0; @Override public void onActivityCreated(Bundle savedState) { super.onActivityCreated(savedState); } @Override public void onListItemClick(ListView l, View v, int pos, long id) { mCurCheckPosition = pos;
These are obviously just fragments, but you get the idea. If I do this, I'm not sure how to pass some parameters correctly. Ideally, RunFragment will know what to display based on the identifier of the item clicked in TalkFragment. Should they go through Activity?
source share