Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1000441 // setWidgetColor

JavaX fragment (include)

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);
    }

Author comment

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: 542 / 801
Referenced in: [show references]