Android : Want To Handle Back Button With Soft Keypad?
Nov 6, 2009
I have a simple edit control in my application and as expected the soft keypad comes up on tapping it. Now what I want to do is that when the user presses the back button, the activity should quit immediately without the soft keypad going down first. On handling the key event in my activity i found that the first 'Back' event is consumed by the keyboard and it does not even reach the activity. However once the soft keypad goes down, the events can be handled in my activity. Is there any way to override this behavior so that the back button first reaches my activity and I can quit immediately.
View 3 Replies
Oct 25, 2010
I want to handle the back button in customize way. What to do.
View 3 Replies
View Related
Mar 16, 2010
I'm thinking about using a ViewFlipper for an Wizard like Activity. But I see one problem with this approach. The back button. Will the back button go back to the last shown activity or will the the Viewflipper somehow catch the back button event and only change to the last shown activity?
View 1 Replies
View Related
Aug 22, 2010
I have an onKeyDown event which is only needed for handling the Up and Down hardware keys in my app. For these it returns true, as they are handled. For anything else it returns false which I understand means that the OS should handle them. However, when I press the Back button, my onKeyDown is called and returns false, but there is no other effect. I want/would expect the OS to finish the current Activity and resume the previous one.
View 3 Replies
View Related
Nov 4, 2010
My app contains a page with a form, a long list of EditTexts.
If you're entering text and click the back button, the soft keyboard is hidden. However different android versions behave in different ways. My 2.2 device hides the keyboard, and that's it. My 1.5 device hides the keyboard, and the 'back' onKeyDown/Up event is still activated.
This is very tricky... for the 1.5 device I need to know if the keyboard is being displayed when the back button is pressed, so that I can capture the back event and stop it continuing (all I want is for the keyboard to hide). But I've search all over this forum and there doesn't appear to be a sure way of doing this.
View 2 Replies
View Related
Oct 15, 2010
I have the activity with several input fields. When activity started soft keyboard is showed. When back button pressed soft keyboard closes and to close activity need to press back button one more time.
So the question: is it possible intercept back button to close soft keyboard and finish activity in one press of back button without creating custom InputMethodService?
I know how intercept back button in other cases - onKeyDown() or onBackPressed() but in this case it's not works: only second press of back button is intercepted.
View 3 Replies
View Related
Nov 9, 2009
I am working on a device that does not have a hardware Home, Back or Menu button. I am trying to create a soft keyboard with only these three keys but I have not been able to get it working. Does anyone have any insight into my problem?
I first looked into injecting keypresses into a WindowManager but this functionality seems to have been removed.
I then looked at creating a custom soft keyboard but that will not work either. Custom soft keyboards only inject their input into the text fields they are attached to. I can't send a Home, Back or Menu keypress to the Android system.
I finally got the Home button working by using this intent to tell Android to go to the Home screen: Intent HomeIntent = new Intent(); HomeIntent.setAction(Intent.ACTION_MAIN); HomeIntent.addCategory(Intent.CATEGORY_HOME);
Unfortunately, I have not found an Intent to send for Menu and Back.
View 2 Replies
View Related
Oct 8, 2010
When my android activity pops up a progress dialog, what is the right way to handle when user clicks the back button?
View 2 Replies
View Related
Oct 28, 2009
I have a relative layout with Edit text fileds and some buttons at bottom. when i try to write anything on edittext field in the middle of screen, it just being hidden by the keypad and buttons layout comes on top. how can i have soft keypad working fine for my edit texts?
View 2 Replies
View Related
May 5, 2009
I have an application that has 2 AutoComplete TextViews on a single screen. I have just upgraded the application from 1.0 to 1.5 and I am facing 2 issues here: 1. I get soft keypad for only one of the text view. Wat could be the problem with the other one? 2. For the text view that i get soft keypad,on entering data into the text view using soft key pad, i get the below exception.
View 3 Replies
View Related
Nov 12, 2009
In my android application, I have an Edit Text. When I click in this field, the soft keyboard appears, expanding from the bottom of the screen. It seems to actually modify my layout, pushing contents up wards. When I dismiss the keypad, it retracts, and I see my layout re-expand to take up the space it previously occupied. Is there a way to get the keyboard to simply appear "on top" of my layout, so that I don't get this somewhat unpleasant relayout animation? The Edit Text is pinned to the very top of the screen, so I don't have to worry about the keypad hiding it.
View 2 Replies
View Related
Nov 12, 2009
When I am in a call on my Sprint HTC Hero, if I bring up the touch-keypad, hit the number 1 and then slide the keypad away, I get a message "Starting MMI sequence" and the call disconnects. The reason I discovered this is because I use Google Voice and I need to press 1 to accept a call or 2 to send it to voic email. But, when I press 1 and slide away the keypad, it disconnects. This does not happen when I press the actual keypad soft-button to get the keypad to disappear, it only happens when I swipe it down and away. It runs other MMI Sequences, depending on which key I press... (2 and 4 give me a dial tone to make another call, 3 gives me a popup that says "unable to conference calls", etc...) so is this a function of the phone (like a shortcut or something), or is it something that shouldn't be happening? Like I said, I don't think I've noticed it before the last day or so and I can't find anything about it in the manual or on any of the forums. Should pressing a button on the soft-keypad and swiping the keyboard away while in a call always run an "MMI Sequence"?
View 6 Replies
View Related
May 13, 2010
For an EditText box, the user should only be entering valid numbers, so I am using android:inputType="numberDecimal". Unfortunately, the soft keyboard that Android brings up has numbers only along the top row, while the next three rows have various other symbols (dollar sign, percent sign, exclamation mark, space, etc). Since the number Decimal only accepts numbers 0-9, negative sign, and decimal point, it would make more sense to use the "phone" soft keyboard (0-9 in a 3x3 grid, plus some other symbols). This would make the buttons larger and easier to hit (since it's a 4x4 grid rather than a 10x4 grid in the same screen area). Unfortunately, using android:inputType="phone" allows non-numeric characters such as parentheses I have attempted to use android:inputType="numberDecimal|phone", but the numberDecimal aspect of the bit flag seems to be ignored. I have also tried using android:inputType="phone" in combination with android:digits="0123456789-.", but that still allows multiple negative signs or decimal points (inputType="number" has really good error checking for things like that, and won't let the user even type it in). I have also tried using android:inputType="phone" in the xml layout file, while using a DigitsKeyListener in the Java code, but then that just uses the default number soft keyboard (the one that has numbers only along top row) (it appears to set InputType.TYPE_CLASS_NUMBER, which voids the InputType.TYPE_CLASS_PHONE set by the XML layout). Writing a custom IME wouldn't work, since the user would have to select the IME as a global option outside the app. Is there any way to use the "phone" style soft keyboard while also using the "number" restrictions on what is entered?
View 3 Replies
View Related
Oct 25, 2010
I need to handle home button, redirection of home button on customize way.
View 9 Replies
View Related
Feb 13, 2009
Can any one tell me how to handle the device back key navigation? Because i want to use this action as coming back to my application screen. Here i used only one Activity for building all screens.
View 2 Replies
View Related
Jul 15, 2010
This is my first android device and i'm loving it... but one thing that irks me is the use, or lack thereof, of the back button.
As I am navigating menus and options in the Settings, I cannot simply go back one menu using the back key. For example, if I go to Settings->Battery Manager->Battery Profile Options and want to go back to the Settings screen, I cannot.
Pushing the back button does nothing and I can only go back to the Settings menu by going Home, then re-entering.
Another quirk regarding the back button is when reading emails. Using a regular email account such as Hotmail, I cannot simply read an email and go back to the inbox using the button.
It makes navigating the phone very tedious.
View 5 Replies
View Related
Oct 29, 2009
Does anyone know how to handle Android HTC device Red (power) button programatically to stop my operation. I want to stop running some of my operation when user presses REd button when user is in my screen. I know for other buttons like Back button i could use "keyCode == KeyEvent.KEYCODE_BACK" event. But what is for Power(End) Red button? I'm not getting any keycode events for Red button when i'm in my application.
View 1 Replies
View Related
May 9, 2010
How to handle the key events for HOME, MENU, BACK after making these keys as a soft keys?
Requirement: The Device doesn't going to have any hard keys. So we want to bring these keys as a soft key and handle these keys events.
View 5 Replies
View Related
Sep 10, 2010
Is there any way out for mapping the Done button to the button on the screen in Android. What I want is that I have one login screen user enters username and presses the next button on the soft keyboard which brings the focus on password field. AFter entering password when the user presses done button then the action which is performed on login button should be called.
View 1 Replies
View Related
Jul 8, 2010
I can't figure this out. Some apps have a EditText (textbox) which, when you touch it and it brings up the on-screen keyboard, the keyboard has a "Search" button instead of an enter key.I want to implement this. How can I implement that Search button and detect press of the Search button?
View 1 Replies
View Related
Jun 8, 2010
In my application i have a button initially on the screen and in onclick of the button ,popup window should open. In the popup window i have an imagebutton , now on click of this button i want to start an activity. The popup window opens but i dont understand how to handle the onclick of the imagebtn inside popup window.
In main.xml i have a button and in popup_example.xml i have an imagebutton.
Java code is as follows:
CODE:..........
And i have two xml layouts.........
CODE:..................
View 2 Replies
View Related
Nov 12, 2010
Suppose I have something like an alarm activity which launches the alarm through the lock screen, accomplished via
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
Now, from here I could press the back button to kill the activity, but I also want a press of the lock button to silence the alarm. How would I go about creating a handler for presses of the lock screen button?
View 2 Replies
View Related
Jun 24, 2010
CODE:............
I have this at the top of my application. When the application starts, the EditText is orange highlighted and has a cursor in it; when the EditText is tapped, the soft keyboard pops up. The user uses it to type into the EditText.
However, when they click the Button, my onClick method fires and does everything it's supposed to, however the soft keyboard stays on screen and the EditText is still highlighted with its cursor.
I also have, at the top of the Button onclick: findViewById(R.id.name).clearFocus();
In spite of this, the EditText does not seem to clear its focus. How do I make the button actually act as if it is submitting the form?
Also, I do not transition to a different Activity on the click of the Button. I suppose that is the typical case, and probably the reason why they don't bother hiding the keyboard. However I want to keep the search box and button at the top of the screen, so I just dynamically fill and add views to the screen when the Button is pressed. How can I achieve my desired behavior?
View 1 Replies
View Related
Mar 3, 2010
I really want a way to disable the soft End Call button that pops up in call. If there is an app or widget that some one knows of that can help me,can you please let me know? I'm sick of my face ending calls in the middle of a conversation. Apparently, my cheeks hit it at just the right place to hang up on everyone.
View 7 Replies
View Related
Sep 2, 2010
I have 3 activities in my app: Activity1 -> Activity2 -> Activity3. Inside Activity3, if the user presses Back, I would like to return to Activity2. In Activity3's onPause event, I added a finish() statement. That's probably not even necessary, but I wanted to make sure this Activity gets cleaned up. This works fine.
However, while in Activity3, if the user presses Home or starts a new app (through notification bar or some other means), I want both Activity3 and Activity2 to finish. If the user returns to this app, he should resume with Activity1.
I have figured out how to do one or the other, but I can't figure out how to handle both cases, if it's even possible. Can I trap the "Back" button in Activity3 and send a message back to Activity2 telling it not to finish()? It seems like the Activities follow the same lifecycle flow (Pause, Stop) regardless of what you do to send them to the background. Just to answer the question of why I want this behavior, imagine that Activity1 is a login screen, Activity2 is a selection screen, and Activity3 is a content screen. If I press Back from the content page, I want to be able to make a new selection. If I exit via any other means (Home, notification bar), I want the user to be "logged out".
View 2 Replies
View Related
Oct 21, 2009
Does anyone know how to enable the emote button in soft keyboard input?
View 2 Replies
View Related
Mar 31, 2009
I call WebView.clearHistory(), but I am still able to go back after doing so. I want to reuse a WebView, but I don't want the back button to allow the user to go back further than the current "session" of using the WebView. Anybody know what is the best way to handle this? I thought for sure that clearHistory() would do it.
View 3 Replies
View Related
Jul 11, 2009
In my app I have AutoCompleteTextView and "search" button. When user clicks "enter" or "search" an Intent is fired and new Activity is started. But in that "new" Activity SoftInput should be invisible, so I make ((InputMethodManager)getSystemService (INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(this.getCurrentFocus ().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); But when user clicks BACK and returns to activity with form he is unable to show soft input back by touching AutoCompleteTextView. He mus use trackball to select "search" button and than touch ACTextView. Bud when he is in "form" activity first time, shows soft input by touching AutoCompleteTextView and presses BACK button he is able to show soft Input by touching field. How can I hide soft input "correctly" (so it can be shwed back in intuitive way?) or hide it like BACK button does?
View 4 Replies
View Related
Oct 11, 2010
In my android application i have a video list screen,a buffering screen and a videoplayer screen.
As soon as the user clicks an item from videolist screen ,he is navigated to buffering screen and then to videoplayer.
In the buffering screen i am using Async task and doing the loading process in on background process.
Now my issue is like the user if has selested a video then gets navigated to buffering screen.But if the user clicks back when he is in buffering screen then initially he is getting navigated to videolist screen but immediately after that again he is navigated to videoplayer screen.
What i would like to have is either the back button should be made disable in buffering or should prevent the player tostart if back is clicked.
View 2 Replies
View Related
Mar 9, 2010
I have a device with no hard buttons, on which I need to get Android running. The basic port is done, but I need to provide access to Home, Menu, and Back. The Archos tablets put soft buttons in the status bar, and I'm told that the android-x86 folks have implemented this as well (though I haven't found it in their source yet).
View 2 Replies
View Related