From d1e04bab7a93b80479855f2ee115d6ee7b90c7bb Mon Sep 17 00:00:00 2001 From: jacques Date: Sun, 13 Mar 2022 12:49:46 +0100 Subject: [PATCH] Use modern call for resource --- .../net/foucry/pilldroid/SimpleDividerItemDecoration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/foucry/pilldroid/SimpleDividerItemDecoration.java b/app/src/main/java/net/foucry/pilldroid/SimpleDividerItemDecoration.java index ea424b5..e6fa4c4 100644 --- a/app/src/main/java/net/foucry/pilldroid/SimpleDividerItemDecoration.java +++ b/app/src/main/java/net/foucry/pilldroid/SimpleDividerItemDecoration.java @@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable; import android.view.View; import androidx.annotation.NonNull; +import androidx.appcompat.content.res.AppCompatResources; import androidx.recyclerview.widget.RecyclerView; /** @@ -15,7 +16,8 @@ public class SimpleDividerItemDecoration extends RecyclerView.ItemDecoration { private final Drawable mDivider; SimpleDividerItemDecoration(Context context) { - mDivider = context.getDrawable(R.drawable.line_divider); + //mDivider = context.getDrawable(R.drawable.line_divider); + mDivider = AppCompatResources.getDrawable(context, R.drawable.line_divider); } @Override