1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 19:36:50 +01:00

Bangle.js - Minor tweaks to sizes for drawableToBitmap

This commit is contained in:
Gordon Williams 2021-12-09 16:14:06 +00:00
parent e82662f0bf
commit 228008e42c

View File

@ -633,15 +633,14 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
return bitmapDrawable.getBitmap();
}
}
int w = 1;
int h = 8;
int w = 24;
int h = 24;
if (drawable.getIntrinsicWidth() > 0 && drawable.getIntrinsicHeight() > 0) {
} else {
w = drawable.getIntrinsicWidth();
h = drawable.getIntrinsicHeight();
if (w>64) w=64;
if (h>64) h=64;
// don't allocate anything too big
if (w>24) w=24;
if (h>24) h=24;
}
Bitmap bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); // Single color bitmap will be created of 1x1 pixel