Search in sources :

Example 6 with FileDescriptorItem

use of com.frostwire.android.gui.adapters.menu.FileListAdapter.FileDescriptorItem in project frostwire by frostwire.

the class FileListAdapter method convertFiles.

private static ArrayList<FileDescriptorItem> convertFiles(Collection<FileDescriptor> fds) {
    if (fds == null) {
        return new ArrayList<>();
    }
    ArrayList<FileDescriptorItem> list = new ArrayList<>(fds.size());
    for (FileDescriptor fd : fds) {
        FileDescriptorItem item = new FileDescriptorItem();
        item.fd = fd;
        list.add(item);
    }
    return list;
}
Also used : ArrayList(java.util.ArrayList) FileDescriptorItem(com.frostwire.android.gui.adapters.menu.FileListAdapter.FileDescriptorItem) FileDescriptor(com.frostwire.android.core.FileDescriptor)

Aggregations

FileDescriptorItem (com.frostwire.android.gui.adapters.menu.FileListAdapter.FileDescriptorItem)6 Context (android.content.Context)2 FileDescriptor (com.frostwire.android.core.FileDescriptor)2 MenuAdapter (com.frostwire.android.gui.views.MenuAdapter)2 File (java.io.File)2 ArrayList (java.util.ArrayList)2 ImageView (android.widget.ImageView)1 MenuAction (com.frostwire.android.gui.views.MenuAction)1 MenuBuilder (com.frostwire.android.gui.views.MenuBuilder)1 HashMap (java.util.HashMap)1