Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
how to remove border of native-ui textinput(textbox) in android ? — Gideros Forum

how to remove border of native-ui textinput(textbox) in android ?

edited September 2014 in General questions
how to remove border of native-ui textinput(textbox) in android ?

Comments

  • or is there any way to open keyboard without clicking on textbox so i can put my textbox outside of the screen and call keyboad manually and copy content on textbox in my place.

    basically all i want is a way to hide the textbox

    thanks in advance
  • @bharat_prajapati then why would you need textbox at all?
    Does simply listening to Key Down events and checking which letter was input is not enough?
  • Yes enough but how can i open keyboard without textbox?
  • Ah, yes sorry, I was too tired yesterday to think of that :D

    So if you are using Android native UI, then most probably you are using GBridge.

    So you can add method in GBridge.java:
    public static void toggleKeyboard(){
    	InputMethodManager imm = (InputMethodManager)sActivity.get().getSystemService(Context.INPUT_METHOD_SERVICE); 
    	if(imm != null)
    		imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, InputMethodManager.HIDE_IMPLICIT_ONLY);
    }
    And then use it in in lua like this:
    local bridge = native.getClass("com.giderosmobile.android.plugins.bridge.GBridge")
    bridge.toggleKeyboard()
    Unfortunately I don't know much about ios on this side
  • thanks ,
    now i want event when user click on keyboard's done button
  • Hi @ar2rsawseen

    I am also stucked here with same problem i dont want to show textbox as it is not looking good. so basically i had created textbox with height and width of 1 px so it is hardly visible. and then manually calling toggleKeyboard() and with gettext i am taking textbox's data in my target area. now the problem is because of the keyboard i have to take some part up with stage:setY(-100) and now i am stucked as i can not get when keyboard is closed. is there any event with which i can know keyboard has been closed or done button in the keyboard has been pressed

    Thanks
  • talistalis Guru
    edited September 2014
    editText = (EditText) findViewById(R.id.edit_text);
     
    editText.setOnEditorActionListener(new OnEditorActionListener() {
        <a href="https://forum.giderosmobile.com/profile/Override" rel="nofollow">@Override</a>
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            if (actionId == EditorInfo.IME_ACTION_DONE) {
                // do your stuff here
            }
            return false;
        }
    });
    Ok i never used Gbridge plugin before, but in native android you can define and listener on EditText and listen for "IME_ACTION_DONE" event.

    I don't know how to implement this code Gbidge.java need to try :D
  • I also dont know how to handle this in Gbridge @ar2sawseen is only hope :D

    :)
  • Hmm, honestly I don't know from the first look
    I helped @unlying to create a game with functioning soft keyboard through GBridge
    and that was basically all I gave him, the rest he did himself somehow :)

    Would need to experiment if it raised any focus events or maybe dispatches specific key event?
  • @ar2rsawseen :- cool please share when you found a way for same

    :)
Sign In or Register to comment.