import android.graphics.*; static ImageView androidClickableImage(fS imageID, final int borderColor, fO onClick) { ret androidEvalInUIThread(func -> ImageView { ImageView iv = new ImageView(androidContext()); iv.setBackgroundColor(borderColor); aSetImageFromSnippet(iv, imageID); if (onClick != null) iv.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { pcallF(onClick); } }); ret iv; }); }
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: | #1014877 |
Snippet name: | androidClickableImage |
Eternal ID of this version: | #1014877/5 |
Text MD5: | 85a766e276036f7ad2efe2dfcb3e35a4 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-06 10:09:42 |
Source code size: | 496 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 353 / 402 |
Version history: | 4 change(s) |
Referenced in: | [show references] |