[ALOY-927] TextField: Support keyboard and return key type shortcuts strings in XML and TSS definitions
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-04-25T16:46:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.4.0, 2014 Sprint 08 |
Components | Styling, XML |
Labels | alloy, notable, qe-manualtest |
Reporter | Tim Poulsen |
Assignee | Tim Poulsen |
Created | 2014-01-16T20:42:35.000+0000 |
Updated | 2014-08-05T10:00:04.000+0000 |
Description
As a developer, I'd like to be able to enter shortcut strings when declaring TextFields in XML or styling them in TSS. For example:
<TextField id="txt" keyboardType="DECIMAL_PAD" returnKeyType="DONE"/>
"#txt": {
keyboardType: "DECIMAL_PAD",
returnKeyType: "DONE"
}
This is done for SystemButtonType constants (see code in parsers/Ti.UI.Button.js)
All keyboardType constants begin with Ti.UI.KEYBOARD_
All returnKeyType constants begin with Ti.UI.RETURNKEY_
PR: https://github.com/appcelerator/alloy/pull/375 Functional test: Run the included test app. Hint text in the text fields describe they keyboard and return key type you should get when the field is focused. The text area should have the numbers_punctuation type with autocapitalization set to all (have to type on the soft keyboard to have that work).
Note for docs: in the TSS, the shortcuts must be entered as strings. Use the last portion of the property value (upper- or lowercase is fine) as the short-hand notation. For example, for keyboardType = Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION, use "numbers_punctuation" or "NUMBERS_PUNCTUATION" or "Numbers_Punctuation" etc.
Verified the FIXED with: Appc-Studio:3.3.0.201405080918 sdk:3.3.0.v20140508135704 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Device:Iphone5s(v7.1.1),Nexus7(v4.4.2) All the types of keyboard shortcuts are working fine. Hence closing the issue.