Code example for Fragment

Methods: onStart

0
		adapter = new ChatlogAdapter(getActivity());
	} 
	 
	@Override 
	public void onStart() { 
		super.onStart(); 
		messageLog = inRoom ? netplay.roomChatlog : netplay.lobbyChatlog;
    	adapter.setLog(messageLog.getLog());
    	messageLog.addListener(adapter);
	} 
	 
	@Override 
	public void onStop() { 
		super.onStop(); 
		messageLog.removeListener(adapter);
	} 
	 
	@Override 
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_chat, container, false);