I'm working with UIWebView. When the user does a long press the webView dims.
How can I avoid this?
Related
I made a J2ME application(2D game) for nokia touch device like C7, N8 etc.
When I press the menu button while the gameplay is on, I reach the home screen on the device, but in the background, the game music still plays.
Can anyone tell me which event is called on pressing the menu button, and any possible solution to this problem?
Call player.stopPlayer() in hideNotify() method of canvas. Probably gameCanvas of your application.
You can restart the music in showNotify() of your gameCanvas.
Canvas.hideNotify() is called when the midlet goes to background see this article as well
I have an app, one activity is a form with multiple fields. In landscape mode when clicking into the first field the fullscreen IME kicks in, with a "Next" button.
The "Next" button, however, does not respond at all. No errors are thrown, nothing logged related to this - it just doesn't move to the next (of about 12) text fields.
Same (lack of) behavior when other fields are selected on the form and text entered/not entered in landscape view - non-responsive next button.
The final EditText field correctly shows a "Done" button...which is also unresponsive.
I've had no luck searching forums and Googling this, and nothing I've been able to find related to the IME has helped to this point.
One option, of course, is to force portrait mode (which works fine), but I would rather avoid that klunky workaround.
Any suggestions, references to code/examples related to this would be greatly appreciated.
Resolved using android:imeOptions="actionDone" in the EditText layout if the next element is not an EditText view, or if at the end of the form. All other EditText layouts added android:imeOptions="actionNext".
This allows a full-screen IME in landscape view to navigate from one EditText to the next, form an EditText out of the IME if the next field is a button or spinner (any non-EditText field), and exit the full-screen IME after the last form field.
I'm trying to programmatically click a UITextField after the user clicks on another UIButton, this way, when the user clicks the button, the keyboard will appear for the UITextField that the button corresponds to. What I'm trying to do is almost the opposite of resignFirstResponder. I haven't found any way to do this so far, anyone have any ideas?
Use UIResponder's becomeFirstResponder method.
I have around 4-5 edit text on the screen, now when user types, some EditText are hidden behind the soft keyboard and user can not see what he is typing.
Please give ideas what can be done.
Thanks
Ok.. I got the solution put a LinearLayout containing all TextViews and EditText in scroll view and then when user presses next view is scrolled and user will be able to see what he is typing.
I have attached a toolbar with a UITextField and UIButton to the keyboard when it becomes the first responder via the user taping inside the textfield
textField.inputAccessoryView = theToolbar;
Problem is, the toolbar disappears when the keyboard is dismissed, thus preventing any further input.
Any ideas on how to make the toolbar go back to the bottom of the screen rather than off it completely?
I'm thinking a delegate method might help but Im really not too sure. It seems once the inputAccessoryView always the inputAccessoryView :(
Cheers
The input accessory view is automatically dismissed with the input view (the keyboard, in this case). Generally you do not want to have an input accessory view in your view hierarchy. Instead, if you want your toolbar to scroll up when the keyboard is shown, you should follow the guidelines for Managing the Keyboard.
You could try using an additional toolbar that is offscreen as the inputAccessoryView, which could "fake" the appearance of what you are trying to do. Alternatively, have you tried adding the toolbar back to the bottom of the screen using
[self.view addSubview:theToolbar];
when the keyboard reaches the bottom of the screen? You can use keyboard notifications for this.