Search in sources :

Example 1 with DownloadLogAdapter

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

the class DownloadLogFragment method onFragmentLoaded.

private void onFragmentLoaded() {
    if (adapter == null) {
        adapter = new DownloadLogAdapter(getActivity(), itemAccess);
        setListAdapter(adapter);
    }
    setListShown(true);
    adapter.notifyDataSetChanged();
    getActivity().supportInvalidateOptionsMenu();
}
Also used : DownloadLogAdapter(de.danoeh.antennapod.adapter.DownloadLogAdapter)

Example 2 with DownloadLogAdapter

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

the class DownloadLogFragment method onViewCreated.

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    // add padding
    final ListView lv = getListView();
    lv.setClipToPadding(false);
    final int vertPadding = getResources().getDimensionPixelSize(R.dimen.list_vertical_padding);
    lv.setPadding(0, vertPadding, 0, vertPadding);
    setListShown(true);
    EmptyViewHandler emptyView = new EmptyViewHandler(getActivity());
    emptyView.setIcon(R.drawable.ic_download);
    emptyView.setTitle(R.string.no_log_downloads_head_label);
    emptyView.setMessage(R.string.no_log_downloads_label);
    emptyView.attachToListView(getListView());
    adapter = new DownloadLogAdapter(getActivity(), this);
    setListAdapter(adapter);
    EventBus.getDefault().register(this);
}
Also used : ListView(android.widget.ListView) EmptyViewHandler(de.danoeh.antennapod.view.EmptyViewHandler) DownloadLogAdapter(de.danoeh.antennapod.adapter.DownloadLogAdapter)

Aggregations

DownloadLogAdapter (de.danoeh.antennapod.adapter.DownloadLogAdapter)2 ListView (android.widget.ListView)1 EmptyViewHandler (de.danoeh.antennapod.view.EmptyViewHandler)1