Search in sources :

Example 6 with BittorrentDownload

use of com.frostwire.transfers.BittorrentDownload in project frostwire by frostwire.

the class TransferListAdapter method getMenuAdapter.

private MenuAdapter getMenuAdapter(View view) {
    Object tag = view.getTag();
    String title = "";
    List<MenuAction> items = new ArrayList<>();
    if (tag instanceof BittorrentDownload) {
        title = populateBittorrentDownloadMenuActions((BittorrentDownload) tag, items);
    } else if (tag instanceof Transfer) {
        title = populateCloudDownloadMenuActions(tag, items);
    }
    return items.size() > 0 ? new MenuAdapter(contextRef.get(), title, items) : null;
}
Also used : ResumeDownloadMenuAction(com.frostwire.android.gui.adapters.menu.ResumeDownloadMenuAction) MenuAction(com.frostwire.android.gui.views.MenuAction) CopyToClipboardMenuAction(com.frostwire.android.gui.adapters.menu.CopyToClipboardMenuAction) OpenMenuAction(com.frostwire.android.gui.adapters.menu.OpenMenuAction) CancelMenuAction(com.frostwire.android.gui.adapters.menu.CancelMenuAction) TransferDetailsMenuAction(com.frostwire.android.gui.adapters.menu.TransferDetailsMenuAction) PauseDownloadMenuAction(com.frostwire.android.gui.adapters.menu.PauseDownloadMenuAction) BittorrentDownload(com.frostwire.transfers.BittorrentDownload) UIBittorrentDownload(com.frostwire.android.gui.transfers.UIBittorrentDownload) ArrayList(java.util.ArrayList) Transfer(com.frostwire.transfers.Transfer) MenuAdapter(com.frostwire.android.gui.views.MenuAdapter)

Aggregations

BittorrentDownload (com.frostwire.transfers.BittorrentDownload)6 UIBittorrentDownload (com.frostwire.android.gui.transfers.UIBittorrentDownload)2 File (java.io.File)2 Activity (android.app.Activity)1 Uri (android.net.Uri)1 CancelMenuAction (com.frostwire.android.gui.adapters.menu.CancelMenuAction)1 CopyToClipboardMenuAction (com.frostwire.android.gui.adapters.menu.CopyToClipboardMenuAction)1 OpenMenuAction (com.frostwire.android.gui.adapters.menu.OpenMenuAction)1 PauseDownloadMenuAction (com.frostwire.android.gui.adapters.menu.PauseDownloadMenuAction)1 ResumeDownloadMenuAction (com.frostwire.android.gui.adapters.menu.ResumeDownloadMenuAction)1 TransferDetailsMenuAction (com.frostwire.android.gui.adapters.menu.TransferDetailsMenuAction)1 ExistingDownload (com.frostwire.android.gui.transfers.ExistingDownload)1 InvalidTransfer (com.frostwire.android.gui.transfers.InvalidTransfer)1 TransferManager (com.frostwire.android.gui.transfers.TransferManager)1 MenuAction (com.frostwire.android.gui.views.MenuAction)1 MenuAdapter (com.frostwire.android.gui.views.MenuAdapter)1 BTDownload (com.frostwire.bittorrent.BTDownload)1 BTEngine (com.frostwire.bittorrent.BTEngine)1 BTEngineAdapter (com.frostwire.bittorrent.BTEngineAdapter)1 Transfer (com.frostwire.transfers.Transfer)1