android-softkeyboard

React-native: when submitting a text input in android, the word suggestions are not cleared

丶灬走出姿态 提交于 2019-12-05 18:46:34
I have an Android app built with React native. The app has a TextInput and a submit button. When typing in the text input, the default keyboard starts suggesting words (not sure how this feature is called - auto complete or predictive text). When clicking submit, the data is stored and the TextInput is cleared via the "clear()" method of the TextInput. For example: this.refs.textInput.clear(); For some reason, the "predictive text" is not cleared after the "clear()" method is called. As a result, when the user start typing again, the predictive text continues from where it stopped and the user

Keyboard disappears on orientation change

北城余情 提交于 2019-12-05 17:25:14
I have a fragment with EditText and add it into the layout using transactions. But if I rotate to landscape the soft keyboard disappears. public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (getSupportFragmentManager().findFragmentById(R.id.fragmentContainer) == null) { getSupportFragmentManager().beginTransaction() .add(R.id.fragmentContainer, new FragmentWithEditText()) .commit(); } } } I want keyboard state still unchanged after rotate using

Why do the Android Keyboard pops up when adding a ListView

感情迁移 提交于 2019-12-05 17:12:15
I'm facing a weird problem when adding a ListView to my layout. My layout contains 2 EditText and when I start the activity, the keyboard doesn't pop automatically. But when I add a ListView anywhere in the layout, the keyboard pop up when the activity starts. I know there are many ways to hide the keyboard like this one: getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) and you may have seen other solutions to the problems like here and here but my question is not how to prevent this but why is this happening ? I have created a simple example to demonstrate this

Custom keyboard like gif keyboard in android

不想你离开。 提交于 2019-12-05 13:32:36
I'm developing a custom Android keyboard like gif keyboard( https://play.google.com/store/apps/details?id=bo.pic.android.keyboard&hl=ko ). When i click a specific button, I want to change to A view. I cannot find a way to change to A view. Or is it not A view? 来源: https://stackoverflow.com/questions/32395655/custom-keyboard-like-gif-keyboard-in-android

AdjustResize with animation

房东的猫 提交于 2019-12-05 12:55:24
问题 I have used android:windowSoftInputMode="adjustResize" in the manifest to prevent keyboard from hiding the activity button. It works, but when keyboard opens, my button moves up. It is a bit jumpy, I wanted to know - can I have any animation for that to transition smoothly? <activity android:name=".Activity" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize"> </activity> 回答1: The method setSoftInputMode(int) cannot be overrided, its implementation is inside Window

Having Trouble with Soft Keyboard

☆樱花仙子☆ 提交于 2019-12-05 10:37:28
Hi Everyone iam new to Android and stuck in really silly problem in my project i have one EditText which is defined in Header View of a List View whenever users touches the EditText soft keyboard will be displayed. i have something called clear button which clears the EditText After clearing soft keyboard is not displaying in 2.3 devices.Whenever i press lock/power button lock the device and unlock then soft keyboard is displaying <activity android:name=".pl.Mobile.AddJobNew" android:configChanges="orientation|keyboardHidden" android:screenOrientation="landscape" android:windowSoftInputMode=

Dialog goes up when softkeyboard is shown

☆樱花仙子☆ 提交于 2019-12-05 10:01:14
I have a class that extends Dialog . In that Dialog I have an EditText and a ListView . I can bring soft keyboard up when that dialog is shown. But my problem is can we make dialog not to go up when soft keyboard is shown? I tried to change softInputMode in layout params to adjust resize but it's not working. My Dialog uses x and y position, when soft keyboard is shown and dialog goes up, my dialog is not in the position I want. Dekra Try to do this: dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); If you want it to resize and not just shift up use: dialog

Android: Tie a SoftKeyboard (InputMethodService) to an EditText

江枫思渺然 提交于 2019-12-05 05:59:40
问题 I'm trying to convince an EditText -view to only use the SoftKeyboard that I wrote. It's bugging me for a few days already and I can't believe that this isn't possible to do. I might not see the obvious... So far I managed to write my own SoftKeyboard based on the sample that comes with the Android SDK. I'm able to manually select it as the input method (long click, input method, *pick*). The SoftKeyboard then works fine and does everything I want. I also cleaned up the context menu to

Why android InputMethodManager.showSoftInput() returns false?

為{幸葍}努か 提交于 2019-12-05 03:39:59
Recently while developing an app, I faced an issue. I have searched a lot on google but couldn't find any solution. In the end I came across this Android issue tracker To explain my issue, I have made a sample App. Basic Working of my Sample App I have a screen, which has an EditText, a Button and a RelativeLayout. Width and Height of RelativeLayout is 0px. It is just a view to move focus away from EditText. When App is launched focus is on RelativeLayout, not on EditText(so that there is not blinking cursor in it.) When a user clicks on Button I just move focus to RelativeLayout using

Close/hide the Android Soft Keyboard on activity state onStop

只愿长相守 提交于 2019-12-05 03:02:38
I have an EditText and a Button in my layout. After writing in the edit field and click this button to go back my fragment , I want to hide the virtual keyboard. I assume that there's a simple, but i tried some way and it not work: That code show how the Button work: private void onButtonClicked(){ getActivity().getSupportFragmentManager().popBackStack(); } That code for some solution but that can't help. This code i using hideSoftInputFromWindow but when i call 'EditText.getWindowToken()', it not hide the soft keyboard (I also change the 0 value to InputMethodManager.HIDE_IMPLICIT_ONLY or