@maccesar/titools 3.3.0 → 4.0.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.
- package/README.md +27 -61
- package/lib/cleanup.js +29 -0
- package/lib/commands/agents.js +8 -7
- package/lib/commands/skills.js +118 -23
- package/lib/config.js +13 -15
- package/lib/installer.js +5 -3
- package/lib/utils.js +36 -0
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +188 -0
- package/skills/alloy-guides/references/CLI_TASKS.md +233 -0
- package/skills/alloy-guides/references/CONCEPTS.md +171 -0
- package/skills/alloy-guides/references/CONTROLLERS.md +279 -0
- package/skills/alloy-guides/references/MODELS.md +742 -0
- package/skills/alloy-guides/references/MODELS_ADVANCED.md +482 -0
- package/skills/alloy-guides/references/PURGETSS.md +57 -0
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +235 -0
- package/skills/alloy-guides/references/VIEWS_STYLES.md +375 -0
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +102 -0
- package/skills/alloy-guides/references/VIEWS_XML.md +581 -0
- package/skills/alloy-guides/references/WIDGETS.md +160 -0
- package/skills/alloy-howtos/SKILL.md +179 -0
- package/skills/alloy-howtos/references/best_practices.md +121 -0
- package/skills/alloy-howtos/references/cli_reference.md +230 -0
- package/skills/alloy-howtos/references/config_files.md +158 -0
- package/skills/alloy-howtos/references/custom_tags.md +148 -0
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +78 -0
- package/skills/alloy-howtos/references/samples.md +156 -0
- package/skills/purgetss/SKILL.md +6 -3
- package/skills/purgetss/references/EXAMPLES.md +8 -6
- package/skills/purgetss/references/app-branding.md +5 -0
- package/skills/purgetss/references/apply-directive.md +1 -1
- package/skills/purgetss/references/class-categories.md +1 -1
- package/skills/purgetss/references/class-index-properties.md +618 -0
- package/skills/purgetss/references/class-index.md +4 -610
- package/skills/purgetss/references/cli-commands.md +15 -0
- package/skills/purgetss/references/custom-fonts.md +39 -36
- package/skills/purgetss/references/custom-rules.md +1 -1
- package/skills/purgetss/references/customization-deep-dive.md +64 -1
- package/skills/purgetss/references/icon-fonts.md +2 -0
- package/skills/purgetss/references/migration-guide.md +53 -1
- package/skills/purgetss/references/multi-density-images.md +53 -2
- package/skills/purgetss/references/svg-pipeline.md +249 -0
- package/skills/purgetss/references/tikit-components.md +2 -2
- package/skills/purgetss/references/titanium-resets.md +2 -2
- package/skills/purgetss/references/ui-ux-design.md +7 -5
- package/skills/purgetss/references/version-history.md +12 -0
- package/skills/ti-api/SKILL.md +128 -0
- package/skills/ti-api/references/api-android.md +675 -0
- package/skills/ti-api/references/api-app-platform.md +636 -0
- package/skills/ti-api/references/api-core.md +764 -0
- package/skills/ti-api/references/api-data-network.md +641 -0
- package/skills/ti-api/references/api-media.md +655 -0
- package/skills/ti-api/references/api-modules-ble-bluetooth.md +657 -0
- package/skills/ti-api/references/api-modules-coremotion-urlsession.md +411 -0
- package/skills/ti-api/references/api-modules-map.md +632 -0
- package/skills/ti-api/references/api-modules-nfc.md +725 -0
- package/skills/ti-api/references/api-modules-social-misc.md +526 -0
- package/skills/ti-api/references/api-services.md +700 -0
- package/skills/ti-api/references/api-ui-android.md +499 -0
- package/skills/ti-api/references/api-ui-extras.md +702 -0
- package/skills/ti-api/references/api-ui-ios-animator.md +378 -0
- package/skills/ti-api/references/api-ui-ios.md +756 -0
- package/skills/ti-api/references/api-ui-lists.md +581 -0
- package/skills/ti-api/references/api-ui-text-input.md +607 -0
- package/skills/ti-api/references/api-ui-views.md +572 -0
- package/skills/ti-api/references/api-ui-windows-navigation.md +676 -0
- package/skills/ti-api/references/api-xml-global.md +743 -0
- package/skills/ti-guides/SKILL.md +82 -0
- package/skills/ti-guides/references/advanced-data-and-images.md +155 -0
- package/skills/ti-guides/references/android-manifest.md +97 -0
- package/skills/ti-guides/references/app-distribution.md +373 -0
- package/skills/ti-guides/references/application-frameworks.md +366 -0
- package/skills/ti-guides/references/cli-reference.md +700 -0
- package/skills/ti-guides/references/coding-best-practices.md +150 -0
- package/skills/ti-guides/references/commonjs-advanced.md +279 -0
- package/skills/ti-guides/references/hello-world.md +99 -0
- package/skills/ti-guides/references/hyperloop-native-access.md +458 -0
- package/skills/ti-guides/references/javascript-primer.md +402 -0
- package/skills/ti-guides/references/reserved-words.md +36 -0
- package/skills/ti-guides/references/resources.md +172 -0
- package/skills/ti-guides/references/style-and-conventions.md +104 -0
- package/skills/ti-guides/references/tiapp-config.md +655 -0
- package/skills/ti-howtos/SKILL.md +131 -0
- package/skills/ti-howtos/references/android-platform-deep-dives.md +609 -0
- package/skills/ti-howtos/references/automation-fastlane-appium.md +96 -0
- package/skills/ti-howtos/references/buffer-codec-streams.md +162 -0
- package/skills/ti-howtos/references/cross-platform-development.md +358 -0
- package/skills/ti-howtos/references/debugging-profiling.md +473 -0
- package/skills/ti-howtos/references/extending-titanium.md +684 -0
- package/skills/ti-howtos/references/google-maps-v2.md +172 -0
- package/skills/ti-howtos/references/ios-map-kit.md +149 -0
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +595 -0
- package/skills/ti-howtos/references/local-data-sources.md +310 -0
- package/skills/ti-howtos/references/location-and-maps.md +267 -0
- package/skills/ti-howtos/references/media-apis.md +268 -0
- package/skills/ti-howtos/references/notification-services.md +539 -0
- package/skills/ti-howtos/references/remote-data-sources.md +339 -0
- package/skills/ti-howtos/references/tutorials.md +552 -0
- package/skills/ti-howtos/references/using-modules.md +182 -0
- package/skills/ti-howtos/references/web-content-integration.md +288 -0
- package/skills/ti-howtos/references/webpack-build-pipeline.md +125 -0
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
# Ti.UI Extras API Reference
|
|
2
|
+
|
|
3
|
+
## Ti.UI.Animation
|
|
4
|
+
> The `Animation` object defines an animation that can be applied to a view.
|
|
5
|
+
> Extends Ti.Proxy
|
|
6
|
+
> Platforms: both
|
|
7
|
+
|
|
8
|
+
An animation object describes the properties of an animation. At its most basic, an animation
|
|
9
|
+
object represents a single-phase animation with an end state and a duration.
|
|
10
|
+
|
|
11
|
+
When [animate](Titanium.UI.View.animate) is called on a [View](Titanium.UI.View), the view is
|
|
12
|
+
animated from its current state to the state described by the animation object. The properties
|
|
13
|
+
that can be animated include the view's position, size, colors, transformation matrix and opacity.
|
|
14
|
+
|
|
15
|
+
You can also specify an animation curve or *easing function* to control the pace of the
|
|
16
|
+
animation. To use an easing function, set the animation's `curve` property to one of the
|
|
17
|
+
`ANIMATION_CURVE` constants defined in <Titanium.UI>. For example,
|
|
18
|
+
[ANIMATION_CURVE_EASE_IN](Titanium.UI.ANIMATION_CURVE_EASE_IN) specifies an animation that
|
|
19
|
+
starts slowly and then speeds up.
|
|
20
|
+
|
|
21
|
+
Animations can be set to reverse themselves automatically on completion, and to repeat a given
|
|
22
|
+
number of times. For more complicated effects, multiple animations can be combined in sequence,
|
|
23
|
+
|
|
24
|
+
*(See full overview in titanium-docs)*
|
|
25
|
+
|
|
26
|
+
### Properties (unique: 28/31)
|
|
27
|
+
| Property | Type | Default | Platform | Description |
|
|
28
|
+
|----------|------|---------|----------|-------------|
|
|
29
|
+
| anchorPoint | Point | — | android | Coordinate of the view about which to pivot an animation. |
|
|
30
|
+
| autoreverse | Boolean | false | both | Specifies if the animation should be replayed in reverse upon completion. |
|
|
31
|
+
| backgroundColor | String \| Ti.UI.Color | — | both | Value of the `backgroundColor` property at the end of the animation, as a color… |
|
|
32
|
+
| bottom | Number | — | both | Value of the `bottom` property at the end of the animation. |
|
|
33
|
+
| center | Point | — | both | Value of the `center` property at the end of the animation. |
|
|
34
|
+
| color | String \| Ti.UI.Color | — | both | Value of the `color` property at the end of the animation, as a color name or h… |
|
|
35
|
+
| curve | Number | — | both | Animation curve or easing function to apply to the animation. |
|
|
36
|
+
| dampingRatio | Number | — | ios | The damping ratio for the spring animation as it approaches its quiescent state. |
|
|
37
|
+
| delay | Number | — | both | Delay, in milliseconds before starting the animation. |
|
|
38
|
+
| duration | Number | — | both | Duration of the animation, in milliseconds. |
|
|
39
|
+
| rotationY | Number | — | android | Value of the `rotationY` property at the end of the animation. |
|
|
40
|
+
| rotationX | Number | — | android | Value of the `rotationX` property at the end of the animation. |
|
|
41
|
+
| elevation | Number | — | android | Value of the `elevation` property at the end of the animation. |
|
|
42
|
+
| height | Number | — | both | Value of the `height` property at the end of the animation. |
|
|
43
|
+
| left | Number | — | both | Value of the `left` property at the end of the animation. |
|
|
44
|
+
| opacity | Number | — | both | Value of the `opacity` property at the end of the animation. |
|
|
45
|
+
| opaque | Boolean | — | ios | Value of the `opaque` property at the end of the animation. |
|
|
46
|
+
| repeat | Number | 1 (no repeat) | both | Number of times the animation should be performed. |
|
|
47
|
+
| right | Number | — | both | Value of the `right` property at the end of the animation. |
|
|
48
|
+
| springVelocity | Number | — | ios | The initial spring velocity. |
|
|
49
|
+
| bounce | Number | — | ios | The animation bounce. If set, the animation uses the iOS 17+ spring animation. |
|
|
50
|
+
| top | Number | — | both | Value of the `top` property at the end of the animation. |
|
|
51
|
+
| transform | Ti.UI.Matrix2D \| Ti.UI.Matrix3D | — | both | Animate the view from its current transform to the specified transform. |
|
|
52
|
+
| transition | Number | — | ios | Transition type to use during a transition animation. |
|
|
53
|
+
| view | Ti.UI.View | — | ios | New view to transition to. |
|
|
54
|
+
| visible | Boolean | — | ios | Value of the `visible` property at the end of the animation. |
|
|
55
|
+
| width | Number | — | both | Value of the `width` property at the end of the animation. |
|
|
56
|
+
| zIndex | Number | — | ios | Value of the `zIndex` property at the end of the animation. |
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Events (3)
|
|
61
|
+
| Event | Platform | Description |
|
|
62
|
+
|-------|----------|-------------|
|
|
63
|
+
| cancel | android | Fired when the animation is canceled. |
|
|
64
|
+
| complete | both | Fired when the animation completes. |
|
|
65
|
+
| start | both | Fired when the animation starts. |
|
|
66
|
+
|
|
67
|
+
### Related Types
|
|
68
|
+
|
|
69
|
+
#### Point
|
|
70
|
+
> A pair of coordinates used to describe the location of a <Titanium.UI.View>.
|
|
71
|
+
|
|
72
|
+
| Property | Type | Description |
|
|
73
|
+
|----------|------|-------------|
|
|
74
|
+
| x | Number \| String | The x-axis coordinate of this point. |
|
|
75
|
+
| y | Number \| String | The y-axis coordinate of this point. |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Ti.UI.Matrix2D
|
|
80
|
+
> The 2D Matrix is an object for holding values for an affine transformation matrix.
|
|
81
|
+
> Extends Ti.Proxy
|
|
82
|
+
> Platforms: both
|
|
83
|
+
|
|
84
|
+
A 2D matrix is used to rotate, scale, translate, or skew the objects in a two-dimensional space.
|
|
85
|
+
A 2D affine transformation can be represented by a 3 by 3 matrix:
|
|
86
|
+
|
|
87
|
+
### Properties (unique: 6/9)
|
|
88
|
+
| Property | Type | Default | Platform | Description |
|
|
89
|
+
|----------|------|---------|----------|-------------|
|
|
90
|
+
| a | Number | — | ios | The entry at position [1,1] in the matrix. |
|
|
91
|
+
| b | Number | — | ios | The entry at position [1,2] in the matrix. |
|
|
92
|
+
| c | Number | — | ios | The entry at position [2,1] in the matrix. |
|
|
93
|
+
| d | Number | — | ios | The entry at position [2,2] in the matrix. |
|
|
94
|
+
| tx | Number | — | ios | The entry at position [3,1] in the matrix. |
|
|
95
|
+
| ty | Number | — | ios | The entry at position [3,2] in the matrix. |
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Methods (5)
|
|
99
|
+
| Method | Returns | Platform | Description |
|
|
100
|
+
|--------|---------|----------|-------------|
|
|
101
|
+
| invert(—) | Ti.UI.Matrix2D | both | Returns a matrix constructed by inverting this matrix. |
|
|
102
|
+
| multiply(t2) | Ti.UI.Matrix2D | both | Returns a matrix constructed by combining two existing matrices. |
|
|
103
|
+
| rotate(angle, toAngle) | Ti.UI.Matrix2D | both | Returns a matrix constructed by rotating this matrix. |
|
|
104
|
+
| scale(sx, sy, toSx, toSy) | Ti.UI.Matrix2D | both | Returns a `Matrix2D` object that specifies a scaling animation from one scale t… |
|
|
105
|
+
| translate(tx, ty) | Ti.UI.Matrix2D | both | Returns a matrix constructed by applying a translation transform to this matrix. |
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Ti.UI.Matrix3D
|
|
111
|
+
> The 3D Matrix is an object for holding values for a 3D affine transform.
|
|
112
|
+
> Extends Ti.Proxy
|
|
113
|
+
> Platforms: ios
|
|
114
|
+
|
|
115
|
+
The 3D Matrix is created by <Titanium.UI.createMatrix3D>. A 3D transform is
|
|
116
|
+
used to rotate, scale, translate, or skew the objects in three-dimensional
|
|
117
|
+
space. A 3D transform is represented by a 4 by 4 matrix.
|
|
118
|
+
|
|
119
|
+
You create an `identity matrix` by creating a 3D Matrix with an empty
|
|
120
|
+
constructor.
|
|
121
|
+
|
|
122
|
+
### Properties (unique: 16/18)
|
|
123
|
+
| Property | Type | Default | Platform | Description |
|
|
124
|
+
|----------|------|---------|----------|-------------|
|
|
125
|
+
| m11 | Number | — | ios | The entry at position [1,1] in the matrix. |
|
|
126
|
+
| m12 | Number | — | ios | The entry at position [1,2] in the matrix. |
|
|
127
|
+
| m13 | Number | — | ios | The entry at position [1,3] in the matrix. |
|
|
128
|
+
| m14 | Number | — | ios | The entry at position [1,4] in the matrix. |
|
|
129
|
+
| m21 | Number | — | ios | The entry at position [2,1] in the matrix. |
|
|
130
|
+
| m22 | Number | — | ios | The entry at position [2,2] in the matrix. |
|
|
131
|
+
| m23 | Number | — | ios | The entry at position [2,3] in the matrix. |
|
|
132
|
+
| m24 | Number | — | ios | The entry at position [2,4] in the matrix. |
|
|
133
|
+
| m31 | Number | — | ios | The entry at position [3,1] in the matrix. |
|
|
134
|
+
| m32 | Number | — | ios | The entry at position [3,2] in the matrix. |
|
|
135
|
+
| m33 | Number | — | ios | The entry at position [3,3] in the matrix. |
|
|
136
|
+
| m34 | Number | — | ios | The entry at position [3,4] in the matrix. |
|
|
137
|
+
| m41 | Number | — | ios | The entry at position [4,1] in the matrix. |
|
|
138
|
+
| m42 | Number | — | ios | The entry at position [4,2] in the matrix. |
|
|
139
|
+
| m43 | Number | — | ios | The entry at position [4,3] in the matrix. |
|
|
140
|
+
| m44 | Number | — | ios | The entry at position [4,4] in the matrix. |
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
### Methods (5)
|
|
144
|
+
| Method | Returns | Platform | Description |
|
|
145
|
+
|--------|---------|----------|-------------|
|
|
146
|
+
| invert(—) | Ti.UI.Matrix3D | ios | Returns a matrix constructed by inverting this matrix. |
|
|
147
|
+
| multiply(t2) | Ti.UI.Matrix3D | ios | Returns a matrix constructed by combining two existing matrix. |
|
|
148
|
+
| rotate(angle, x, y, z) | Ti.UI.Matrix3D | ios | Returns a matrix constructed by rotating this matrix. |
|
|
149
|
+
| scale(sx, sy, sz) | Ti.UI.Matrix3D | ios | Returns a matrix constructed by scaling this matrix. |
|
|
150
|
+
| translate(tx, ty, tz) | Ti.UI.Matrix3D | ios | Returns a matrix constructed by translating an existing matrix. |
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Ti.UI.WebView
|
|
156
|
+
> The web view allows you to open an HTML5 based view which can load either local or remote content.
|
|
157
|
+
> Extends Ti.UI.View
|
|
158
|
+
> Platforms: both
|
|
159
|
+
|
|
160
|
+
Use the <Titanium.UI.createWebView> method or **`<WebView>`** Alloy element to create a web view.
|
|
161
|
+
|
|
162
|
+
Web views are more expensive to create than other native views because of the requirement to
|
|
163
|
+
load the HTML browser into memory.
|
|
164
|
+
|
|
165
|
+
The web view content can be any valid web content such as HTML, PDF, SVG or other WebKit supported
|
|
166
|
+
content types.
|
|
167
|
+
|
|
168
|
+
### JavaScript Context in WebViews--Local vs. Remote Content
|
|
169
|
+
|
|
170
|
+
JavaScript in the web view executes in its own context. The web view can interact with this
|
|
171
|
+
content, but most of this functionality is limited to local content.
|
|
172
|
+
|
|
173
|
+
**Local Scripts**
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
*(See full overview in titanium-docs)*
|
|
177
|
+
|
|
178
|
+
### Properties (unique: 44/123)
|
|
179
|
+
| Property | Type | Default | Platform | Description |
|
|
180
|
+
|----------|------|---------|----------|-------------|
|
|
181
|
+
| allowFileAccess | Boolean | false | android | A Boolean value indicating file access within WebView. |
|
|
182
|
+
| allowsLinkPreview | Boolean | false | ios | A Boolean value that determines whether pressing on a link displays a preview o… |
|
|
183
|
+
| blacklistedURLs | Array<String> | — | both | An array of URL strings to blacklist. |
|
|
184
|
+
| blockedURLs | Array<String> | — | both | An array of URL strings to be blocked. |
|
|
185
|
+
| data | Ti.Blob \| Ti.Filesystem.File | — | both | Web content to load. |
|
|
186
|
+
| disableBounce | Boolean | false | ios | Determines whether the view will bounce when scrolling to the edge of the scrol… |
|
|
187
|
+
| disableContextMenu | Boolean | false | both | Determines whether or not the webview should not be able to display the context… |
|
|
188
|
+
| enableJavascriptInterface | Boolean | true | android | Enable adding JavaScript interfaces internally to webview prior to JELLY_BEAN_M… |
|
|
189
|
+
| handlePlatformUrl | Boolean | undefined. Behaves as if false | ios | Lets the webview handle platform supported urls |
|
|
190
|
+
| configuration | Ti.UI.iOS.WebViewConfiguration | — | ios | The configuration for the new web view. |
|
|
191
|
+
| allowedURLSchemes | Array<String> | — | ios | List of allowed URL schemes for the web view. |
|
|
192
|
+
| hideLoadIndicator | Boolean | false | ios | Hides activity indicator when loading remote URL. |
|
|
193
|
+
| assetsDirectory | String | — | ios | Path of file or directory to allow read access by the WebView. |
|
|
194
|
+
| html | String | — | both | HTML content of this web view. |
|
|
195
|
+
| keyboardDisplayRequiresUserAction | Boolean | undefined but behaves as true | ios | A Boolean value indicating whether web content can programmatically display the… |
|
|
196
|
+
| hideKeyboardAccessoryView | Boolean | false | ios | A Boolean value indicating whether to hide the keyboard accessory bar. |
|
|
197
|
+
| autoAdjustScrollViewInsets | Boolean | false | ios | Specifies whether or not the web view should automatically adjust its scroll vi… |
|
|
198
|
+
| ignoreSslError | Boolean | undefined but behaves as false | both | Controls whether to ignore invalid SSL certificates or not. |
|
|
199
|
+
| loading | Boolean | — | ios | Indicates if the webview is loading content. |
|
|
200
|
+
| onCreateWindow | Callback<Object> | — | android | Callback function called when there is a request for the application to create … |
|
|
201
|
+
| onlink | Callback<OnLinkURLResponse> | — | both | Fired before navigating to a link. |
|
|
202
|
+
| overScrollMode | Number | Titanium.UI.Android.OVER_SCROLL_ALWAYS | android | Determines the behavior when the user overscrolls the view. |
|
|
203
|
+
| cacheMode | Number | <Titanium.UI.Android.WEBVIEW_LOAD_DEFAULT> | android | Determines how a cache is used in this web view. |
|
|
204
|
+
| pluginState | Number | <Titanium.UI.Android.WEBVIEW_PLUGINS_OFF> | android | Determines how to treat content that requires plugins in this web view. |
|
|
205
|
+
| scrollsToTop | Boolean | true | ios | Controls whether the scroll-to-top gesture is effective. |
|
|
206
|
+
| layerType | Number | <Titanium.UI.WebView.LAYER_TYPE_NONE> | android | A value indicating the render mode of the WebView |
|
|
207
|
+
| enableZoomControls | Boolean | true | android | If `true`, zoom controls are enabled. |
|
|
208
|
+
| mixedContentMode | Boolean | false | android | If `true`, allows the loading of insecure resources from a secure origin. |
|
|
209
|
+
| multipleWindows | Boolean | false | android | If set to `false` it will prevent the WebView from opening new windows/tabs. |
|
|
210
|
+
| scalesPageToFit | Boolean | `false` on iOS. On Android, `false` when content is specified as a local URL, `true` for any other kind of content (remote URL, `Blob`, or `File`). | both | If `true`, scale contents to fit the web view. |
|
|
211
|
+
| url | String | — | both | URL to the web document. |
|
|
212
|
+
| userAgent | String | System default user-agent value. | both | The User-Agent header used by the web view when requesting content. |
|
|
213
|
+
| willHandleTouches | Boolean | true | ios | Explicitly specifies if this web view handles touches. |
|
|
214
|
+
| lightTouchEnabled | Boolean | true | android | Enables using light touches to make a selection and activate mouseovers. |
|
|
215
|
+
| requestHeaders | Dictionary | — | both | Sets extra request headers for this web view to use on subsequent URL requests. |
|
|
216
|
+
| zoomLevel | Number | undefined. Behaves as no zoom applied. | both | Manage the zoom-level of the current page. |
|
|
217
|
+
| scrollbars | Number | <Titanium.UI.Android.WEBVIEW_SCROLLBARS_DEFAULT> | android | Enable or disable horizontal/vertical scrollbars in a WebView. |
|
|
218
|
+
| allowsBackForwardNavigationGestures | Boolean | false | ios | A Boolean value indicating whether horizontal swipe gestures will trigger back-… |
|
|
219
|
+
| title | String | — | ios | Returns page title of webpage. |
|
|
220
|
+
| progress | Number | — | both | An estimate of what fraction of the current navigation has been loaded. |
|
|
221
|
+
| cachePolicy | Number | — | ios | The cache policy for the request. |
|
|
222
|
+
| timeout | Number | — | ios | The timeout interval for the request, in seconds. |
|
|
223
|
+
| selectionGranularity | Number | — | ios | The level of granularity with which the user can interactively select content i… |
|
|
224
|
+
| secure | Boolean | — | ios | A Boolean value indicating whether all resources on the page have been loaded t… |
|
|
225
|
+
|
|
226
|
+
### Constants (8)
|
|
227
|
+
- **LAYER_TYPE_\***: LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYER_TYPE_HARDWARE
|
|
228
|
+
- **PDF_PAGE_DIN_\***: PDF_PAGE_DIN_A5, PDF_PAGE_DIN_A4, PDF_PAGE_DIN_A3, PDF_PAGE_DIN_A2, PDF_PAGE_DIN_A1
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
### Methods (24)
|
|
232
|
+
| Method | Returns | Platform | Description |
|
|
233
|
+
|--------|---------|----------|-------------|
|
|
234
|
+
| setHtml(html, options) | void | both | Sets the value of [html](Titanium.UI.WebView.html) property. |
|
|
235
|
+
| canGoBack(—) | Boolean | both | Returns `true` if the web view can go back in its history list. |
|
|
236
|
+
| canGoForward(—) | Boolean | both | Returns `true` if the web view can go forward in its history list. |
|
|
237
|
+
| evalJS(code, callback) | String | both | Evaluates a JavaScript expression inside the context of the web view and option… |
|
|
238
|
+
| goBack(—) | void | both | Goes back one entry in the web view's history list, to the previous page. |
|
|
239
|
+
| goForward(—) | void | both | Goes forward one entry in this web view's history list, if possible. |
|
|
240
|
+
| pause(—) | void | android | Pauses native webview plugins. |
|
|
241
|
+
| reload(—) | void | both | Reloads the current webpage. |
|
|
242
|
+
| repaint(—) | void | ios | Forces the web view to repaint its contents. |
|
|
243
|
+
| release(—) | void | android | Releases memory when the web view is no longer needed. |
|
|
244
|
+
| resume(—) | void | android | Resume native webview plugins. |
|
|
245
|
+
| setBasicAuthentication(username, password, persistence) | void | both | Sets the basic authentication for this web view to use on subsequent URL reques… |
|
|
246
|
+
| stopLoading(—) | void | both | Stops loading a currently loading page. |
|
|
247
|
+
| startListeningToProperties(propertyList) | void | ios | Add native properties for observing for change. |
|
|
248
|
+
| stopListeningToProperties(propertyList) | void | ios | Remove native properties from observing. |
|
|
249
|
+
| takeSnapshot(callback) | void | ios | Takes a snapshot of the view's visible viewport. |
|
|
250
|
+
| addUserScript(params) | void | ios | Adds a user script. |
|
|
251
|
+
| removeAllUserScripts(—) | void | ios | Removes all associated user scripts. |
|
|
252
|
+
| addScriptMessageHandler(handlerName) | void | both | Adds a script message handler. |
|
|
253
|
+
| removeScriptMessageHandler(name) | void | both | Removes a script message handler. |
|
|
254
|
+
| backForwardList(—) | BackForwardList | ios | An object which maintains a list of visited pages used to go back and forward t… |
|
|
255
|
+
| createPDF(pageWidth, pageHeight, pageSize, showMenu, firstPageOnly, success, callback) | void | both | Create a PDF document representation from the web page currently displayed in t… |
|
|
256
|
+
| createWebArchive(callback) | void | ios | Create WebKit web archive data representing the current web content of the WebV… |
|
|
257
|
+
| findString(searchString, options, callback) | void | ios | Searches the page contents for the given string. |
|
|
258
|
+
|
|
259
|
+
### Events (11)
|
|
260
|
+
| Event | Platform | Description |
|
|
261
|
+
|-------|----------|-------------|
|
|
262
|
+
| beforeload | both | Fired before the web view starts loading its content. |
|
|
263
|
+
| error | both | Fired when the web view cannot load the content. |
|
|
264
|
+
| load | both | Fired when the web view content is loaded. |
|
|
265
|
+
| onLoadResource | android | Fired when loading resource. |
|
|
266
|
+
| sslerror | both | Fired when an SSL error occurred. |
|
|
267
|
+
| blacklisturl | both | Fired when a blacklisted URL is stopped. |
|
|
268
|
+
| blockedurl | both | Fired when a URL has been blocked from loading. |
|
|
269
|
+
| message | both | Fired when a script message is received from a webpage. |
|
|
270
|
+
| progress | both | Fired when webpage download progresses. |
|
|
271
|
+
| redirect | ios | Fired when a web view receives a server redirect. |
|
|
272
|
+
| handleurl | ios | Fired when <Titanium.UI.WebView.allowedURLSchemes> contains scheme of opening u… |
|
|
273
|
+
|
|
274
|
+
### Related Types
|
|
275
|
+
|
|
276
|
+
#### BackForwardList
|
|
277
|
+
> The object returned to the <Titanium.UI.WebView.backForwardList> method.
|
|
278
|
+
|
|
279
|
+
| Property | Type | Description |
|
|
280
|
+
|----------|------|-------------|
|
|
281
|
+
| currentItem | BackForwardListItem | The current item. |
|
|
282
|
+
| backItem | BackForwardListItem | The item immediately preceding the current item. |
|
|
283
|
+
| forwardItem | BackForwardListItem | The item immediately following the current item. |
|
|
284
|
+
| backList | Array<BackForwardListItem> | The portion of the list preceding the current item. |
|
|
285
|
+
| forwardList | Array<BackForwardListItem> | The portion of the list following the current item. |
|
|
286
|
+
|
|
287
|
+
#### Dictionary
|
|
288
|
+
> Plain JavaScript object.
|
|
289
|
+
|
|
290
|
+
#### StringSearchOptions
|
|
291
|
+
> The optional options to pass to the <Titanium.UI.WebView.findString>. Pass a dictionary with one or more of the following string-keys: * `caseSensitive` (Boolean value) * `backward` (Boolean value) * `wraps` (Boolean value)
|
|
292
|
+
|
|
293
|
+
| Property | Type | Description |
|
|
294
|
+
|----------|------|-------------|
|
|
295
|
+
| caseSensitive | Boolean | Whether or not the search should be case sensitive. |
|
|
296
|
+
| backward | Boolean | The direction to search from the current selection. The search will respect the… |
|
|
297
|
+
| wraps | Boolean | Whether the search should start at the beginning of the document once it reache… |
|
|
298
|
+
|
|
299
|
+
*Plus 2 more types: *
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Ti.UI.Toolbar
|
|
304
|
+
> A Toolbar can contain buttons, as well as certain other widgets, including text fields and labels.
|
|
305
|
+
> Extends Ti.UI.View
|
|
306
|
+
> Platforms: both
|
|
307
|
+
|
|
308
|
+
A `Toolbar` is created by the <Titanium.UI.createToolbar> factory method or **`<Toolbar>`** Alloy element.
|
|
309
|
+
|
|
310
|
+
To provide spacing between items in the toolbar, on iOS you can use the special system button types,
|
|
311
|
+
[FIXED_SPACE](Titanium.UI.iOS.SystemButton.FIXED_SPACE) and
|
|
312
|
+
[FLEXIBLE_SPACE](Titanium.UI.iOS.SystemButton.FLEXIBLE_SPACE).
|
|
313
|
+
|
|
314
|
+
Note that toolbars are positioned like other views (using the `top` and `bottom` properties,
|
|
315
|
+
for example), but the [iOS Human Interface Guidelines](https://developer.apple.com/ios/human-interface-guidelines/overview/themes/#//apple_ref/doc/uid/TP40006556-CH12-SW4)
|
|
316
|
+
have specific requirements for placing toolbars, specifically:
|
|
317
|
+
|
|
318
|
+
* On the iPhone and Android, a toolbar should be at the bottom of the window.
|
|
319
|
+
* On the iPad, a toolbar should appear at the top or bottom of a window.
|
|
320
|
+
|
|
321
|
+
Due to an iOS limitation, the buttons in the toolbar only support the `click` event.
|
|
322
|
+
The native object underlying a toolbar button does not generate standard view events,
|
|
323
|
+
|
|
324
|
+
*(See full overview in titanium-docs)*
|
|
325
|
+
|
|
326
|
+
### Properties (unique: 14/73)
|
|
327
|
+
| Property | Type | Default | Platform | Description |
|
|
328
|
+
|----------|------|---------|----------|-------------|
|
|
329
|
+
| barColor | String \| Ti.UI.Color | — | both | Background color for the toolbar, as a color name or hex triplet. |
|
|
330
|
+
| items | Array<Titanium.UI.View> | — | both | An array of buttons (or other widgets) contained in the toolbar. |
|
|
331
|
+
| extendBackground | Boolean | Undefined. Behaves as if set to false. | both | If `true`, the background of the toolbar extends upwards. |
|
|
332
|
+
| translucent | Boolean | true | ios | If `true`, a translucent background color is used for the toolbar. |
|
|
333
|
+
| contentInsetEndWithActions | Number | — | android | Returns the margin after the toolbar's content when there are action buttons. |
|
|
334
|
+
| contentInsetStartWithNavigation | Number | — | android | Returns the margin at the toolbar's content start when there is a navigation bu… |
|
|
335
|
+
| logo | String \| Ti.Blob \| Ti.Filesystem.File | — | android | Image to be used as a logo in the Toolbar. |
|
|
336
|
+
| navigationIcon | String \| Ti.Blob \| Ti.Filesystem.File | — | android | Image to be used for a navigation icon. |
|
|
337
|
+
| navigationIconColor | String | — | android | Tint color of the navigation icon (e.g. home arrow) |
|
|
338
|
+
| overflowIcon | String \| Ti.Blob \| Ti.Filesystem.File | — | android | Image to be used for the overflow menu. |
|
|
339
|
+
| subtitle | String | — | android | Text of the subtitle. |
|
|
340
|
+
| subtitleTextColor | String | — | android | Color for toolbar's subtitle |
|
|
341
|
+
| title | String | — | android | Text of the title. |
|
|
342
|
+
| titleTextColor | String | — | android | Color string with any Titanium supported format |
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
### Methods (16)
|
|
346
|
+
| Method | Returns | Platform | Description |
|
|
347
|
+
|--------|---------|----------|-------------|
|
|
348
|
+
| collapseActionViews(—) | void | android | Collapses expanded ActionViews if there is any |
|
|
349
|
+
| dismissPopupMenus(—) | void | android | Collapses expanded ActionViews and hides overflow menu |
|
|
350
|
+
| getContentInsetEnd(—) | Number | android | Returns the margin at the toolbar's content end. |
|
|
351
|
+
| getContentInsetLeft(—) | Number | android | Returns the margin on the left of the toolbar's content. |
|
|
352
|
+
| getContentInsetRight(—) | Number | android | Returns the margin on the right of the toolbar's content. |
|
|
353
|
+
| getContentInsetStart(—) | Number | android | Returns the margin at the toolbar's content start. |
|
|
354
|
+
| getCurrentContentInsetEnd(—) | Number | android | Returns the margin at the toolbar's content end that will be used with the curr… |
|
|
355
|
+
| getCurrentContentInsetLeft(—) | Number | android | Returns the margin on the left of the toolbar's content that will be used with … |
|
|
356
|
+
| getCurrentContentInsetRight(—) | Number | android | Returns the margin on the right of the toolbar's content that will be used with… |
|
|
357
|
+
| getCurrentContentInsetStart(—) | Number | android | Returns the margin at the toolbar's content start that will be used with the cu… |
|
|
358
|
+
| hasExpandedActionView(—) | Boolean | android | Checks if the toolbar is currently hosting an expanded action view. |
|
|
359
|
+
| hideOverflowMenu(—) | void | android | Hides the overflow menu if there is one. |
|
|
360
|
+
| isOverflowMenuShowing(—) | Boolean | android | Checks if the toolbar is currently hosting an expanded action view. |
|
|
361
|
+
| setContentInsetsAbsolute(insetLeft, insetRight) | void | android | Sets the content margins of the toolbar |
|
|
362
|
+
| setContentInsetsRelative(insetStart, insetEnd) | void | android | Sets the content margins relative to the layout direction |
|
|
363
|
+
| showOverflowMenu(—) | void | android | Shows the overflow menu if there is one |
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Ti.UI.ButtonBar
|
|
369
|
+
> An iOS button bar component.
|
|
370
|
+
> Extends Ti.UI.View
|
|
371
|
+
> Platforms: both
|
|
372
|
+
|
|
373
|
+
| Android | iOS |
|
|
374
|
+
| ------- | --- |
|
|
375
|
+
|  | |
|
|
376
|
+
|
|
377
|
+
The button bar is a set of buttons joined into a single control.
|
|
378
|
+
On iOS, you can set up the buttons with either a title or image, but not both.
|
|
379
|
+
On Android, you can set up the buttons with a title, image, or both.
|
|
380
|
+
|
|
381
|
+
Use the <Titanium.UI.createButtonBar> method or **`<ButtonBar>`** Alloy element to create a button bar.
|
|
382
|
+
|
|
383
|
+
The [TabbedBar](Titanium.UI.iOS.TabbedBar) control is a button bar where the
|
|
384
|
+
last selected button maintains a pressed or selected state. The following discussion
|
|
385
|
+
applies to both button bar and tabbed bar.
|
|
386
|
+
|
|
387
|
+
### Properties (unique: 5/76)
|
|
388
|
+
| Property | Type | Default | Platform | Description |
|
|
389
|
+
|----------|------|---------|----------|-------------|
|
|
390
|
+
| index | Number | — | both | Index of the currently selected button. |
|
|
391
|
+
| labels | Array<String> \| Array<BarItemType> | — | both | Array of labels for the button bar. |
|
|
392
|
+
| textColor | String \| Ti.UI.Color | — | ios | Color of title of button, as a color name or hex triplet. |
|
|
393
|
+
| selectedTextColor | String \| Ti.UI.Color | — | ios | Color of title of button when it is selected, as a color name or hex triplet. |
|
|
394
|
+
| selectedButtonColor | String \| Ti.UI.Color | — | ios | Color of selected button, as a color name or hex triplet. |
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
### Events (1)
|
|
399
|
+
| Event | Platform | Description |
|
|
400
|
+
|-------|----------|-------------|
|
|
401
|
+
| click | both | Fired when a button is clicked. |
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## Ti.UI.TabbedBar
|
|
406
|
+
> A button bar that maintains a selected state.
|
|
407
|
+
> Extends Ti.UI.View
|
|
408
|
+
> Platforms: both
|
|
409
|
+
|
|
410
|
+
A tabbed bar is a button bar that
|
|
411
|
+
maintains a state (visually distinguished as a pressed or selected look).
|
|
412
|
+
It is closely related to the `ButtonBar` control. See the description of
|
|
413
|
+
[ButtonBar](Titanium.UI.ButtonBar) for information on styling tabbed bars and buttons
|
|
414
|
+
bars.
|
|
415
|
+
|
|
416
|
+
Use the <Titanium.UI.createTabbedBar> method to create a Tabbed Bar.
|
|
417
|
+
|
|
418
|
+
### Properties (unique: 7/78)
|
|
419
|
+
| Property | Type | Default | Platform | Description |
|
|
420
|
+
|----------|------|---------|----------|-------------|
|
|
421
|
+
| index | Number | — | both | Index of the currently selected button. |
|
|
422
|
+
| labels | Array<String> \| Array<BarItemType> | — | both | Array of labels for the tabbed bar. |
|
|
423
|
+
| textColor | String \| Ti.UI.Color | — | both | Color of the text |
|
|
424
|
+
| selectedBackgroundColor | String \| Ti.UI.Color | — | android | Background color of the selected tab indicator. |
|
|
425
|
+
| selectedTextColor | String \| Ti.UI.Color | — | both | Color of the selected text |
|
|
426
|
+
| activeTintColor | String \| Ti.UI.Color | — | android | Icon tint color of the selected tab |
|
|
427
|
+
| style | Number | Titanium.UI.BUTTON_STYLE_OPTION_NEUTRAL for iOS, Ti.UI.TABS_STYLE_DEFAULT for Android | both | Style of the tabbed bar. |
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
### Events (1)
|
|
432
|
+
| Event | Platform | Description |
|
|
433
|
+
|-------|----------|-------------|
|
|
434
|
+
| click | both | Fired when a button is clicked. |
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
## Ti.UI.OptionBar
|
|
439
|
+
> A bar of selectable buttons where only 1 can be selected at a time.
|
|
440
|
+
> Extends Ti.UI.View
|
|
441
|
+
> Platforms: both
|
|
442
|
+
|
|
443
|
+
| Android | iOS |
|
|
444
|
+
| ------- | --- |
|
|
445
|
+
|  | |
|
|
446
|
+
|
|
447
|
+
This is a view which shows a list of options where only 1 option is selectable by the user.
|
|
448
|
+
|
|
449
|
+
On iOS, this displays a
|
|
450
|
+
[segmented control](https://developer.apple.com/design/human-interface-guidelines/ios/controls/segmented-controls/).
|
|
451
|
+
|
|
452
|
+
On Android, this displays a
|
|
453
|
+
[toggle button group](https://material.io/components/buttons/android#toggle-button).
|
|
454
|
+
|
|
455
|
+
Use the <Titanium.UI.createOptionBar> method to create a Option Bar.
|
|
456
|
+
|
|
457
|
+
### Properties (unique: 7/77)
|
|
458
|
+
| Property | Type | Default | Platform | Description |
|
|
459
|
+
|----------|------|---------|----------|-------------|
|
|
460
|
+
| layout | String | horizontal | both | Specifies the layout direction such as 'horizontal' or 'vertical'. |
|
|
461
|
+
| index | Number | — | both | Index of the currently selected option. |
|
|
462
|
+
| labels | Array<String> \| Array<BarItemType> | — | both | Array of labels for the option bar. |
|
|
463
|
+
| selectedBackgroundColor | String \| Ti.UI.Color | — | android | Background color of the selected button |
|
|
464
|
+
| selectedTextColor | String \| Ti.UI.Color | — | android | Text color of the selected button |
|
|
465
|
+
| selectedBorderColor | String \| Ti.UI.Color | — | android | Border color of the selected button |
|
|
466
|
+
| color | String \| Ti.UI.Color | — | android | Text color of the unselected button |
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
### Events (1)
|
|
471
|
+
| Event | Platform | Description |
|
|
472
|
+
|-------|----------|-------------|
|
|
473
|
+
| click | both | Fired when an option has been selected. |
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## Ti.UI.Shortcut
|
|
478
|
+
> Manage application shortcuts.
|
|
479
|
+
> Extends Ti.Proxy
|
|
480
|
+
> Platforms: both
|
|
481
|
+
|
|
482
|
+
Allows the creation of application shortcuts, which can be detected using
|
|
483
|
+
the `click` event from <Titanium.UI.Shortcut>.
|
|
484
|
+
|
|
485
|
+
On iOS, shortcuts are only supported on a 3D Touch compatible device.
|
|
486
|
+
Use the <Titanium.UI.iOS.forceTouchSupported> property to see if it's supported.
|
|
487
|
+
|
|
488
|
+
### Properties (unique: 2/5)
|
|
489
|
+
| Property | Type | Default | Platform | Description |
|
|
490
|
+
|----------|------|---------|----------|-------------|
|
|
491
|
+
| items | Array<Titanium.UI.ShortcutItem> | — | both | List dynamic shortcuts. |
|
|
492
|
+
| staticItems | Array<Titanium.UI.ShortcutItem> | — | both | List current pinned/static shortcuts. |
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
### Methods (4)
|
|
496
|
+
| Method | Returns | Platform | Description |
|
|
497
|
+
|--------|---------|----------|-------------|
|
|
498
|
+
| add(item) | void | both | Adds a shortcut item to the application. |
|
|
499
|
+
| remove(item) | void | both | Removes the given shortcut item from the application. |
|
|
500
|
+
| removeAll(—) | void | both | Removes all shortcut items from the application. |
|
|
501
|
+
| getById(id) | Ti.UI.ShortcutItem | both | Fetches a shortcut item by its unique string identifier. |
|
|
502
|
+
|
|
503
|
+
### Events (1)
|
|
504
|
+
| Event | Platform | Description |
|
|
505
|
+
|-------|----------|-------------|
|
|
506
|
+
| click | both | Fired when a <Titanium.UI.ShortcutItem> was clicked on. |
|
|
507
|
+
|
|
508
|
+
---
|
|
509
|
+
|
|
510
|
+
## Ti.UI.ShortcutItem
|
|
511
|
+
> An application shortcut item.
|
|
512
|
+
> Extends Ti.Proxy
|
|
513
|
+
> Platforms: both
|
|
514
|
+
|
|
515
|
+
Allows the creation of dynamic application shortcut items which can be set in the app to
|
|
516
|
+
offer a dynamic behavior at runtime.
|
|
517
|
+
|
|
518
|
+
Use the <Titanium.UI.createShortcutItem> method to create a shortcut item and pass it to
|
|
519
|
+
the <Titanium.UI.Shortcut.add> method to add it to the application.
|
|
520
|
+
|
|
521
|
+
### Android Static Shortcuts
|
|
522
|
+
Google documents how to add static shortcuts
|
|
523
|
+
[here](https://developer.android.com/guide/topics/ui/shortcuts/creating-shortcuts#static).
|
|
524
|
+
|
|
525
|
+
In the `tiapp.xml` file, you will need to add a shortcuts `<meta-data/>` element to your main activity.
|
|
526
|
+
``` xml
|
|
527
|
+
|
|
528
|
+
### Properties (unique: 6/9)
|
|
529
|
+
| Property | Type | Default | Platform | Description |
|
|
530
|
+
|----------|------|---------|----------|-------------|
|
|
531
|
+
| id | String | — | both | Determines shortcut id. |
|
|
532
|
+
| title | String | — | both | Title of the shortcut. |
|
|
533
|
+
| description | String | — | both | Description of the shortcut. |
|
|
534
|
+
| icon | String \| Number | — | both | Shortcut icon. |
|
|
535
|
+
| data | Object | — | both | Shortcut data. |
|
|
536
|
+
| visible | Boolean | — | android | Shortcut visibility. |
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
### Methods (3)
|
|
540
|
+
| Method | Returns | Platform | Description |
|
|
541
|
+
|--------|---------|----------|-------------|
|
|
542
|
+
| show(—) | void | android | Allow the shortcut to show. |
|
|
543
|
+
| hide(—) | void | android | Hide the shortcut. |
|
|
544
|
+
| pin(—) | void | android | Pin shortcut to launcher. |
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Ti.UI.EmailDialog
|
|
550
|
+
> An email dialog is a modal window that allows users to compose and send an email.
|
|
551
|
+
> Extends Ti.UI.View
|
|
552
|
+
> Platforms: both
|
|
553
|
+
|
|
554
|
+
| Android | iOS |
|
|
555
|
+
| ------- | --- |
|
|
556
|
+
|  |  |
|
|
557
|
+
|
|
558
|
+
The Email Dialog is created with the <Titanium.UI.createEmailDialog> method. The user needs to
|
|
559
|
+
register an e-mail account on the device in order to open the dialog. The dialog will not
|
|
560
|
+
open when there is not a registered e-mail account.
|
|
561
|
+
|
|
562
|
+
**iOS Platform Notes**
|
|
563
|
+
|
|
564
|
+
On iOS, you cannot test the e-mail dialog on the iOS Simulator. Test the email dialog on device.
|
|
565
|
+
|
|
566
|
+
### Properties (unique: 7/35)
|
|
567
|
+
| Property | Type | Default | Platform | Description |
|
|
568
|
+
|----------|------|---------|----------|-------------|
|
|
569
|
+
| barColor | String \| Ti.UI.Color | — | ios | Bar color of the email dialog window, as a color name or hex triplet. |
|
|
570
|
+
| bccRecipients | Array<String> | — | both | Recipients of the email included via the `BCC` (Blind Carbon Copy) field. |
|
|
571
|
+
| ccRecipients | Array<String> | — | both | Recipients of the email included via the `CC` (Carbon Copy) field. |
|
|
572
|
+
| html | Boolean | false | both | Determines whether the email message, specifically the contents of [messageBody… |
|
|
573
|
+
| messageBody | String | — | both | Email message body. |
|
|
574
|
+
| subject | String | — | both | Subject line for the email. |
|
|
575
|
+
| toRecipients | Array<String> | — | both | Recipients of the email included via the main `TO` field. |
|
|
576
|
+
|
|
577
|
+
### Constants (4)
|
|
578
|
+
- **OTHER_\***: CANCELLED, FAILED, SAVED, SENT
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
### Methods (3)
|
|
582
|
+
| Method | Returns | Platform | Description |
|
|
583
|
+
|--------|---------|----------|-------------|
|
|
584
|
+
| addAttachment(attachment) | void | both | Adds an attachment. |
|
|
585
|
+
| isSupported(—) | Boolean | both | Indicates whether sending email is supported by the system. |
|
|
586
|
+
| open(options) | void | both | Opens this email dialog. |
|
|
587
|
+
|
|
588
|
+
### Events (1)
|
|
589
|
+
| Event | Platform | Description |
|
|
590
|
+
|-------|----------|-------------|
|
|
591
|
+
| complete | both | Fired when this email dialog has completed sending an email. |
|
|
592
|
+
|
|
593
|
+
### Related Types
|
|
594
|
+
|
|
595
|
+
#### AnimatedOptions
|
|
596
|
+
> A JavaScript object holding an `animated` property. Used for many UI methods as a means of specifying some transition should be animated.
|
|
597
|
+
|
|
598
|
+
| Property | Type | Description |
|
|
599
|
+
|----------|------|-------------|
|
|
600
|
+
| animated | Boolean | If `true`, animate a transition for the method/value change. Note that for most… |
|
|
601
|
+
|
|
602
|
+
---
|
|
603
|
+
|
|
604
|
+
## Ti.UI.DashboardView
|
|
605
|
+
> A dashboard view is an iOS Springboard-like view of <Titanium.UI.DashboardItem> items that may be deleted and reordered by the user using its built-in edit mode.
|
|
606
|
+
> Extends Ti.UI.View
|
|
607
|
+
> Platforms: ios
|
|
608
|
+
|
|
609
|
+
The DashboardView is created using the <Titanium.UI.createDashboardView> method or **`<DashboardView>`**
|
|
610
|
+
Alloy element.
|
|
611
|
+
|
|
612
|
+
Dashboard view's edit mode may be activated by a longpress of a <Titanium.UI.DashboardItem> item,
|
|
613
|
+
unless this behavior has been disabled by the [editable](Titanium.UI.DashboardView.editable)
|
|
614
|
+
property. As a dashboard view does not inherently provide a way to exit edit mode, this must be
|
|
615
|
+
explicitly defined.
|
|
616
|
+
|
|
617
|
+
When edit mode has been activated, the item icons wobble by default to act as a visual cue.
|
|
618
|
+
This behavior may be disabled using the [wobble](Titanium.UI.DashboardView.wobble) property.
|
|
619
|
+
|
|
620
|
+
If a dashboard contains more than 9 items, it will be paged into screens in a 3 x 3 formation
|
|
621
|
+
using its built-in scrollable view. A paging control is added to the bottom of the view to
|
|
622
|
+
indicate the active page.
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
*(See full overview in titanium-docs)*
|
|
626
|
+
|
|
627
|
+
### Properties (unique: 5/51)
|
|
628
|
+
| Property | Type | Default | Platform | Description |
|
|
629
|
+
|----------|------|---------|----------|-------------|
|
|
630
|
+
| columnCount | Number | 3 | ios | The number of columns of items in the view. |
|
|
631
|
+
| rowCount | Number | 3 | ios | The number of rows of items in the view. |
|
|
632
|
+
| data | Array<Titanium.UI.DashboardItem> | — | ios | Items to display in this view. |
|
|
633
|
+
| editable | Boolean | true | ios | Determines whether edit mode is activated by a longpress of an item. |
|
|
634
|
+
| wobble | Boolean | true | ios | Determines whether the wobble visual editing cue is enabled in edit mode. |
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
### Methods (2)
|
|
638
|
+
| Method | Returns | Platform | Description |
|
|
639
|
+
|--------|---------|----------|-------------|
|
|
640
|
+
| startEditing(—) | void | ios | Enable edit mode. |
|
|
641
|
+
| stopEditing(—) | void | ios | Disable edit mode. |
|
|
642
|
+
|
|
643
|
+
### Events (8)
|
|
644
|
+
| Event | Platform | Description |
|
|
645
|
+
|-------|----------|-------------|
|
|
646
|
+
| click | ios | Fired when the device detects a click against the view. |
|
|
647
|
+
| commit | ios | Fired when edit mode ends. |
|
|
648
|
+
| delete | ios | Fired when an item is deleted in edit mode. |
|
|
649
|
+
| dragend | ios | Fired when an item finishes being dragged in edit mode. |
|
|
650
|
+
| dragstart | ios | Fired when an item starts being dragged in edit mode. |
|
|
651
|
+
| edit | ios | Fired when edit mode starts. |
|
|
652
|
+
| move | ios | Fired when an item is moved in edit mode. |
|
|
653
|
+
| pagechanged | ios | Fired when the current page of the dashboard view changes. |
|
|
654
|
+
|
|
655
|
+
### Related Types
|
|
656
|
+
|
|
657
|
+
#### Point
|
|
658
|
+
> A pair of coordinates used to describe the location of a <Titanium.UI.View>.
|
|
659
|
+
|
|
660
|
+
| Property | Type | Description |
|
|
661
|
+
|----------|------|-------------|
|
|
662
|
+
| x | Number \| String | The x-axis coordinate of this point. |
|
|
663
|
+
| y | Number \| String | The y-axis coordinate of this point. |
|
|
664
|
+
|
|
665
|
+
---
|
|
666
|
+
|
|
667
|
+
## Ti.UI.DashboardItem
|
|
668
|
+
> A dashboard item is a view that is displayed as an icon in a <Titanium.UI.DashboardView>.
|
|
669
|
+
> Extends Ti.Proxy
|
|
670
|
+
> Platforms: ios
|
|
671
|
+
|
|
672
|
+
A DashboardItem is created using the <Titanium.UI.createDashboardItem> method or **`<DashboardItem>`** Alloy element.
|
|
673
|
+
|
|
674
|
+
### Properties (unique: 4/6)
|
|
675
|
+
| Property | Type | Default | Platform | Description |
|
|
676
|
+
|----------|------|---------|----------|-------------|
|
|
677
|
+
| badge | Number | 0 | ios | Integer value displayed in a badge. |
|
|
678
|
+
| canDelete | Boolean | true | ios | Determines whether this item can be deleted when it edit mode. |
|
|
679
|
+
| image | String \| Ti.Blob | — | ios | Image or path to image to display in the item by default. |
|
|
680
|
+
| selectedImage | String \| Ti.Blob | — | ios | Image or path to image to display in the item as it is selected. |
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
### Events (3)
|
|
685
|
+
| Event | Platform | Description |
|
|
686
|
+
|-------|----------|-------------|
|
|
687
|
+
| click | ios | Fired when a click is detected against the view. |
|
|
688
|
+
| delete | ios | Fired when an item is deleted during editing mode. |
|
|
689
|
+
| move | ios | Fired when an item is moved during editing mode. |
|
|
690
|
+
|
|
691
|
+
### Related Types
|
|
692
|
+
|
|
693
|
+
#### Point
|
|
694
|
+
> A pair of coordinates used to describe the location of a <Titanium.UI.View>.
|
|
695
|
+
|
|
696
|
+
| Property | Type | Description |
|
|
697
|
+
|----------|------|-------------|
|
|
698
|
+
| x | Number \| String | The x-axis coordinate of this point. |
|
|
699
|
+
| y | Number \| String | The y-axis coordinate of this point. |
|
|
700
|
+
|
|
701
|
+
---
|
|
702
|
+
|