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

14
LINES

< > BotCompany Repo | #1014917 // aOnEnter - actually reacts to the Android keyboard's "Done" button

JavaX fragment (include)

1  
static void aOnEnter(final EditText tv, fO r) {
2  
  androidUI(r {
3  
    tv.setOnEditorActionListener(new TextView.OnEditorActionListener() {
4  
      public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
5  
        if (/*event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER ||*/ actionId == EditorInfo.IME_ACTION_DONE) {
6  
          aHideKeyboard();
7  
          tv.selectAll();
8  
          pcallF(r);
9  
        }
10  
        true;
11  
      }
12  
    });
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: #1014917
Snippet name: aOnEnter - actually reacts to the Android keyboard's "Done" button
Eternal ID of this version: #1014917/10
Text MD5: 979da47890702891ef2ad2bcc1e73906
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 13:13:08
Source code size: 474 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 363 / 397
Version history: 9 change(s)
Referenced in: [show references]