@Override public void onSaveInstanceState(Bundle outState) { if (control != null) { int entCatagoryId = Integer.valueOf(MainActivityControl.applicationData.get("entCatagoryId") + ""); outState.putInt("entCatagoryId", entCatagoryId); outState.putSerializable("dataMap", control.getResultDataMap()); } super.onSaveInstanceState(outState); }
@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; }