@maccesar/titools 2.10.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/AGENTS-VERCEL-RESEARCH.md +23 -12
  2. package/README.md +81 -182
  3. package/agents/ti-pro.md +8 -14
  4. package/lib/cleanup.js +13 -0
  5. package/lib/commands/skills.js +2 -1
  6. package/lib/commands/update.js +4 -1
  7. package/lib/config.js +9 -11
  8. package/lib/platform.js +1 -1
  9. package/package.json +2 -3
  10. package/skills/purgetss/SKILL.md +12 -0
  11. package/skills/purgetss/references/animation-advanced.md +0 -9
  12. package/skills/purgetss/references/app-branding.md +20 -0
  13. package/skills/purgetss/references/appearance-module.md +85 -27
  14. package/skills/purgetss/references/apply-directive.md +60 -0
  15. package/skills/purgetss/references/arbitrary-values.md +41 -0
  16. package/skills/purgetss/references/cli-commands.md +52 -17
  17. package/skills/purgetss/references/custom-rules.md +36 -19
  18. package/skills/purgetss/references/customization-deep-dive.md +37 -15
  19. package/skills/purgetss/references/grid-layout.md +45 -26
  20. package/skills/purgetss/references/icon-fonts.md +27 -25
  21. package/skills/purgetss/references/installation-setup.md +28 -2
  22. package/skills/purgetss/references/ios-large-titles.md +31 -15
  23. package/skills/purgetss/references/multi-density-images.md +57 -0
  24. package/skills/purgetss/references/opacity-modifier.md +11 -2
  25. package/skills/purgetss/references/semantic-colors.md +44 -1
  26. package/skills/purgetss/references/tikit-components.md +1 -3
  27. package/skills/alloy-guides/SKILL.md +0 -190
  28. package/skills/alloy-guides/references/CLI_TASKS.md +0 -233
  29. package/skills/alloy-guides/references/CONCEPTS.md +0 -171
  30. package/skills/alloy-guides/references/CONTROLLERS.md +0 -279
  31. package/skills/alloy-guides/references/MODELS.md +0 -1214
  32. package/skills/alloy-guides/references/PURGETSS.md +0 -46
  33. package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +0 -235
  34. package/skills/alloy-guides/references/VIEWS_STYLES.md +0 -375
  35. package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +0 -102
  36. package/skills/alloy-guides/references/VIEWS_XML.md +0 -581
  37. package/skills/alloy-guides/references/WIDGETS.md +0 -160
  38. package/skills/alloy-howtos/SKILL.md +0 -181
  39. package/skills/alloy-howtos/references/best_practices.md +0 -121
  40. package/skills/alloy-howtos/references/cli_reference.md +0 -230
  41. package/skills/alloy-howtos/references/config_files.md +0 -158
  42. package/skills/alloy-howtos/references/custom_tags.md +0 -148
  43. package/skills/alloy-howtos/references/debugging_troubleshooting.md +0 -78
  44. package/skills/alloy-howtos/references/samples.md +0 -156
  45. package/skills/ti-api/SKILL.md +0 -109
  46. package/skills/ti-api/references/api-android.md +0 -675
  47. package/skills/ti-api/references/api-app-platform.md +0 -636
  48. package/skills/ti-api/references/api-core.md +0 -764
  49. package/skills/ti-api/references/api-data-network.md +0 -641
  50. package/skills/ti-api/references/api-media.md +0 -655
  51. package/skills/ti-api/references/api-modules-ble-bluetooth.md +0 -657
  52. package/skills/ti-api/references/api-modules-coremotion-urlsession.md +0 -411
  53. package/skills/ti-api/references/api-modules-map.md +0 -632
  54. package/skills/ti-api/references/api-modules-nfc.md +0 -725
  55. package/skills/ti-api/references/api-modules-social-misc.md +0 -526
  56. package/skills/ti-api/references/api-services.md +0 -700
  57. package/skills/ti-api/references/api-ui-android.md +0 -499
  58. package/skills/ti-api/references/api-ui-extras.md +0 -702
  59. package/skills/ti-api/references/api-ui-ios-animator.md +0 -378
  60. package/skills/ti-api/references/api-ui-ios.md +0 -756
  61. package/skills/ti-api/references/api-ui-lists.md +0 -581
  62. package/skills/ti-api/references/api-ui-text-input.md +0 -607
  63. package/skills/ti-api/references/api-ui-views.md +0 -572
  64. package/skills/ti-api/references/api-ui-windows-navigation.md +0 -676
  65. package/skills/ti-api/references/api-xml-global.md +0 -743
  66. package/skills/ti-guides/SKILL.md +0 -75
  67. package/skills/ti-guides/references/advanced-data-and-images.md +0 -155
  68. package/skills/ti-guides/references/android-manifest.md +0 -97
  69. package/skills/ti-guides/references/app-distribution.md +0 -373
  70. package/skills/ti-guides/references/application-frameworks.md +0 -366
  71. package/skills/ti-guides/references/cli-reference.md +0 -700
  72. package/skills/ti-guides/references/coding-best-practices.md +0 -150
  73. package/skills/ti-guides/references/commonjs-advanced.md +0 -279
  74. package/skills/ti-guides/references/hello-world.md +0 -99
  75. package/skills/ti-guides/references/hyperloop-native-access.md +0 -458
  76. package/skills/ti-guides/references/javascript-primer.md +0 -402
  77. package/skills/ti-guides/references/reserved-words.md +0 -36
  78. package/skills/ti-guides/references/resources.md +0 -172
  79. package/skills/ti-guides/references/style-and-conventions.md +0 -104
  80. package/skills/ti-guides/references/tiapp-config.md +0 -655
  81. package/skills/ti-howtos/SKILL.md +0 -143
  82. package/skills/ti-howtos/references/android-platform-deep-dives.md +0 -609
  83. package/skills/ti-howtos/references/automation-fastlane-appium.md +0 -96
  84. package/skills/ti-howtos/references/buffer-codec-streams.md +0 -162
  85. package/skills/ti-howtos/references/cross-platform-development.md +0 -358
  86. package/skills/ti-howtos/references/debugging-profiling.md +0 -473
  87. package/skills/ti-howtos/references/extending-titanium.md +0 -684
  88. package/skills/ti-howtos/references/google-maps-v2.md +0 -172
  89. package/skills/ti-howtos/references/ios-map-kit.md +0 -149
  90. package/skills/ti-howtos/references/ios-platform-deep-dives.md +0 -595
  91. package/skills/ti-howtos/references/local-data-sources.md +0 -310
  92. package/skills/ti-howtos/references/location-and-maps.md +0 -267
  93. package/skills/ti-howtos/references/media-apis.md +0 -268
  94. package/skills/ti-howtos/references/notification-services.md +0 -539
  95. package/skills/ti-howtos/references/remote-data-sources.md +0 -339
  96. package/skills/ti-howtos/references/tutorials.md +0 -552
  97. package/skills/ti-howtos/references/using-modules.md +0 -182
  98. package/skills/ti-howtos/references/web-content-integration.md +0 -288
  99. package/skills/ti-howtos/references/webpack-build-pipeline.md +0 -125
