1 | import android.app.*; |
2 | import android.widget.*; |
3 | import android.view.*; |
4 | import android.graphics.*; |
5 | |
6 | static ImageButton aImageButton(fS imageID, fO action) {
|
7 | ret androidUI(func -> ImageButton {
|
8 | final ImageButton b = new(androidActivity()); |
9 | aSetImageFromSnippet(b, imageID); |
10 | if (action != null) |
11 | b.setOnClickListener(new View.OnClickListener() {
|
12 | public void onClick(View v) {
|
13 | pcallF(action); |
14 | } |
15 | }); |
16 | ret b; |
17 | }); |
18 | } |
19 | |
20 | static ImageButton aImageButton(S imageID) {
|
21 | ret aImageButton(imageID, null); |
22 | } |
Began life as a copy of #1008233
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: | #1014894 |
| Snippet name: | aImageButton - make Android image button |
| Eternal ID of this version: | #1014894/5 |
| Text MD5: | b0db17280a9036f4f1ac84f6df42f7b4 |
| Author: | stefan |
| Category: | javax / android |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-06 10:09:26 |
| Source code size: | 567 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 629 / 685 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |