static void setWidgetColor(int col) { int w=1, h=1; int[] pixels = new int[w*h]; for (int i=0; i < w*h; i++) pixels[i] = col; Bitmap bitmap = Bitmap.createBitmap(pixels, w, h, Bitmap.Config.RGB_565); call(androidContext, "updateWidgetWithBitmap", bitmap); }
Began life as a copy of #1000427
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000441 |
Snippet name: | setWidgetColor |
Eternal ID of this version: | #1000441/1 |
Text MD5: | f231aa7aedb4754f83e089dfd0fa7bfb |
Author: | stefan |
Category: | javax android |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-08-06 04:14:23 |
Source code size: | 310 bytes / 10 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 602 / 868 |
Referenced in: | #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |