android-virtual-keyboard

How to hide Android Soft Keyboard? [duplicate]

天涯浪子 提交于 2019-12-02 23:52:02
问题 This question already has answers here : How to set visibility Android Soft Keyboard (97 answers) Closed 5 years ago . I have two EditText Views and a Button in Linearlayout. After Completion of writing in the edittext, I want to hide the Android Virtual keyboard, How can I do that? 回答1: You may use the InputMethodManager class like this: InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow( yourEditText.getWindowToken()

How to hide Android Soft Keyboard? [duplicate]

你说的曾经没有我的故事 提交于 2019-12-02 13:44:07
This question already has an answer here: Close/hide the Android Soft Keyboard 96 answers I have two EditText Views and a Button in Linearlayout. After Completion of writing in the edittext, I want to hide the Android Virtual keyboard, How can I do that? Lucifer You may use the InputMethodManager class like this: InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow( yourEditText.getWindowToken(),InputMethodManager.RESULT_UNCHANGED_SHOWN); 来源: https://stackoverflow.com/questions/22404302/how-to-hide-android-soft-keyboard

CodenameOne: VKB changes the screen

守給你的承諾、 提交于 2019-12-01 13:28:34
I have a an app developed on CodenameOne platform where I have textfields for manuel input. Each time when the VKB shows on android, the contents of the screen are pushed to bottom and especially the textfield becomes so thin that no characters can be seen. How can I prevent this? On android when the VKB is launched the Form gets a sizeChanged event, to prevent this behavior you can declare the textfields parent container as a scrollable Y container BoxLayout Y 来源: https://stackoverflow.com/questions/34577064/codenameone-vkb-changes-the-screen

CodenameOne: VKB changes the screen

◇◆丶佛笑我妖孽 提交于 2019-12-01 10:49:32
问题 I have a an app developed on CodenameOne platform where I have textfields for manuel input. Each time when the VKB shows on android, the contents of the screen are pushed to bottom and especially the textfield becomes so thin that no characters can be seen. How can I prevent this? 回答1: On android when the VKB is launched the Form gets a sizeChanged event, to prevent this behavior you can declare the textfields parent container as a scrollable Y container BoxLayout Y 来源: https://stackoverflow

Android+PhoneGap: android:windowSoftInputMode doesn't seem to work

雨燕双飞 提交于 2019-12-01 03:53:24
I'm developing a PhoneGap-based application and I googled much about how to make my webview adjust its height when virtual keyboard appears, or at least get height of the virtual keyboard. I found a lot of posts (including stackoverflow) which says that android:windowSoftInputMode="adjustResize" must be set in the manifest and I did that. I also found that for PhoneGap config.xml there's <preference name="android-windowSoftInputMode" value="adjustResize"/> setting and I pasted that too. I also tried combined value 'stateVisible|adjustResize' (not just 'adjustResize') for both parameters, but

EditText onClick not shows Virtual Keyboard

元气小坏坏 提交于 2019-11-30 20:57:54
If i click on my EditText, the virtual keyboard simple not shows up. The cursor is shown, but no keyboard to type on. I even tried it with manually open but just no works. Here is my code: public class CreateNote extends Activity { EditText titleEdit; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.createnote); titleEdit = (EditText) findViewById(R.id.titleEdit); titleEdit.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { InputMethodManager imm = (InputMethodManager) CreateNote.this

Keyboard hide event with BACK key

穿精又带淫゛_ 提交于 2019-11-30 07:31:02
I've noticed in the Android Market Application , when you click over the search button, it shows the keyboard, but when you click the back button, the search EditText becomes invisible and the keyboard is hidden. The problem is that I can't hide the EditText after the keyboard is hidden after pressing the back key because I can't find a listener for hiding the keyboard event. I found this sample How to capture the "virtual keyboard show/hide" event in Android? but it doesn't work on the soft keyboard. You need to implement this to capture the BACK button before it is dispatched to the IME:

Keyboard hide event with BACK key

↘锁芯ラ 提交于 2019-11-29 09:57:43
问题 I've noticed in the Android Market Application , when you click over the search button, it shows the keyboard, but when you click the back button, the search EditText becomes invisible and the keyboard is hidden. The problem is that I can't hide the EditText after the keyboard is hidden after pressing the back key because I can't find a listener for hiding the keyboard event. I found this sample How to capture the "virtual keyboard show/hide" event in Android? but it doesn't work on the soft

How to disable physical keyboard in code(use virtual keyboard all the time)

拈花ヽ惹草 提交于 2019-11-28 20:26:31
You might ask why do I want that. Here is the reason: I used a barcode scanner for the login screen of my application. However connecting the barcode scanner will force my tablet to use the physical keyboard (it thinks the scanner is the keyboard) and that prevents the virtual keyboard from coming up (which I want for some other screens). I have to manually click on the system bar to disable the physical keyboard for the virtual keyboard to popup. So, is there a way to disable the physical keyboard in code or make the virtual keyboard come up even if some "keyboard" is connected? Try the

How to disable physical keyboard in code(use virtual keyboard all the time)

余生长醉 提交于 2019-11-27 12:56:34
问题 You might ask why do I want that. Here is the reason: I used a barcode scanner for the login screen of my application. However connecting the barcode scanner will force my tablet to use the physical keyboard (it thinks the scanner is the keyboard) and that prevents the virtual keyboard from coming up (which I want for some other screens). I have to manually click on the system bar to disable the physical keyboard for the virtual keyboard to popup. So, is there a way to disable the physical