@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments().containsKey(ARG_ITEM_ID)) { mItem = RoomContext.valueOf((getArguments().getString(ARG_ITEM_ID))); } }
@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_room_detail, container, false); if (mItem != null) { ((TextView) rootView.findViewById(R.id.room_detail)).setText(mItem.toString()); } return rootView; }