Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ListFragment with custom header
package com.neenbedankt.listfragmentbug;
import android.annotation.TargetApi;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.TextView;
public class TestListFragment extends ListFragment {
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
TextView tv = new TextView(getActivity());
setListAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1,
new String[] { "Hello world" }));

This comment has been minimized.

Show comment Hide comment

blackhawk389 Feb 28, 2017

What is getListView here

What is getListView here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment