Code example for ListFragment

Methods: setListAdapter, getActivity, onCreate

public class FeedFragment extends ListFragment {
	public void onCreate(Bundle savedInstanceState) {
		String[] countries = new String[] {"Bhutan", "Canada", "China", "Colombia", "France", "Germany", "Italy", "Jamaica", "Kazakhstan", "Kenya", "South Africa", "United States"};
		setListAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1,, countries));
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.test_fragment, container, false);
		return view;
Connect your IDE to all the code out there  Get Codota for Java