What is the event called down arrow button in Android? - android

enter image description here
In android when we click on som input box , keyboard popups and backbutton changes to downarrow button. Anyone knows how to get the event of this button.
For backbutton I am getting the event using the below code.
document.addEventListener("buttondown", this.onBackKeyDown, false);
How can I get the event of the other button and can anyone please tell me what is the name of the button?

Anyone knows how to get the event of this button
There is no event for that button.
what is the name of the button?
It is the BACK button. It is handled purely by the system when the input method editor (a.k.a., soft keyboard) is visible.

Related

How to Call an Event on android softkeyboard back button in Appcelerator

I am new in appcelerator. I have an issue. I need to call an event when android soft keyboard disappeared by clicking android back button(hardware back button). I can call event when we pressed done/enter button in soft keyboard. But i need to call the event when soft keyboard disappear(by clicking hardware android back button).
Any help will be deeply appreciated. Thank you
You need to add a listener to keyboardFrameChanged, with a little of code you can control if the frame change was caused by the appearence or the disappearence of the keyboard.

Lose Focus when clicking actionbar button

I have implemented a listener : onFocusChanged to insert values in db when a edittext lose focus.
The thing is when I click the Send button (in action bar), it first do the action, and then it triggers a last onFocusChanged.
It should first lose the focus, and then execute the action?
Can anybody explain me that?
The solution should be giving focus to another button that is not edittext, but I just have a actionbar button, and it seems difficult giving it the focus.
Any suggestion will be appreciated !
I suspect that tapping the Send button isn't changing the focus at all (it is probably a nonfocusable view). What does your send operation do? Is there something at the end of Send which might be setting focus to some other view?

How to put a button on the default keyboard? I want a button that when is pressed, it chance to another activity

I have a EditText in my activity. I want that when the user finish the text, he can move to the next activity without press back button to hide the keyboard. I was wondering if there a way to put a button on softkeyboard to move to next activity.
(Sorry for bad english, its not my native language)
You can't add buttons to an existing keyboard. However, you can suggest a label and id for the custom IME action. See TextView.setImeActionLabel:
Change the custom IME action associated with the text view, which will be reported to an IME with actionLabel and actionId when it has focus.
You'll then have to call TextView.setOnEditorActionListener to provide a custom listener to listen for that IME event where you can then move to your next activity.

When pressing enter inside TextView, click button?

I have a text view (and possibly 1 or 2 Spinners after it) and a Button. When a user presses the enter key (soft or hard keyboard), I want to Click the Search button, which is next.
Is it only possible to do this by overriding the onKey event of the TextView and when Enter is pressed, performClick() the Button?
I can't find much information from Google, but i could be searching for the wrong term.
Cheers,
D
yes this is only possible by overriding the onKey event.
Why don't you just perform the action that the button click fires directly from the onClick-method on the TextField?

How to map Soft Keyboard button to button on screen in Android?

Is there any way out for mapping the Done button to the button on the screen in Android. What I want is that I have one login screen user enters username and presses the next button on the soft keyboard which brings the focus on password field. AFter entering password when the user presses done button then the action which is performed on login button should be called.
Let me know if this is possible.
In your layout file, you can specify the focus order using attributes like nextFocusDown. If you have the focus order configured properly, hitting next should automatically take you to the next focusable element.
You can also add a KeyListener to the edit text to listen for the next key and set the focus accordingly.

Categories

Resources