How to disable onscreenkeyboard in libgdx (android) - android

I have created my own onscreenkeyboard. When i focus to textfield it will automatically popup the keyboard. If i add Gdx.input.setOnscreenKeyboardVisible(false), to the focusing method the keyboard will show up anyway for a second. Has anyone got a workaround for this?
Thanks!

According to the documentation, you should be able to do setOnScreenKeyboard() and supply your custom OnScreenKeyboard implementation. My guess is that it is trying to call show() on both your keyboard and the default keyboard. Setting the keyboard to use will prevent the default from showing up.

Related

Can't hide soft keyboard using Titanium SDK - Android

I have an action bar that contains a Titanium searchView. Currently the searchView receives focus when the page loads and the soft keyboard is shown.
I need the soft keyboard to not be shown by default so that list data beneath it is viewable.
I have tried setting the windowSoftKeyboard property to hidden on the window as well as the searchView.
I've also tried using the blur method in various event listeners to hide the keyboard however nothing seems to work.
This is straight forward to do natively using Java so I feel there should be a straightforward way to do this using Titanium.
You can try below statements one by one.
First Solution: Define below window property in either XML or TSS
"windowSoftKeyboard":Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN
Second solution: This should write on window onOpen or onFocus listener
Titanium.UI.Android.hideSoftKeyboard();

Hide view when showing keyboard

I have two EditText views and one ImageView. My goal is to hide the ImageView when i am showing the keyboard (When the user have clicked on one of the EditText fields)
Then show the imageView again when the user have unfocused the EditText field or the keyboard is not visible anymore.
I have tried tons of different ways to do this. But nothing really works as intended. Do you guys have any idea how i could achieve this
Have you tried to detect if the keyboard is opened ? How do I Detect if Software Keyboard is Visible on Android Device?
Make debug and when is opened try to hide image . imageview.setvisibility (GONE)
if it does not work you can try to change layout
Make 2 layouts and switch visibility if the keyboard is open /closed
You can add a OnFocusChangeListener to the EditText,when you click the EditText,it will get focus,and then you can hide the ImageView.
<activity android:name="SearchResultsActivity"
android:windowSoftInputMode="adjustPan"/>
adjustPan:
The activity’s main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.
regards! :)
You can do one thing, place UIView-> UIImageView -> UITextfield1-> UITextField2.Handle the UIImageView hiding state in textfield delegates which are Begin and End editing delegate methods

android sdk custom keyboard not moving app

I think this issue was posted before. I'm having a custom keyboard and I need to make the app move above it like the softKeyboard with adjust does. Is it possible to do this? Can WindowManager help in any way?
if it's not possible, is it possible to assign a custom soft keyboard to an editbox in the app without prompting the user the dialog for choosing the custom soft keyboard?
Thank you
Can WindowManager help in any way?
WindowManager won't help here, but if you add your entire Keyboard layout to the end of your Activity's layout tree, it should push all other elements up. Using the WindowManager will allow you to "float" the keyboard above the rest of your View.
without prompting the user the dialog for choosing the custom soft keyboard?
This is not allowed for security reasons. You could override onTouch() for that EditText and show your own custom keyboard, but that's about all you can do.

Android hide keyboard but a cursor stays on screen

Good morning!
On an app that I'm working on, I hide the soft keyboard and have a dark overlay appear on screen. The issue I'm having is that after the keyboard is hidden, there is still a little indicator/cursor on the EditText.
How can I hide this?
Many thanks!
You can use either the xml attribute android:cursorVisible or the java function setCursorVisible(boolean).

Removing navigation buttons from android soft keyboard?

I would like to remove the navigation buttons at the bottom of the soft keyboard ( the buttons with the arrow- they act like a tab key to move between fields). I have had no luck trying to find a way to do this. Does anyone have any suggestions
What you're describing is device-specific, as each device has its own default soft keyboard. Unfortunately, you'll need to make a custom keyboard.
Look at the Keyboard class.
I don't believe it's possible to remove the button from the keyboard, but you can at least specify which neighbor the field gives focus to. See Handling UI Events on the Android Dev Guide.
Perhaps it's possible to set nextFocusDown to nothing, so the keyboard doesn't let the user navigate in that fashion. If that doesn't work, you might consider setting the field that takes focus next to setFocusable(false).

Categories

Resources