User Tag List

Results 1 to 4 of 4

Thread: Softkeyboard: perform action when Done key is pressed

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    Lacey, WA
    Posts
    756
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Softkeyboard: perform action when Done key is pressed

    When I have the Android's Soft Keyboard visible on screen, how can I detect if the user pressed his keyboard's Done/Go/Whatever button?

    In Java, you can do this like so, according to a StackOverflow article:

    Code:
    editText.setOnEditorActionListener(new OnEditorActionListener() {        
        @Override
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            if(actionId==EditorInfo.IME_ACTION_DONE){
                //do something
            }
        return false;
        }
    });
    Also! I'd like to request a way to get the keyboard height please

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Bipolar_Games View Post
    When I have the Android's Soft Keyboard visible on screen, how can I detect if the user pressed his keyboard's Done/Go/Whatever button?

    In Java, you can do this like so, according to a StackOverflow article:

    Code:
    editText.setOnEditorActionListener(new OnEditorActionListener() {        
        @Override
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            if(actionId==EditorInfo.IME_ACTION_DONE){
                //do something
            }
        return false;
        }
    });
    Also! I'd like to request a way to get the keyboard height please
    For the first thing, a new object might be needed, but, since you've already posted the code, it shouldn't be too hard for somebody to do it.

    For the second thing, I'm not 100% sure that you can retrieve the height of the keyboard in Android, though I'm probably mistaken.

  3. #3
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    any idea how i can perform an action, if the user tabs the DONE button of the keyboard?

    is there actually no way? (keycode 66 doesnt work for me)

    my edit box still stays in FOCUS.

  4. #4
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,784
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    In next beta you will be able to detect keypress inside editbox also enter and delete, notice that enter represent different things if use in a multi line editbox or a single line

Similar Threads

  1. Action for "Don't perform events"?
    By Soilydude in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th July 2013, 06:52 PM
  2. No key pressed.
    By Fanotherpg in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th December 2011, 12:54 AM
  3. Good way to perform searches on remote documents?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 15th October 2010, 05:22 PM
  4. Simulating a key pressed outside MMF
    By Brovic in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 23rd May 2007, 10:21 PM
  5. How to combinate two keys to perform actions?
    By The Thinker in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 8th November 2006, 11:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •