1 | static void setWidgetColor(int col) { |
2 | int w=1, h=1; |
3 | int[] pixels = new int[w*h]; |
4 | for (int i=0; i < w*h; i++) |
5 | pixels[i] = col; |
6 | |
7 | Bitmap bitmap = Bitmap.createBitmap(pixels, w, h, Bitmap.Config.RGB_565); |
8 | |
9 | call(androidContext, "updateWidgetWithBitmap", bitmap); |
10 | } |
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: | 603 / 869 |
Referenced in: | [show references] |