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:
parent
e82662f0bf
commit
228008e42c
@ -633,15 +633,14 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
return bitmapDrawable.getBitmap();
|
return bitmapDrawable.getBitmap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int w = 1;
|
int w = 24;
|
||||||
int h = 8;
|
int h = 24;
|
||||||
if (drawable.getIntrinsicWidth() > 0 && drawable.getIntrinsicHeight() > 0) {
|
if (drawable.getIntrinsicWidth() > 0 && drawable.getIntrinsicHeight() > 0) {
|
||||||
|
|
||||||
} else {
|
|
||||||
w = drawable.getIntrinsicWidth();
|
w = drawable.getIntrinsicWidth();
|
||||||
h = drawable.getIntrinsicHeight();
|
h = drawable.getIntrinsicHeight();
|
||||||
if (w>64) w=64;
|
// don't allocate anything too big
|
||||||
if (h>64) h=64;
|
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
|
Bitmap bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); // Single color bitmap will be created of 1x1 pixel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user