我有课:
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);
}
}
根据变量 FLAG_BOOLEAN,我从 DB 获得不同的数据。那么我可以将这个 FLAG 从 Activity 发送到片段吗?