@@ -1,607 +0,0 @@
1
- # Ti.UI Text & Input API Reference
2
-
3
- ## Ti.UI.TextField
4
- > A single line text field.
5
- > Extends Ti.UI.View
6
- > Platforms: both
7
-
8
- | Android | iOS |
9
- | ------- | --- |
10
- | ![Android](./textfield_android.png) | ![iOS](./textfield_ios.png) |
11
-
12
- Use the <Titanium.UI.createTextField> method or **`<TextField>`** Alloy element to create a text field.
13
-
14
- ### `click` event in iOS
15
-
16
- In iOS 11+, `click` event in text field is not fired due to changes from apple.
17
- Use `touchstart` event instead of `click` event.
18
-
19
- ### Properties (unique: 45/116)
20
- | Property | Type | Default | Platform | Description |
21
- |----------|------|---------|----------|-------------|
22
- | keyboardAppearance | Number | <Titanium.UI.KEYBOARD_APPEARANCE_DEFAULT> | ios | Determines the appearance of the keyboard displayed when this field is focused. |
23
- | attributedString | Ti.UI.AttributedString | — | both | TextField attributed string. |
24
- | attributedHintText | Ti.UI.AttributedString | — | both | Hint text attributed string. |
25
- | autocapitalization | Number | <Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE> | both | Determines how text is capitalized during typing. |
26
- | autocorrect | Boolean | — | both | Determines whether to automatically correct text entered into this text field. |
27
- | autofillType | String | undefined | both | Sets the autofill type for the text field. |
28
- | autoLink | Number | undefined | android | Automatically convert text to clickable links. |
29
- | borderStyle | Number | <Titanium.UI.INPUT_BORDERSTYLE_NONE> (on iOS), <Titanium.UI.INPUT_BORDERSTYLE_FILLED> (on Android) | both | Border style for the field. |
30
- | clearButtonMode | Number | Titanium.UI.INPUT_BUTTONMODE_NEVER | ios | Determines when the clear button is displayed. |
31
- | clearOnEdit | Boolean | false | both | Determines whether the value of this text field should be cleared when it is fo… |
32
- | color | String \| Ti.UI.Color | — | both | Color of the text in this text field, as a color name or hex triplet. |
33
- | editable | Boolean | true | both | Determines whether this field can be edited. |
34
- | ellipsize | Boolean | false | android | Determines whether an ellipsis (`...`) should be used to indicate truncated tex… |
35
- | enableCopy | Boolean | true | both | Determines if user can copy or cut text from the text field. |
36
- | enableReturnKey | Boolean | false | both | Determines whether the return key is enabled automatically when there is text i… |
37
- | focused | Boolean | false | both | Determines whether this TextField has focus. |
38
- | font | Font | — | both | Font to use for text. |
39
- | fullscreen | Boolean | true | android | Leave some space above the keyboard in landscape mode or not. |
40
- | hintText | String | No hint text. | both | Hint text to display when the field is empty. |
41
- | hintTextColor | String \| Ti.UI.Color | The platform's default hint text color. | both | Hint text color to display when the field is empty. |
42
- | hinttextid | String | — | both | Key identifying a string from the locale file to use for the [hintText](Titaniu… |
43
- | hintType | Number | <Titanium.UI.HINT_TYPE_STATIC> | android | Hint type to display on the text field. |
44
- | inputType | Array<Number> | Empty array. If not defined, default is Keyboard type specified by <Titanium.UI.TextField.keyboardType>. | android | Input type to accept in the text field. Also influences the Keyboard type to di… |
45
- | keyboardToolbar | Array<Titanium.UI.View> \| Ti.UI.Toolbar | — | ios | Array of toolbar button objects or a [toolbar](Titanium.UI.Toolbar) to be used … |
46
- | keyboardToolbarColor | String \| Ti.UI.Color | — | ios | Color of the keyboard toolbar if keyboardToolbar is an array, as a color name o… |
47
- | keyboardToolbarHeight | Number | — | ios | Height of the keyboard toolbar if keyboardToolbar is an array. |
48
- | keyboardType | Number | <Titanium.UI.KEYBOARD_TYPE_DEFAULT> | both | Keyboard type to display when this text field is focused. |
49
- | leftButton | Ti.UI.View | — | ios | Left button view to display in the `TextField`. |
50
- | leftButtonMode | Number | <Titanium.UI.INPUT_BUTTONMODE_NEVER> | ios | Determines when to display the left button view. |
51
- | leftButtonPadding | Number | — | ios | Padding between the left button and the edge of the field. |
52
- | minimumFontSize | Number | — | ios | Minimum size of the font when the font is sized based on the contents. Enables … |
53
- | padding | TextFieldPadding | — | both | Sets the padding of this text field. |
54
- | passwordMask | Boolean | false | both | Obscure the input text from the user. |
55
- | passwordRules | String | — | ios | Set password rules that should be used for this text field. |
56
- | returnKeyType | Number | <Titanium.UI.RETURNKEY_DEFAULT> | both | Specifies the text to display on the keyboard `Return` key when this field is f… |
57
- | rightButton | Ti.UI.View | — | ios | Right button view. |
58
- | rightButtonMode | Number | Titanium.UI.INPUT_BUTTONMODE_NEVER | ios | Determines when to display the right button view. |
59
- | rightButtonPadding | Number | — | ios | Padding between the right button and the edge of the field. |
60
- | suppressReturn | Boolean | — | ios | Determines whether the return key should be suppressed during entry. |
61
- | selection | textFieldSelectedParams | — | both | Returns the currently selected text of the text field. |
62
- | showUndoRedoActions | Boolean | true | ios | Determines if the undo and redo buttons on the left side of the keyboard should… |
63
- | textAlign | String \| Number | <Titanium.UI.TEXT_ALIGNMENT_LEFT> | both | Text alignment within this text field. This has no effect on `hintText` when `h… |
64
- | value | String | — | both | Value of this text field, which may be set programmatically and modified by the… |
65
- | verticalAlign | Number \| String | <Titanium.UI.TEXT_VERTICAL_ALIGNMENT_CENTER> | both | Vertical alignment within this text field. |
66
- | maxLength | Number | -1 | both | Maximum length of text field input. |
67
-
68
-
69
- ### Methods (4)
70
- | Method | Returns | Platform | Description |
71
- |--------|---------|----------|-------------|
72
- | blur(—) | void | both | Forces the field to lose focus. |
73
- | focus(—) | void | both | Forces the field to gain focus. |
74
- | hasText(—) | Boolean | both | Returns `true` if this text field contains text. |
75
- | setSelection(start, end) | void | both | Selects the text in range (start, end). |
76
-
77
- ### Events (5)
78
- | Event | Platform | Description |
79
- |-------|----------|-------------|
80
- | focus | android | Fired when the field gains focus. |
81
- | blur | both | Fired when the field loses focus. |
82
- | change | both | Fired when the field value changes. |
83
- | empty | android | Fired when the field is empty and you press backspace key again. |
84
- | return | both | Fired when the return key is pressed on the keyboard. |
85
-
86
- ### Related Types
87
-
88
- #### Font
89
- > An abstract datatype for specifying a text font.
90
-
91
- | Property | Type | Description |
92
- |----------|------|-------------|
93
- | fontFamily | String | Specifies the font family or specific font to use. |
94
- | fontSize | Number \| String | Font size, in platform-dependent units. |
95
- | fontWeight | String | Font weight. Valid values are "bold", "semibold", "normal", "thin", "light" and… |
96
- | fontStyle | String | Font style. Valid values are "italic" or "normal". |
97
- | textStyle | String | The text style for the font. |
98
-
99
- #### TextFieldPadding
100
- > Dictionary object of parameters for the <Titanium.UI.TextField.padding> that describes the padding. Most notable difference from typical <Padding> is that `top`/`bottom` are only supported on Android.
101
-
102
- | Property | Type | Description |
103
- |----------|------|-------------|
104
- | left | Number | Left padding |
105
- | right | Number | Right padding |
106
- | top | Number | Top padding (Android only, since 6.1.0) |
107
- | bottom | Number | Bottom padding (Android only, since 6.1.0) |
108
-
109
- #### textFieldSelectedParams
110
- > Dictionary object of parameters for the <Titanium.UI.TextField.selection> property that describes position and length of the selected text.
111
-
112
- | Property | Type | Description |
113
- |----------|------|-------------|
114
- | location | Number | Starting position of selected text. |
115
- | length | Number | Number of characters selected. |
116
-
117
- ---
118
-
119
- ## Ti.UI.TextArea
120
- > A multiline text field that supports editing and scrolling.
121
- > Extends Ti.UI.View
122
- > Platforms: both
123
-
124
- | Android | iOS |
125
- | ------- | --- |
126
- | ![Android](./textarea_android.png) | ![iOS](./textarea_ios.png) |
127
-
128
- Use the <Titanium.UI.createTextArea> method or **&lt;TextArea&gt;** Alloy element to create a text area.
129
-
130
- ### `click` event in iOS
131
-
132
- In iOS 11+, `click` event in text area is not fired due to changes from apple.
133
- Use `touchstart` event instead of `click` event.
134
-
135
- ### Properties (unique: 40/111)
136
- | Property | Type | Default | Platform | Description |
137
- |----------|------|---------|----------|-------------|
138
- | keyboardAppearance | Number | <Titanium.UI.KEYBOARD_APPEARANCE_DEFAULT> | ios | Determines the appearance of the keyboard displayed when this text area is focu… |
139
- | attributedHintText | Ti.UI.AttributedString | — | both | Hint text attributed string. |
140
- | attributedString | Ti.UI.AttributedString | — | both | TextArea attributed string. |
141
- | autocapitalization | Number | <Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE> | both | Determines how text is capitalized during typing. |
142
- | autocorrect | Boolean | — | both | Determines whether to automatically correct text entered into this text area. |
143
- | autofillType | String | undefined | both | Sets the autofill type for the text area. |
144
- | autoLink | Number | <Titanium.UI.AUTOLINK_NONE> | both | Automatically convert text to clickable links. |
145
- | borderStyle | Number | <Titanium.UI.INPUT_BORDERSTYLE_FILLED> | android | Border style for the text area. |
146
- | clearOnEdit | Boolean | false | android | Determines whether the value of this text area should be cleared when it is foc… |
147
- | color | String \| Ti.UI.Color | — | both | Color of the text in this text area, as a color name or hex triplet. |
148
- | editable | Boolean | true | both | Determines whether this field can be edited. |
149
- | ellipsize | Boolean | false | android | Determines whether an ellipsis (`...`) should be used to indicate truncated tex… |
150
- | enableCopy | Boolean | true | both | Determines if user can copy or cut text from the text area. |
151
- | enableReturnKey | Boolean | false | both | Determines whether the return key is enabled automatically when there is text i… |
152
- | focused | Boolean | false | both | Determines whether this TextArea has focus. |
153
- | font | Font | — | both | Font to use for text. |
154
- | fullscreen | Boolean | true | android | Leave some space above the keyboard in landscape mode or not. |
155
- | hintText | String | No hint text. | android | Hint text to display when the field is empty. |
156
- | hinttextid | String | — | both | Key identifying a string from the locale file to use for the [hintText](Titaniu… |
157
- | hintTextColor | String | Default Android theme's hint text color. | android | Color of hint text that displays when field is empty. |
158
- | hintType | Number | <Titanium.UI.HINT_TYPE_STATIC> | android | Hint type to display on the text field. |
159
- | handleLinks | Boolean | false | ios | Specifies if the text area should allow user interaction with the given URL in … |
160
- | html | String | — | both | Pass a HTML-based string and it will be formatted accordingly. |
161
- | keyboardToolbar | Array<Titanium.UI.View> \| Ti.UI.Toolbar | — | ios | Array of toolbar button objects or a [toolbar](Titanium.UI.Toolbar) to be used … |
162
- | keyboardToolbarColor | String \| Ti.UI.Color | — | ios | Color of the keyboard toolbar if keyboardToolbar is an array, as a color name o… |
163
- | keyboardToolbarHeight | Number | — | ios | Height of the keyboard toolbar if keyboardToolbar is an array. |
164
- | keyboardType | Number | <Titanium.UI.KEYBOARD_DEFAULT> | both | Keyboard type to display when this text area is focused. |
165
- | lines | Number | 1 | android | Number of lines tall the text area height will be, if set. |
166
- | maxLength | Number | -1 | both | Maximum length of text field input. |
167
- | maxLines | Number | -1 | android | Maximum line count of text field input. |
168
- | padding | Padding | — | both | Sets the left and right padding of this TextArea. The text will always be verti… |
169
- | returnKeyType | Number | <Titanium.UI.RETURNKEY_DEFAULT> | ios | Specifies the text to display on the keyboard `Return` key when this text area … |
170
- | scrollsToTop | Boolean | true | ios | Controls whether the scroll-to-top gesture is effective. |
171
- | showUndoRedoActions | Boolean | true | ios | Determines if the undo and redo buttons on the left side of the keyboard should… |
172
- | suppressReturn | Boolean | — | ios | Determines if the return key should be suppressed during text entry. |
173
- | textAlign | String \| Number | <Titanium.UI.TEXT_ALIGNMENT_LEFT> | both | Text alignment within this text area. This has no effect on `hintText` when `hi… |
174
- | value | String | — | both | Value of this text area, which may be set programmatically and modified by the … |
175
- | scrollable | Boolean | true | ios | Determines whether this text area can be scrolled. |
176
- | selection | textAreaSelectedParams | — | both | Returns the currently selected text of the text area. |
177
- | verticalAlign | Number \| String | <Titanium.UI.TEXT_VERTICAL_ALIGNMENT_TOP> | android | Vertical alignment within this text area. |
178
-
179
-
180
- ### Methods (4)
181
- | Method | Returns | Platform | Description |
182
- |--------|---------|----------|-------------|
183
- | blur(—) | void | both | Forces this text area to lose focus. |
184
- | focus(—) | void | both | Forces this text area to gain focus. |
185
- | hasText(—) | Boolean | both | Returns `true` if this text area contains text. |
186
- | setSelection(start, end) | void | both | Selects the text in range (start, end). |
187
-
188
- ### Events (6)
189
- | Event | Platform | Description |
190
- |-------|----------|-------------|
191
- | focus | android | Fired when this text area gains focus. |
192
- | blur | both | Fired when this text area loses focus. |
193
- | change | both | Fired when this text area value changes. |
194
- | link | ios | Fired when user interacts with a URL in the text area. See [handleLinks](Titani… |
195
- | return | both | Fired when the return key is pressed on the keyboard. |
196
- | selected | ios | Fired when text in this text area is selected. |
197
-
198
- ### Related Types
199
-
200
- #### Font
201
- > An abstract datatype for specifying a text font.
202
-
203
- | Property | Type | Description |
204
- |----------|------|-------------|
205
- | fontFamily | String | Specifies the font family or specific font to use. |
206
- | fontSize | Number \| String | Font size, in platform-dependent units. |
207
- | fontWeight | String | Font weight. Valid values are "bold", "semibold", "normal", "thin", "light" and… |
208
- | fontStyle | String | Font style. Valid values are "italic" or "normal". |
209
- | textStyle | String | The text style for the font. |
210
-
211
- #### Padding
212
- > Dictionary object of parameters for the padding/insets applied to all kinds of views.
213
-
214
- | Property | Type | Description |
215
- |----------|------|-------------|
216
- | left | Number | Left padding/inset |
217
- | right | Number | Right padding/inset |
218
- | top | Number | Top padding/inset |
219
- | bottom | Number | Bottom padding/inset |
220
-
221
- #### textAreaSelectedParams
222
- > Dictionary object of parameters for the <Titanium.UI.TextArea.selected> event and <Titanium.UI.TextArea.selection> property that describes position and length of the selected text.
223
-
224
- | Property | Type | Description |
225
- |----------|------|-------------|
226
- | location | Number | Starting position of selected text. |
227
- | length | Number | Number of characters selected. |
228
-
229
- ---
230
-
231
- ## Ti.UI.SearchBar
232
- > A specialized text field for entering search text.
233
- > Extends Ti.UI.View
234
- > Platforms: both
235
-
236
- | Android | iOS |
237
- | ------- | --- |
238
- | ![Android](./searchbar_android.png) | ![iOS](./searchbar_ios.png) |
239
-
240
- Search bars are most commonly used for filtering the rows in a [TableView](Titanium.UI.TableView) and
241
- [ListView](Titanium.UI.ListView). You can add a search bar to a table view via its
242
- [search](Titanium.UI.TableView.search) property. You can add a search bar to a list view via its
243
- [searchBar](Titanium.UI.SearchBar) property.
244
-
245
- A search bar can also be used on its own.
246
-
247
- Use the <Titanium.UI.createSearchBar> method or Alloy **`<SearchBar>`** element to create a search bar.
248
-
249
- ### Android Notes
250
-
251
-
252
- *(See full overview in titanium-docs)*
253
-
254
- ### Properties (unique: 23/95)
255
- | Property | Type | Default | Platform | Description |
256
- |----------|------|---------|----------|-------------|
257
- | autocapitalization | Number | Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE | both | Determines how text is capitalized during typing. |
258
- | autocorrect | Boolean | false | both | Determines whether the text in the search bar is autocorrected during typing. |
259
- | barColor | String \| Ti.UI.Color | System default bar color. | both | Bar color of the search bar view, as a color name or hex triplet. |
260
- | cancelButtonTitle | String | System-localized 'Cancel' | ios | The title of the cancel button when the search bar field is focused. |
261
- | color | String \| Ti.UI.Color | — | both | Color of the text in this text field, as a color name or hex triplet. |
262
- | fieldBackgroundImage | String | — | ios | Background image of the text field, specified as a local file path or URL. |
263
- | fieldBackgroundDisabledImage | String | — | ios | Background image of the text field in disabled state, specified as a local file… |
264
- | focused | Boolean | false | both | Determines whether this SearchBar has focus. |
265
- | hintText | String | On iOS, System-localized 'Search'. On Android and Windows, no hint text. | both | Text to show when the search bar field is not focused. |
266
- | hintTextColor | String \| Ti.UI.Color | The platform's default hint text color. | both | Hint text color to display when the field is empty. |
267
- | hinttextid | String | — | both | Key identifying a string from the locale file to use for the [hintText](Titaniu… |
268
- | iconified | Boolean | undefined | both | Collapses/expands the search view to/from a search icon. |
269
- | iconifiedByDefault | Boolean | false | both | Set true show as a search icon that expands to a search view when tapped on. |
270
- | iconColor | String \| Ti.UI.Color | — | android | Color of the search and close icon. Search icon will only work for `iconified:f… |
271
- | keyboardType | Number | Titanium.UI.KEYBOARD_TYPE_DEFAULT | ios | Keyboard type constant to use when the field is focused. |
272
- | keyboardAppearance | Number | Titanium.UI.KEYBOARD_APPEARANCE_DEFAULT | ios | Determines the appearance of the keyboard to be displayed the field is focused. |
273
- | prompt | String | No prompt. | ios | Single line of text displayed at the top of the search bar. |
274
- | promptid | String | — | ios | Key identifying a string from the locale file to use for the [prompt](Titanium.… |
275
- | showBookmark | Boolean | false | ios | Determines whether the bookmark button is displayed. |
276
- | showCancel | Boolean | false | both | Determines whether the cancel button is displayed. |
277
- | style | Number | Titanium.UI.iOS.SEARCH_BAR_STYLE_PROMINENT | ios | Determines the style of the search bar. |
278
- | value | String | — | both | Value of the search bar. |
279
- | tokens | Array<String> | — | ios | The token of a search text field |
280
-
281
-
282
- ### Methods (5)
283
- | Method | Returns | Platform | Description |
284
- |--------|---------|----------|-------------|
285
- | blur(—) | void | both | Causes the search bar to lose focus. |
286
- | focus(—) | void | both | Causes the search bar to gain focus. |
287
- | setShowCancel(showCancel, options) | void | both | Shows or hides the cancel button. |
288
- | insertTokenAtIndex(token, index) | void | ios | Inserts a new search token at the specified index. |
289
- | removeTokenAtIndex(index) | void | ios | Removes an existing token at the specified index. |
290
-
291
- ### Events (6)
292
- | Event | Platform | Description |
293
- |-------|----------|-------------|
294
- | focus | both | Fired when the search bar gains focus. |
295
- | blur | both | Fired when the search bar loses focus. |
296
- | bookmark | ios | Fired when the bookmark button is pressed. |
297
- | cancel | both | Fired when the cancel button is pressed. |
298
- | change | both | Fired when the value of the search bar changes. |
299
- | return | both | Fired when keyboard search button is pressed. |
300
-
301
- ### Related Types
302
-
303
- #### AnimatedOptions
304
- > A JavaScript object holding an `animated` property. Used for many UI methods as a means of specifying some transition should be animated.
305
-
306
- | Property | Type | Description |
307
- |----------|------|-------------|
308
- | animated | Boolean | If `true`, animate a transition for the method/value change. Note that for most… |
309
-
310
- #### SearchBarToken
311
- > The search bar token for the <Titanium.UI.SearchBar.insertTokenAtIndex> method.
312
-
313
- | Property | Type | Description |
314
- |----------|------|-------------|
315
- | identifier | String | The identifier of the search bar token. |
316
- | text | String | The text of the search bar token (displayed in the search bar). |
317
- | image | String | The image of the search bar token. |
318
-
319
- ---
320
-
321
- ## Ti.UI.AttributedString
322
- > An attributed string proxy manages character strings and associated sets of attributes (for example, font and foregroundcolor) that apply to individual characters or ranges of characters in the string.
323
- > Extends Ti.Proxy
324
- > Platforms: both
325
-
326
- The AttributedString proxy is created with the <Titanium.UI.createAttributedString> method.
327
-
328
- The `text` property must be set initially in the constructor when creating an attributed string.
329
- The [attributes](Titanium.UI.AttributedString.attributes) can either be set in the constructor or after it has been created.
330
-
331
- For examples of Attributed Strings, see the
332
- [Attributed Strings guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/Attributed_Strings.html).
333
-
334
- ### Properties (unique: 2/5)
335
- | Property | Type | Default | Platform | Description |
336
- |----------|------|---------|----------|-------------|
337
- | text | String | — | both | The text applied to the attributed string. |
338
- | attributes | Array<Attribute> | — | both | An array of attributes to add. |
339
-
340
-
341
- ### Methods (1)
342
- | Method | Returns | Platform | Description |
343
- |--------|---------|----------|-------------|
344
- | addAttribute(attribute) | void | both | Adds an [attribute](Attribute) with the given name and value to the characters … |
345
-
346
-
347
- ### Related Types
348
-
349
- #### Attribute
350
- > An abstract datatype for specifying an attributed string attribute.
351
-
352
- | Property | Type | Description |
353
- |----------|------|-------------|
354
- | type | Number | Attribute to apply to the text. |
355
- | value | String \| Number \| Ti.UI.Color \| Object \| ParagraphAttribute | Attribute value. |
356
- | range | Array<Number> | Attribute range. |
357
-
358
- ---
359
-
360
- ## Ti.UI.Color
361
- > Represents a color used for UI components.
362
- > Extends Ti.Proxy
363
- > Platforms: both
364
-
365
- This type may be used on iOS for assignment to any property typically taking a String color value.
366
- A developer is not expected to typically interact with a <Titanium.UI.Color> object, as we generate them
367
- under the hood when converting the passed in String representations. One major exception is use of the
368
-
369
-
370
- ### Methods (1)
371
- | Method | Returns | Platform | Description |
372
- |--------|---------|----------|-------------|
373
- | toHex(—) | String | both | Returns a hex string representation of the color (in the RRGGBB or AARRGGBB for… |
374
-
375
-
376
- ---
377
-
378
- ## Ti.UI.Clipboard
379
- > A module used for accessing clipboard data.
380
- > Extends Ti.Module
381
- > Platforms: both
382
- > Type: module
383
-
384
- The Clipboard is a temporary data store, used to save a single item of data that may then
385
- be accessed by the user using UI copy and paste interactions within an app or between apps.
386
-
387
- On iOS, the module's `setData()` and `getData()` methods enable multiple representations of the
388
- same data item to be stored together with their respective
389
- [MIME type](http://en.wikipedia.org/wiki/Internet_media_type) to describe their format. For
390
- example, `'text'` and `'text/plain'` for text, and `'image/jpg'` and `'image/png'` for an image.
391
- iOS Will report back the type of data representation in `getItems()` as
392
- [Universal Type Identifiers](https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html).
393
-
394
- When working with text, either of the `getData()`/`setData()` methods may be used with a `'text/plain'` type, or
395
- the `getText()`/`hasText()`/`setText()` methods without the need to specify the type.
396
-
397
- Android currently only supports text data to be stored.
398
-
399
-
400
- *(See full overview in titanium-docs)*
401
-
402
- ### Properties (unique: 3/6)
403
- | Property | Type | Default | Platform | Description |
404
- |----------|------|---------|----------|-------------|
405
- | name | String | — | ios | Create a new named clipboard. |
406
- | unique | Boolean | — | ios | Create a new clipboard identified by a unique system-generated name. |
407
- | allowCreation | Boolean | — | ios | Create a clipboard identified by name if it doesn't exist. |
408
-
409
-
410
- ### Methods (14)
411
- | Method | Returns | Platform | Description |
412
- |--------|---------|----------|-------------|
413
- | clearData(type) | void | both | Deletes data of the specified MIME type stored in the clipboard. If MIME type o… |
414
- | clearText(—) | void | both | Deletes all text data stored in the clipboard. |
415
- | getData(type) | String \| Ti.Blob | both | Gets data of the specified MIME type stored in the clipboard. Returns null if n… |
416
- | getText(—) | String | both | Gets text data stored in the clipboard. |
417
- | hasData(type) | Boolean | both | Indicates whether any data of the specified MIME type is stored in the clipboar… |
418
- | hasText(—) | Boolean | both | Indicates whether any text data is stored in the clipboard. |
419
- | hasURLs(—) | Boolean | ios | Indicates whether any URLs are stored in the clipboard. |
420
- | hasImages(—) | Boolean | ios | Indicates whether any images are stored in the clipboard. |
421
- | hasColors(—) | Boolean | ios | Indicates whether any colors are stored in the clipboard. |
422
- | setData(type, data) | void | both | Stores data of the specified MIME type in the clipboard. |
423
- | setText(text) | void | both | Stores text data in the clipboard. |
424
- | setItems(items) | void | ios | Adds an array of items to a clipboard, and sets privacy options for all include… |
425
- | getItems(—) | Array<Dictionary> | ios | Gets the items that have been specified earlier using <Titanium.UI.Clipboard.se… |
426
- | remove(—) | void | ios | Removes the clipboard. |
427
-
428
-
429
- ### Related Types
430
-
431
- #### ClipboardItemsType
432
- > Dictionary describing the items for <Titanium.UI.Clipboard.setItems>.
433
-
434
- | Property | Type | Description |
435
- |----------|------|-------------|
436
- | items | Array<Dictionary> | An array of key-value items to add to the clipboard. The key must a valid mime-… |
437
- | options | Dictionary | The privacy options to apply to all the items on the clipboard. The available o… |
438
-
439
- ---
440
-
441
- ## Ti.UI.Picker
442
- > A control used to select one or more fixed values.
443
- > Extends Ti.UI.View
444
- > Platforms: both
445
-
446
- | Android | iOS |
447
- | ------- | --- |
448
- | ![Android](./picker_android.png) | ![iOS](./picker_ios.png) |
449
-
450
- Use the <Titanium.UI.createPicker> method or Alloy **`<Picker>`** element to create a picker control.
451
-
452
- On Android, the `useSpinner` property must be enabled to support multiple columns.
453
- By default, the spinner is automatically sized to fit its content and can overflow
454
- to additional spinner rows. The size of the picker can be adjusted with the `width`
455
- and `height` properties, but may omit picker columns or cut off picker rows
456
- if the size is set too small. This property is deprecated. Please use the default
457
- Android native "dropdown" style by not setting `useSpinner` to `true`.
458
-
459
- On iOS, the `height` property is only available in iOS 9 and later.
460
- By default, the size of the picker, including its background, is fixed at the
461
-
462
- *(See full overview in titanium-docs)*
463
-
464
- ### Properties (unique: 24/78)
465
- | Property | Type | Default | Platform | Description |
466
- |----------|------|---------|----------|-------------|
467
- | backgroundColor | String \| Ti.UI.Color | White (iOS), Transparent (Android) | both | Background color of the picker, as a color name or hex triplet. |
468
- | borderStyle | Number | <Titanium.UI.INPUT_BORDERSTYLE_FILLED> | android | Border style to use when picker is shown as a text field or drop-down field. |
469
- | columns | Array<Titanium.UI.PickerColumn> | — | both | Columns used for this picker, as an array of <Titanium.UI.PickerColumn> objects. |
470
- | countDownDuration | Number | — | ios | Duration in milliseconds used for a Countdown Timer picker. |
471
- | dateTimeColor | String \| Ti.UI.Color | black | ios | Sets the text color of date- and time-pickers. |
472
- | overrideUserInterfaceStyle | Number | Titanium.UI.USER_INTERFACE_STYLE_UNSPECIFIED | both | Forces the picker to used assigned theme instead of the system theme. |
473
- | format24 | Boolean | false | android | Determines whether the Time pickers display in 24-hour or 12-hour clock format. |
474
- | hintText | String | undefined | android | Text to be shown above date/time when picker is shown as a text field or drop-d… |
475
- | locale | String | System Settings | android | Locale used when displaying Date and Time picker values. |
476
- | maxDate | Date | — | both | Maximum date displayed when a Date picker is in use. |
477
- | minDate | Date | — | both | Minimum date displayed when a Date picker is in use. |
478
- | minuteInterval | Number | 1 | ios | Interval in minutes displayed when one of the Time types of pickers is in use. |
479
- | selectionIndicator | Boolean | true | android | Determines whether the visual selection indicator is shown. |
480
- | selectionOpens | Boolean | false (Android) | android | Determines whether calling the method `setSelectedRow` opens when called |
481
- | textAlign | String \| Number | <Titanium.UI.TEXT_ALIGNMENT_LEFT>, | android | Horizontal text alignment of the date picker when using <Titanium.UI.PICKER_TYP… |
482
- | datePickerStyle | Number | <Titanium.UI.DATE_PICKER_STYLE_AUTOMATIC> | both | Determines how a date or time picker should appear. |
483
- | type | Number | <Titanium.UI.PICKER_TYPE_PLAIN> | both | Determines the type of picker displayed |
484
- | useSpinner | Boolean | false | android | Determines if a multi-column spinner or single column drop-down picker should b… |
485
- | nativeSpinner | Boolean | false | android | Determines if a multi-column spinner or single column drop-down picker should b… |
486
- | value | Date | — | both | Date and time value for Date and Time pickers. |
487
- | visibleItems | Number | 5 | android | Number of visible rows to display. This is only applicable to a plain picker an… |
488
- | calendarViewShown | Boolean | false | android | Determines whether the calenderView is visible. |
489
- | font | Font | — | android | Font to use for text. |
490
- | color | String \| Ti.UI.Color | — | android | Text color of the Picker |
491
-
492
-
493
- ### Methods (7)
494
- | Method | Returns | Platform | Description |
495
- |--------|---------|----------|-------------|
496
- | add(data) | void | both | Adds rows or columns to the picker. |
497
- | getSelectedRow(index) | Ti.UI.PickerRow | both | Gets the selected row for a column, or `null` if none exists. |
498
- | reloadColumn(column) | void | ios | Repopulates values for a column. |
499
- | setSelectedRow(column, row, animated) | void | both | Selects a column's row. |
500
- | setValue(date) | Ti.UI.PickerRow | ios | Sets the date and time value property for Date pickers. |
501
- | showDatePickerDialog(dictObj) | void | android | Shows Date picker as a modal dialog. |
502
- | showTimePickerDialog(dictObj) | void | android | Shows Time picker as a modal dialog. |
503
-
504
- ### Events (2)
505
- | Event | Platform | Description |
506
- |-------|----------|-------------|
507
- | click | android | Fired when the device detects a click against the view. |
508
- | change | both | Fired when the value of any column's row is changed. |
509
-
510
- ### Related Types
511
-
512
- #### Font
513
- > An abstract datatype for specifying a text font.
514
-
515
- | Property | Type | Description |
516
- |----------|------|-------------|
517
- | fontFamily | String | Specifies the font family or specific font to use. |
518
- | fontSize | Number \| String | Font size, in platform-dependent units. |
519
- | fontWeight | String | Font weight. Valid values are "bold", "semibold", "normal", "thin", "light" and… |
520
- | fontStyle | String | Font style. Valid values are "italic" or "normal". |
521
- | textStyle | String | The text style for the font. |
522
-
523
- ---
524
-
525
- ## Ti.UI.PickerColumn
526
- > A picker column, representing a selectable group of items in a <Titanium.UI.Picker>.
527
- > Extends Ti.UI.View
528
- > Platforms: both
529
-
530
- Use the <Titanium.UI.createPickerColumn> method to create a picker column control. In an Alloy application,
531
- you can use a **`<PickerColumn>`** element inside a `<Picker>` element. You can also use `<Column>`
532
- as a shorthand for `<PickerColumn>` (see Examples).
533
-
534
- On Android, the `useSpinner` property must be enabled to support multiple columns.
535
-
536
- See <Titanium.UI.Picker> for further examples of usage.
537
-
538
- ### Properties (unique: 3/11)
539
- | Property | Type | Default | Platform | Description |
540
- |----------|------|---------|----------|-------------|
541
- | rowCount | Number | — | both | Number of rows in this column. |
542
- | rows | Array<Titanium.UI.PickerRow> | — | both | Rows of this column. |
543
- | font | Font | — | android | Font to use for text. |
544
-
545
-
546
- ### Methods (2)
547
- | Method | Returns | Platform | Description |
548
- |--------|---------|----------|-------------|
549
- | addRow(row) | void | both | Adds a row to this column. |
550
- | removeRow(row) | void | both | Removes a row from this column. |
551
-
552
-
553
- ### Related Types
554
-
555
- #### Font
556
- > An abstract datatype for specifying a text font.
557
-
558
- | Property | Type | Description |
559
- |----------|------|-------------|
560
- | fontFamily | String | Specifies the font family or specific font to use. |
561
- | fontSize | Number \| String | Font size, in platform-dependent units. |
562
- | fontWeight | String | Font weight. Valid values are "bold", "semibold", "normal", "thin", "light" and… |
563
- | fontStyle | String | Font style. Valid values are "italic" or "normal". |
564
- | textStyle | String | The text style for the font. |
565
-
566
- ---
567
-
568
- ## Ti.UI.PickerRow
569
- > A picker row, representing a selectable item in a <Titanium.UI.Picker>.
570
- > Extends Ti.UI.View
571
- > Platforms: both
572
-
573
- Use the <Titanium.UI.createPickerRow> method to create a picker row control. In an Alloy application,
574
- you can use a **`<PickerRow>`** element inside a `<PickerColumn>` element. You can also use `<Row>`
575
- as a shorthand for `<PickerRow>` (see Examples).
576
-
577
- Views added to picker rows is only supported on iOS.
578
-
579
- ### Properties (unique: 3/75)
580
- | Property | Type | Default | Platform | Description |
581
- |----------|------|---------|----------|-------------|
582
- | color | String \| Ti.UI.Color | — | both | Color of the item text, as a color name or hex triplet. |
583
- | font | Font | — | ios | Font to use for the item text. |
584
- | title | String | — | both | Item text. |
585
-
586
-
587
- ### Methods (1)
588
- | Method | Returns | Platform | Description |
589
- |--------|---------|----------|-------------|
590
- | add(view) | void | ios | Adds a child view to this picker row, to provide a custom row. |
591
-
592
-
593
- ### Related Types
594
-
595
- #### Font
596
- > An abstract datatype for specifying a text font.
597
-
598
- | Property | Type | Description |
599
- |----------|------|-------------|
600
- | fontFamily | String | Specifies the font family or specific font to use. |
601
- | fontSize | Number \| String | Font size, in platform-dependent units. |
602
- | fontWeight | String | Font weight. Valid values are "bold", "semibold", "normal", "thin", "light" and… |
603
- | fontStyle | String | Font style. Valid values are "italic" or "normal". |
604
- | textStyle | String | The text style for the font. |
605
-
606
- ---
607
-