getResources (). getDrawable (R.drawable.my_icon) obsolete, how to proceed

0

Hello, I'm having problems with the fact that getDrawable is deprecated. Why, how can I convert my code so that it can be updated? Thank you in advance!

int height = 100;
    int width = 100;
    BitmapDrawable bitmapdraw=(BitmapDrawable)getResources().getDrawable(R.mipmap.guardian_ico);
    Bitmap b=bitmapdraw.getBitmap();
    Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);
    
asked by anonymous 09.05.2017 / 08:14

1 answer

0

Even though your question is not very objective, I infer from the syntax you are programming for Android with the Java language using Android Studio. Use the Picasso library to manipulate images. It is easy to integrate and super easy to use. Here's the link to Doc on how to implement and how to use it: link

    
09.05.2017 / 16:35