Search in sources :

Example 1 with FeedItemlistAdapter

use of de.danoeh.antennapod.adapter.FeedItemlistAdapter in project AntennaPod by AntennaPod.

the class PlaybackHistoryFragment method onFragmentLoaded.

private void onFragmentLoaded() {
    if (adapter == null) {
        // played items shoudln't be transparent for this fragment since, *all* items
        // in this fragment will, by definition, be played. So it serves no purpose and can make
        // it harder to read.
        adapter = new FeedItemlistAdapter(getActivity(), itemAccess, new DefaultActionButtonCallback(getActivity()), true, false);
        setListAdapter(adapter);
    }
    setListShown(true);
    adapter.notifyDataSetChanged();
    getActivity().supportInvalidateOptionsMenu();
}
Also used : FeedItemlistAdapter(de.danoeh.antennapod.adapter.FeedItemlistAdapter) DefaultActionButtonCallback(de.danoeh.antennapod.adapter.DefaultActionButtonCallback)

Example 2 with FeedItemlistAdapter

use of de.danoeh.antennapod.adapter.FeedItemlistAdapter in project AntennaPod by AntennaPod.

the class ItemlistFragment method onFragmentLoaded.

private void onFragmentLoaded() {
    if (!isVisible()) {
        return;
    }
    insideOnFragmentLoaded = true;
    if (adapter == null) {
        setListAdapter(null);
        setupHeaderView();
        setupFooterView();
        adapter = new FeedItemlistAdapter(getActivity(), itemAccess, new DefaultActionButtonCallback(getActivity()), false, true);
        setListAdapter(adapter);
    }
    refreshHeaderView();
    setListShown(true);
    adapter.notifyDataSetChanged();
    getActivity().supportInvalidateOptionsMenu();
    if (feed != null && feed.getNextPageLink() == null && listFooter != null) {
        getListView().removeFooterView(listFooter.getRoot());
    }
    insideOnFragmentLoaded = false;
}
Also used : FeedItemlistAdapter(de.danoeh.antennapod.adapter.FeedItemlistAdapter) DefaultActionButtonCallback(de.danoeh.antennapod.adapter.DefaultActionButtonCallback)

Aggregations

DefaultActionButtonCallback (de.danoeh.antennapod.adapter.DefaultActionButtonCallback)2 FeedItemlistAdapter (de.danoeh.antennapod.adapter.FeedItemlistAdapter)2