[TIMOB-1576] Android: Allow Soft Keyboard States On Focus
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:33.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M01 |
Components | Android |
Labels | android, feature |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T02:56:28.000+0000 |
Updated | 2011-04-17T01:56:33.000+0000 |
Description
For some limited use cases, it is desirable to break away from the standard Android UI convention of only showing the keyboard when an edit field is touch focused or the user requests it with long-press on Menu.
One of those use cases is a PIN entry screen where the only possible options are entering and submitting the PIN.
Add View.softKeyboardOnFocus
that accepts the
following 3 states.
Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS
-
Default, use Android Conventions
Ti.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS
- Request
hiding the keyboard. Useful on Button after leaving the input
area.
Ti.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS
- Request
showing the keyboard. Useful when entering an input area.
This feature needs to be tested on 1.6 and 2.X platforms.
(from [b06ad77b3b072a3f3a93d2a47a9f3f43088b913f]) [#1576 state:fixed-in-qa] Special case had to be made for Droid and Donut. Intended for special use cases, not general behavior. It's not the Android UI way. http://github.com/appcelerator/titanium_mobile/commit/b06ad77b3b072a3f3a93d2a47a9f3f43088b913f"> http://github.com/appcelerator/titanium_mobile/commit/b06ad77b3b072...
confirmed, needs testcase (or rather Don provided one, I need to add it to KS)
reopened to test on 1.6 (2.2 checked)
confirmed on a g1 running 1.6, the nexus one running 2.2
Also confirmed on Droid 2.2 stock.
And just to clarify, it needs to be added to the TextField or TextArea itself.
Would you mind providing an example on how to close the keyboard after a button press? I've tried a couple things, but can't figure it out. Thanks!
(from [fce0365c805b92bcceab662dfb04289709e1fb49]) [#1576 state:fixed-in-qa] Added example to KitchenSink, no code changes were made. https://github.com/appcelerator/titanium_mobile/commit/fce0365c805b92bcceab662dfb04289709e1fb49"> https://github.com/appcelerator/titanium_mobile/commit/fce0365c805b...
confirmed android 1.6 sim vi KS.
confirmed android 2.1 sim using KS