I use this code to get a Bitmap object from a bitmap image from drawable resources:
Bitmap avatar = ((BitmapDrawable) getDrawable(R.drawable.avatar_bpm)).getBitmap();
The code works but android studio suggests I use: Use ContextCompat.getDrawable()
What is it mean? And how do I convert my code to use the suggested version ?