Code example for ListFragment

Methods: setListAdapter, getActivity, onResume

0
		this.context = (MainFragmentActivity) this.getActivity();
		Log.v("celeb", "In onAttach of SettingFragment");
	} 
 
	public void onResume() { 
		super.onResume(); 
 
		ArrayList<String> lst = new ArrayList<String>();
		lst.add("facebook");
		lst.add("twitter");
 
		ShareListAdapter adapter = new ShareListAdapter(this.getActivity(), lst, context);
		this.setListAdapter((ListAdapter) adapter);
	} 
 
	@Override 
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View v;
 
Experience pair programming with AI  Get Codota for Java