diff options
author | ByteHamster <info@bytehamster.com> | 2021-04-15 21:21:31 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-04-18 17:05:04 +0200 |
commit | d51e9c7625e0cf1d72c17e908312b7dd42363622 (patch) | |
tree | 02329281c174705226799b4b82271dba5d5e1640 /app/src/main/java/de/danoeh/antennapod/view | |
parent | 5c8163184325cabe371200994dbc14a4ab70d54c (diff) | |
download | AntennaPod-d51e9c7625e0cf1d72c17e908312b7dd42363622.zip |
Use VectorDrawable compat library
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/view')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java b/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java index eaad11d1a..d4bf44aa5 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/view/EmptyViewHandler.java @@ -2,15 +2,12 @@ package de.danoeh.antennapod.view; import android.content.Context;
import android.database.DataSetObserver;
-import android.graphics.drawable.Drawable;
import android.view.Gravity;
import android.widget.AbsListView;
import android.widget.FrameLayout;
import android.widget.ListAdapter;
import androidx.annotation.AttrRes;
-import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
-import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
@@ -18,6 +15,7 @@ import android.widget.RelativeLayout; import android.widget.TextView;
import de.danoeh.antennapod.R;
+import de.danoeh.antennapod.ui.common.ThemeUtils;
public class EmptyViewHandler {
private boolean layoutAdded = false;
@@ -52,10 +50,7 @@ public class EmptyViewHandler { }
public void setIcon(@AttrRes int iconAttr) {
- TypedValue typedValue = new TypedValue();
- context.getTheme().resolveAttribute(iconAttr, typedValue, true);
- Drawable d = ContextCompat.getDrawable(context, typedValue.resourceId);
- ivIcon.setImageDrawable(d);
+ ivIcon.setImageResource(ThemeUtils.getDrawableFromAttr(context, iconAttr));
ivIcon.setVisibility(View.VISIBLE);
}
|