From f627091eb520ee726e0cf259c9555326fc9548f1 Mon Sep 17 00:00:00 2001 From: viche12345 Date: Fri, 7 Mar 2025 11:44:58 -0800 Subject: [PATCH] Disable Icon Tint For Thumbnails The introduction of themes seemed to apply tint globally to multiple View elements, including the ImageView used to display thumbnails. Consequently, while Glide would successfully load thumbnails, they would render as completely white or black (depending on the theme). We can workaround this by dynamically disabling tint when using Glide to load thumbnails. This fixes #166 and #310 . --- .../RecyclerViewAdapters/FileExplorerRecyclerViewAdapter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/ca/pkay/rcloneexplorer/RecyclerViewAdapters/FileExplorerRecyclerViewAdapter.java b/app/src/main/java/ca/pkay/rcloneexplorer/RecyclerViewAdapters/FileExplorerRecyclerViewAdapter.java index 67d9d70d6..561647b47 100644 --- a/app/src/main/java/ca/pkay/rcloneexplorer/RecyclerViewAdapters/FileExplorerRecyclerViewAdapter.java +++ b/app/src/main/java/ca/pkay/rcloneexplorer/RecyclerViewAdapters/FileExplorerRecyclerViewAdapter.java @@ -107,6 +107,9 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, int position) { boolean localLoad = item.getRemote().getType() == RemoteItem.SAFW; String mimeType = item.getMimeType(); if ((mimeType.startsWith("image/") || mimeType.startsWith("video/")) && item.getSize() <= sizeLimit) { + // Tint is applied across the board in the theme, so we want to disable it for thumbnails. + holder.fileIcon.setImageTintList(null); + RequestOptions glideOption = new RequestOptions() .centerCrop() .diskCacheStrategy(DiskCacheStrategy.ALL)