Code example for ListFragment

Methods: onCreate

0
    public interface NoteProvider { 
        public void onRequestMoreNotifications(ListView listView, ListAdapter adapter);
    } 
    @Override 
    public void onCreate(Bundle bundle){
        super.onCreate(bundle);
        // setup the initial notes adapter 
        mNotesAdapter = new NotesAdapter();
    } 
    @Override 
    public void onActivityCreated(Bundle bundle){
        super.onActivityCreated(bundle);
        mProgressFooterView = View.inflate(getActivity(), R.layout.list_footer_progress, null);
        ListView listView = getListView();
        listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
        listView.setOnScrollListener(new ListScrollListener());
        listView.setDivider(getResources().getDrawable(R.drawable.list_divider));
        listView.setDividerHeight(1);
        listView.addFooterView(mProgressFooterView, null, false);
        setListAdapter(mNotesAdapter);
    }