parent
dfcc8d7c37
commit
9bf12085bf
1 changed files with 2 additions and 1 deletions
|
@ -29,6 +29,7 @@ import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
|
|
||||||
import org.shadowice.flocke.andotp.R;
|
import org.shadowice.flocke.andotp.R;
|
||||||
|
|
||||||
|
@ -305,7 +306,7 @@ public class EntryThumbnail {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (thumbnail.getAssetType() == AssetType.Vector) {
|
if (thumbnail.getAssetType() == AssetType.Vector) {
|
||||||
Drawable drawable = context.getResources().getDrawable(thumbnail.getResource());
|
Drawable drawable = AppCompatResources.getDrawable(context, thumbnail.getResource());
|
||||||
Bitmap bitmap = Bitmap.createBitmap(drawable.getMinimumWidth(), drawable.getMinimumHeight(), Bitmap.Config.ARGB_8888);
|
Bitmap bitmap = Bitmap.createBitmap(drawable.getMinimumWidth(), drawable.getMinimumHeight(), Bitmap.Config.ARGB_8888);
|
||||||
Canvas canvas = new Canvas(bitmap);
|
Canvas canvas = new Canvas(bitmap);
|
||||||
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
|
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
|
||||||
|
|
Loading…
Reference in a new issue