How to change IME Action dynamically in android for webkit - android

When I tap on input[type=number] element in HTML page (Note: html page has only one input element), the keyboard appear with "NEXT" button.
How can I change this NEXT button to DONE/OK or hide it in android 2.3, is it possible to change/hide it?

you can change the ime options by using below code:
input type="text" style="-ms-image-mode: active; ime-mode: active;
Hope it will help. Thanks

Related

Show Keyboard dynamically in ionic

I am trying to display keyboard in ionic dynamically with no luck. I have a text field like
<input type="search" placeholder="Search" ng-change="onSearchChange()" ng-click="clicked()" ng-model="searchVal" id="MyField" ng-controller="searchCtrl" >
in clicked function i am navigation to new page like
$state.go("tabs.searchresult");
but there is no keyboard on next page. I want to show keyboard on searchresult.
#nOmi: As my understanding.
You are in the search page has a search box with id = MyField, then you type a keyword. After touch to tap icon or tap enter, it will go to search result page.
In search result page, it also have an input with id = MyField in the top with result below. And you also want to show the keyboard.
If it is, please do so.
$state.go('tabs.searchresult').then(function() {
$('#MyField').focus();//YOU WILL NEED JQUERY FOR THAT ONE.
});
If in the search result page doesn't have any text box. You need to install ionic keyboard plugin to trigger show keyboard dynamically.
The script will be
$state.go('tabs.searchresult').then(function() {
cordova.plugins.Keyboard.show();
});

AS3 Air for Android programatically show soft keyboard

Is there a way in AS3 Air for Android to show the soft keyboard programatically?
I have a project where when the user clicks a button, it pops up a form for them to enter their email address. I have it set to programatically focus on the "TextInput", but unfortunately this doesn't automatically bring up the keyboard. So the user has to tap the "TextInput" field again to bring up the keyboard.
Is there a way to just call a "show keyboard" function? I tried adding:
email_txt.needsSoftKeyboard = true;
But that doesn't seem to help.
Thanks!
Figured it out. I just had to call requestSoftKeyboard(); on the TextInput component.
email_txt.requestSoftKeyboard();
Not sure why that was so hard to search for the answer.

Enter and Return button in a single keyboard in android

I need my soft keyboard input to have both return button AND done button so that the user can write paragraphs in my EditText and click on Done to close the keyboard. Is this possible?
I've tried:
android:inputType="textMultiLine"
android:imeOptions="actionDone"
together but it didn't work.
PS: I'm testing on Samsung keyboard type.
No, I believe it's not possible prior to API level 11 (3.0).
The same issue cropped up here (discussed in the comments to the accepted answer):
Android Soft keyboard action button
From the final comment:
Looking at a few apps on my phone, it seems common to have the multiline box last, with a visible "Done" or "Send" button below it (e.g. Email app).

html phonegap android : numeric soft keyboard has next instead of go button

This is driving me crazy and I can't find the answer anywhere.
I have forms in my phonegap app. If the input type="text", the text keyboard pops up and "go" is displayed in the corner. When you click go, it submits the form. That all works as I would expect. But if I use input type="number", the number keyboard pops up and "next" is displayed in the corner. When you click next, if there is another input box before the button tag, it goes to that input. That's okay. . . not ideal, but makes sense. But if it is the last input field on the page, click "next" does nothing. It doesn't put focus on the button (even with tabindex) and it doesn't submit the form (ideal).
I'm using phonegap 1.3.0 and jquery 1.7 if any of that helps.
You can detect the next keyboard press by using the following bind in JQuery:
$('input').on('keydown', function(e){
if(e.which === 9) {
//your code here
}
});
The 'next' button emulates the tab keypress event on a keyboard, which is key code 9. Unfortunately, keypress and keyup events do not detect the next key event, so you need to bind it on keydown.
Hope that helps!
Okay, now I do have something that looks like an answer and quacks like an answer.
It's a horrible hack, and I am experiencing some side-effects at this point, but it's a small leap for mankind anyway.
Add an invisible text input to your form, which automatically submits the form as soon as it receives focus. Since it can only receive focus from the user pressing 'Next' or tabbing from the last number field, there should be a pretty solid logic in the user sequence.
<input type='text' style="opacity:0;" onfocus="javascript:$('#thisForm').submit();">
The side effects are:
the hidden form field will briefly be visible. You can avoid this by
using the onfocus handler to also re-focus on the number field that
was just left. Or you can set the width of the input to 0. The latter works best for me.
if you're using jQueryMobile like me, you're inviting horrible page transition ugliness on yourself, so if your form is in a dialog and submitting the form closes the dialog, be sure to set the dialog transition (when it is being opened from a previous screen) to 'none'.

How do I customize imeoptions for text boxes of web form developed for Android

I have a webform that is integrated into a native app via a webview. But now when the user sets the focus on the first textbox of the form, I see a Go button on the soft keyboard. Instead, I'd like to have Next button, clicking on which would take me to the next input control. And the last input control alone should have Go button on keyboard. How do I achieve this? (Note: Please note that I want this on a web form. I've already found material on how to do this on a native form.)
Please go to take a look, is that what you are looking for?
How to change the Android softkey keyboard "Go" button to "Next"

Categories

Resources