I want to disable long press of menu button in android. I override onkeylongpress because i want the keyboard not to display but unfortunately, menu button was totally disabled. I want to disable the long press of menu button only. How can i do this? Please help!
Please don't do that. In my device (Samsung Galaxy S2) you long pressing menu is like pressing search (the device doesn't have a dedicated search button). What I mean is that this is not a default for all android devices, if you change that you may break your app in some devices.
If you really want to do that though, you might want to watch for when the soft keyboard is shown/hidden. Here: How to check visibility of software keyboard in Android?
if you want to play with screen keyboard here are some options.........
android:windowSoftInputMode=["stateUnspecifie", "stateUnchanged", "stateHidden" "stateAlwaysHidden", "stateVisible", "stateAlwaysVisible", "adjustUnspecified", "adjustResize", "adjustPan"] ......
declare it in manifest's activity........
Related
I looked for the question everywhere on the Internet but can't find the answer. What I found is to hide the whole button tray all together.
When the keyboard is down, the button is shown as in the picture.
But when the keyboard is showing the icon changes to -
My problem is to change the button (as in the second image), when my emoticons are showing. So, is there any way by which I can programatically change the button on an event and change it back on another event?
I'm afraid this is not possible yet. Perhaps this will be implemented in later versions of Android.
Not all devices have an onscreen navigation bar, a lot of devices still have hardware buttons.
Nevertheless, you'll might find this article interesting: http://arpitonline.com/blog/2014/07/27/improving-androids-navigationbar/
I have developed an application for the slate 21 hp device. I wrote code for the next button of the soft keyboard and it is working fine. However, on long press on next button it shows prev button but when I click on it, it performs some unusual way. I researched and found that we can use either next or prev, so I want to know is: when the device is showing prev, is there any way to hide the prev button?
Thanks in advance.
you must change android:imeOptions="actionNone" in your edittext or other component
Does anybody know how to programmatically disable the keyboard individual letter pop-up?
(This blue pop-up when you click in a letter on the virtual keyboard of the device.)
You can't do this from an application.
If the keyboard on a device is built to do this, the only option you have is to build/install/use a different keyboard that doesn't do it.
Applications are not capable of manipulating the system keyboard (except for small things like ime options, inputType etc.)
In your phone, go to Settings --> Language and Input --> Select the keyboard type that you are using. (In my case it says Samsung keyboard). Select the settings icon next to it. There is an option called "Character preview". Disable it.
Is there a way to find out when did a user click "Setting" options on the screen menu?
The onClick listner's KeyDown events catches only the hardware buttons on the phone and not the clicks of the sofware keyboard that shows up when a textbox/editText gets a focus and the key guard shows up.
Is it even possible using public android SDK.
P.S. : I am only concerned with 2.2 and 2.3 so its fine if this is not possible on 3.0 and above.
Thnx
EDIT
Explanation of a scenario that will help understand the question better!
I have a full screen activity with a editText and a button. I want to intercept all the clicks that a user make and based on that make some decisions.
I am able to register a listner to intercept what phisical keys are being clicked(HOME, MENU, VOLUME UP/DOWN etc)...The problem is, when the user clicks on the editText i.e. the text box gets the focus, the sotware keypad shows up. Now I also want to intercept what keys(numbers, alphabets, special characters or even custom functions on some samsung android phone like 'Go To Settings' are clicked and perform action based on the clicks.
My question is, is it possible and if yes, then how?
NOTE: Please dont ask me why am I doing this because its bad user experience. I am very much aware of that. I am trying to do this in a particular context that needs this functionality. Thnx!
You need to use the KeyListener class and setKeyListener
http://developer.android.com/reference/android/widget/TextView.html
This only allows you to modify/filter input into the TextView.
I have a layout with lots of different imagebuttons on it.
Application is developed in full-touch, so there should be no response to keyboard or keypad on all activities except one, where user can input his name.
Is there a way to achieve that?
I've checked on debug, keypress and keypad press result in onKeyDown event.
I've set it to return 'false' for all keys.
But, for some reason, android keeps selecting my imagebuttons when keypad is pressed.
And pressing Enter key result in View.onClick event.
How to totally disable all keyboard input for activity?
I use Motorola Milestone for tests - a slider with a keyboard
Thanks
Try using the android:windowSoftInputMode="stateAlwaysHidden" for the tag in
the Manifest.xml file.
http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft