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

14
LINES

< > BotCompany Repo | #1014867 // aAddMenuItems - add to Android context menu

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (1815L/12K).

1  
static void aAddMenuItems(fS... items) {
2  
  androidUI(r {
3  
    Menu menu = aGetOptionsMenu();
4  
    if (menu == null) ret;
5  
    Set<S> set = ciSet();
6  
    int n = menu.size();
7  
    for i to n:
8  
      set.add(str(menu.getItem(i).getTitle()));
9  
    
10  
    for (S s : items)
11  
      if (!set.contains(s))
12  
        menu.add(s);
13  
  });
14  
}

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: #1014867
Snippet name: aAddMenuItems - add to Android context menu
Eternal ID of this version: #1014867/5
Text MD5: 86c0370703ed165e461559ebaff4143c
Transpilation MD5: f0696f8931bd51d4ea6205ed2709eb98
Author: stefan
Category: javax / android
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-06-10 15:46:34
Source code size: 330 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 456 / 608
Version history: 4 change(s)
Referenced in: [show references]