Skip to content
Snippets Groups Projects
Commit f8a17fac authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Browsers: Download icon on http servers

parent 74cfd0a8
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,9 @@
<variable
name="protocole"
type="String"/>
<variable
name="image"
type="android.graphics.drawable.BitmapDrawable"/>
</data>
<LinearLayout
android:id="@+id/layout_item"
......@@ -60,7 +63,8 @@
android:visibility="@{type != 2 ? View.VISIBLE : View.GONE}"
android:text="@{protocole}"
android:textSize="11sp"
android:textColor="@color/whitetransparent"/>
android:textColor="@color/whitetransparent"
android:background="@{image}"/>
<RelativeLayout
android:layout_width="0dp"
......
......@@ -35,11 +35,13 @@ import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
import org.videolan.vlc.databinding.BrowserItemSeparatorBinding;
import org.videolan.vlc.databinding.DirectoryViewItemBinding;
import org.videolan.vlc.gui.helpers.AsyncImageLoader;
import org.videolan.vlc.gui.helpers.MediaComparators;
import org.videolan.vlc.media.MediaDatabase;
import org.videolan.vlc.media.MediaUtils;
import org.videolan.vlc.media.MediaWrapper;
import org.videolan.vlc.util.CustomDirectories;
import org.videolan.vlc.util.HttpImageFetcher;
import java.io.File;
import java.util.ArrayList;
......@@ -108,6 +110,8 @@ public class BaseBrowserAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
vh.binding.executePendingBindings();
vh.binding.dviIcon.setBackgroundResource(getIconResId(media));
if (!TextUtils.isEmpty(media.getArtworkURL()) && media.getArtworkURL().startsWith("http"))
AsyncImageLoader.LoadImage(new HttpImageFetcher(vh.binding, media.getArtworkURL()), null);
vh.setContextMenuListener();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment