google / hover

A floating menu library for Android.
Apache License 2.0
2.64k stars 284 forks source link

When I set an image as drawable icon for the tab, it keeps resizing itself #98

Closed ghost closed 5 years ago

ghost commented 5 years ago

So I have found the solution - you need to create a BitmapDrawable from the input Drawable

Bitmap b = ((BitmapDrawable)image).getBitmap();
Bitmap bitmapResized = Bitmap.createScaledBitmap(b, 50, 50, false);
return new BitmapDrawable(context.getResources(), bitmapResized);