I have class:
public class ConferenceListFragment extends SherlockListFragment {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
DBAdapter dbAdapter = new DBAdapter(new DBHelper(getSherlockActivity()));
//How to get veriable "FLAG_BOOLEAN" ?
List list = dbAdapter.getListItemInfoArray(FLAG_BOOLEAN);
dbAdapter.close();
CustomListAdapter adapter = new CustomListAdapter(getActivity(), list);
setListAdapter(adapter);
}
}
Depending on the variable FLAG_BOOLEAN, i get different data from DB. So can i send this FLAG from Activity to fragments?
You should use setArguments in the activity to pass them to the fragments and getArguments from within the fragments to retrieve them.