Titanium JIRA Archive
Alloy (ALOY)

[ALOY-927] TextField: Support keyboard and return key type shortcuts strings in XML and TSS definitions

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-04-25T16:46:30.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.4.0, 2014 Sprint 08
ComponentsStyling, XML
Labelsalloy, notable, qe-manualtest
ReporterTim Poulsen
AssigneeTim Poulsen
Created2014-01-16T20:42:35.000+0000
Updated2014-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_

Comments

  1. Tim Poulsen 2014-04-25

    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).
  2. Tim Poulsen 2014-04-25

    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.
  3. Priya Agarwal 2014-05-09

    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.

JSON Source