Code example for ListFragment

Methods: getActivity, onViewCreated, setListAdapter

0
	private List<String> data;
	private ArrayAdapter adapter;
	 
	@Override 
	public void onViewCreated(View view, Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
		data=new ArrayList<String>();
		adapter=new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, data);
		setListAdapter(adapter);
	} 
	 
	@Override 
	public void onResume() { 
		super.onResume(); 
		new AsyncTask<Void, Void, Void>(){
 
			@Override 
			protected Void doInBackground(Void... params) {
				try { 
					Thread.sleep(2000);
				} catch (InterruptedException e) {