Libraryless. Click here for Pure Java version (1513L/10K/35K).
1 | !7 |
2 | |
3 | import android.view.Menu; |
4 | import android.view.MenuItem; |
5 | |
6 | p { |
7 | Menu menu = cast getOpt(androidActivity(), 'optionsMenu); |
8 | print("Options menu: " + menu); |
9 | if (menu == null) ret with print("No menu, weird"); |
10 | int n = menu.size(); |
11 | print("Size: " + n); |
12 | for i to n: { |
13 | final MenuItem item = menu.getItem(i); |
14 | print("Item " + (i+1) + ": " + item.getTitle()); |
15 | androidUI(r { |
16 | item.setTitle(randomID()); |
17 | }); |
18 | } |
19 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, nbgitpuheiab, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014856 |
Snippet name: | Investigate/modify options menu [Android] |
Eternal ID of this version: | #1014856/6 |
Text MD5: | 6070310003c904a4e8abbd14fded374b |
Transpilation MD5: | 79f5f57e70e01c28d9566b380c0a6519 |
Author: | stefan |
Category: | javax / android |
Type: | JavaX source code (Android) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-05 17:21:15 |
Source code size: | 453 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 354 / 472 |
Version history: | 5 change(s) |
Referenced in: | [show references] |