ListFragment onViewCreated - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ListFragment onViewCreated method.

This code example shows how to use the following methods:getListView, onViewCreated, setListShown
        mPreferenceManager = onCreatePreferenceManager();    
    } 
     
    @Override 
	public void onViewCreated(View view, Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
 
		lv = getListView();
        lv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);                	
        setListShown(true);
 
        PreferenceScreen screen = createPreferenceHierarchy(mPreferenceManager);
        if (screen != null) setPreferenceScreen(screen);
        postBindPreferences(); 
         
    	//((OnPreferenceAttachedListener)getActivity()).onPreferenceAttached(getPreferenceScreen(), 0); 
	} 
     
	protected abstract PreferenceScreen createPreferenceHierarchy(PreferenceManager prefMan);
 
7
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity, getLoaderManager
 
    private PartiesAdapter adapter;
 
    @Override 
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
 
        getLoaderManager().initLoader(LoaderId.getId(), null, this);
 
        adapter = new PartiesAdapter(getActivity(), null);
 
        setListAdapter(adapter);
    } 
 
    @Override 
    public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
        return new CursorLoader(getActivity(), PartyContract.URI, null, null, null, null);
    } 
 
    @Override 
6
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity
public class PhotoFragment extends ListFragment {
	ArrayAdapter<String> adapter;
 
	@Override 
	public void onViewCreated(View view, Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
		adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, new String[] { "Gallery+Point", "Viewpager+Fragment+Indicator" });
		setListAdapter(adapter);
	} 
	@Override 
	public void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		startActivity(new Intent(getActivity(), PhotoActivity.class).putExtra("type", position));
	} 
} 
5
CodeRank
This code example shows how to use the following methods:getListView, onViewCreated, getActivity
    } 
     
    @Override 
    public void onViewCreated(View view, Bundle savedInstanceState) {
    	// TODO Auto-generated method stub 
    	super.onViewCreated(view, savedInstanceState);
    	getListView().setOnItemClickListener((ActivityDrawer)getActivity());
    } 
} 
5
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity
public class PhotoFragment extends ListFragment {
	ArrayAdapter<String> adapter;
 
	@Override 
	public void onViewCreated(View view, Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
		adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, new String[] { "Gallery+Point", "Viewpager+Fragment+Indicator" });
		setListAdapter(adapter);
	} 
	@Override 
	public void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		startActivity(new Intent(getActivity(), PhotoActivity.class).putExtra("type", position));
	} 
} 
5
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity
    } 
 
    @Override 
    public void onViewCreated(View view, Bundle savedInstanceState) {
        // TODO Auto-generated method stub 
        setListAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, options));
        super.onViewCreated(view, savedInstanceState);
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity
	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);
5
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity
	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);
5
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity
	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);
5
CodeRank
This code example shows how to use the following methods:onViewCreated, setListAdapter, getActivity
	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);
5
CodeRank
onViewCreated Method Overview
Attach to list view once the view hierarchy has been created.
See Code Examples for other Android ListFragment Methods: