diff --git a/app/src/main/java/eu/faircode/netguard/AdapterRule.java b/app/src/main/java/eu/faircode/netguard/AdapterRule.java index a33c512d..b872abfe 100644 --- a/app/src/main/java/eu/faircode/netguard/AdapterRule.java +++ b/app/src/main/java/eu/faircode/netguard/AdapterRule.java @@ -69,6 +69,9 @@ import android.widget.PopupMenu; import android.widget.RelativeLayout; import android.widget.TextView; +import com.bumptech.glide.load.DecodeFormat; +import com.bumptech.glide.request.RequestOptions; + import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; @@ -335,6 +338,7 @@ public class AdapterRule extends RecyclerView.Adapter im else { Uri uri = Uri.parse("android.resource://" + rule.packageName + "/" + rule.icon); GlideApp.with(context) + .applyDefaultRequestOptions(new RequestOptions().format(DecodeFormat.PREFER_RGB_565)) .load(uri) .override(iconSize, iconSize) .into(holder.ivIcon); @@ -833,6 +837,8 @@ public class AdapterRule extends RecyclerView.Adapter im public void onViewRecycled(ViewHolder holder) { super.onViewRecycled(holder); + GlideApp.with(context).clear(holder.ivIcon); + CursorAdapter adapter = (CursorAdapter) holder.lvAccess.getAdapter(); if (adapter != null) { Log.i(TAG, "Closing access cursor");