@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (savedInstanceState != null) { dataList = (ArrayList<HashMap<String, Object>>) savedInstanceState.getSerializable("dataList"); } fragmentIdUUId = UUID.randomUUID().toString(); DataHandler.setFragmentId(fragmentIdUUId); View view = inflater.inflate(R.layout.function_manager_add_m_p_type_layout, container, false); ManagerAddMPTitleControl.setTitleContent( view, R.string.add_m_p_type_title_text, R.string.add_m_p_intro_next_button_text, new nextButtonClick()); typeSpinner = (Spinner) view.findViewById(R.id.manager_add_m_p_type_list); typeSpinner.setOnItemSelectedListener(new typeSelectedListener()); typeSpinner.setEnabled(false); typeImage = (ImageView) view.findViewById(R.id.manager_add_m_p_type_image); if (typeAdapter == null) { typeAdapter = new ArrayAdapter<String>(activity, android.R.layout.simple_spinner_item); if (dataList != null) { setAdapterData(); } else { getMPTypeInfo(); } } else { setAdapter(); } return view; }
@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { HashMap<String, Object> dataMap = null; if (savedInstanceState != null) { dataMap = (HashMap<String, Object>) savedInstanceState.getSerializable("dataMap"); int entCatagoryId = savedInstanceState.getInt("entCatagoryId"); Log.i("============", "==================entCatagoryId:" + entCatagoryId); MainActivityControl.applicationData.put("entCatagoryId", entCatagoryId); } String fragmentId = UUID.randomUUID().toString(); // ÉèÖÃfragmentId DataHandler.setFragmentId(fragmentId); bundle.putString("fragmentId", fragmentId); view = inflater.inflate(R.layout.function_device_maintain_order_detials_layout, container, false); control = new MaintainOrderDetailsControl(activity, view, bundle); control.initPage(dataMap); return view; }
@Override public void onPause() { super.onPause(); DataHandler.clearFragmentId(); }