@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,676 @@
|
|
|
1
|
+
# Ti.UI Windows & Navigation API Reference
|
|
2
|
+
|
|
3
|
+
## Ti.UI.Window
|
|
4
|
+
> The Window is an empty drawing surface or container.
|
|
5
|
+
> Extends Ti.UI.View
|
|
6
|
+
> Platforms: both
|
|
7
|
+
|
|
8
|
+
To create a window, use the <Titanium.UI.createWindow> method or a **`<Window>`** Alloy element.
|
|
9
|
+
|
|
10
|
+
A window is a top-level container which can contain other views. Windows can
|
|
11
|
+
be *opened* and *closed*. Opening a window causes the window and its child
|
|
12
|
+
views to be added to the application's render stack, on top of any previously opened
|
|
13
|
+
windows. Closing a window removes the window and its children from the render stack.
|
|
14
|
+
|
|
15
|
+
Windows *contain* other views, but in general they are not *contained* inside
|
|
16
|
+
other views. There are a few specialized views that manage windows:
|
|
17
|
+
|
|
18
|
+
* [NavigationWindow](Titanium.UI.NavigationWindow)
|
|
19
|
+
* [SplitWindow](Titanium.UI.iOS.SplitWindow)
|
|
20
|
+
* [TabGroup](Titanium.UI.TabGroup)
|
|
21
|
+
* [Tab](Titanium.UI.Tab)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
*(See full overview in titanium-docs)*
|
|
25
|
+
|
|
26
|
+
### Properties (unique: 72/138)
|
|
27
|
+
| Property | Type | Default | Platform | Description |
|
|
28
|
+
|----------|------|---------|----------|-------------|
|
|
29
|
+
| backgroundColor | String \| Ti.UI.Color | Transparent | both | Background color of the window, as a color name or hex triplet. |
|
|
30
|
+
| bottom | Number \| String | 0 | both | Window's bottom position, in platform-specific units. |
|
|
31
|
+
| left | Number \| String | 0 | both | Window's left position, in platform-specific units. |
|
|
32
|
+
| opacity | Number | — | both | The opacity from 0.0-1.0. |
|
|
33
|
+
| right | Number \| String | 0 | both | Window's right position, in platform-specific units. |
|
|
34
|
+
| top | Number \| String | 0 | both | Window's top position, in platform-specific units. |
|
|
35
|
+
| activity | Ti.Android.Activity | — | android | Contains a reference to the Android Activity object associated with this window. |
|
|
36
|
+
| backButtonTitle | String | — | ios | Title for the back button. This is only valid when the window is a child of a t… |
|
|
37
|
+
| backButtonTitleImage | String \| Ti.Blob | — | ios | The image to show as the back button. This is only valid when the window is a c… |
|
|
38
|
+
| barColor | String \| Ti.UI.Color | — | both | Background color for the nav bar, as a color name or hex triplet. |
|
|
39
|
+
| barImage | String | — | ios | Background image for the nav bar, specified as a URL to a local image. |
|
|
40
|
+
| closed | Boolean | true | both | Determines whether this Window is closed. |
|
|
41
|
+
| exitOnClose | Boolean | true if this is the first window launched else false; prior to Release 3.3.0, the default was always false. | android | Boolean value indicating if the application should exit when the Android Back b… |
|
|
42
|
+
| extendEdges | Array<Number> | — | ios | An array of supported values specified using the EXTEND_EDGE constants in <Tita… |
|
|
43
|
+
| flagSecure | Boolean | false | android | Treat the content of the window as secure, preventing it from appearing in scre… |
|
|
44
|
+
| focused | Boolean | false | both | Determines whether this TextArea has focus. |
|
|
45
|
+
| includeOpaqueBars | Boolean | — | ios | Specifies if the edges should extend beyond opaque bars (navigation bar, tab ba… |
|
|
46
|
+
| autoAdjustScrollViewInsets | Boolean | — | ios | Specifies whether or not the view controller should automatically adjust its sc… |
|
|
47
|
+
| extendSafeArea | Boolean | `false` on Android, `true` on iOS. | both | Specifies whether the screen insets/notches are allowed to overlap the window's… |
|
|
48
|
+
| fullscreen | Boolean | false | both | Boolean value indicating if the window is fullscreen. |
|
|
49
|
+
| homeIndicatorAutoHidden | Boolean | false | ios | Boolean value indicating whether the system is allowed to hide the visual indic… |
|
|
50
|
+
| hideShadow | Boolean | false | ios | Set this to true to hide the shadow image of the navigation bar. |
|
|
51
|
+
| hidesBarsOnSwipe | Boolean | false | ios | Set this to true to hide the navigation bar on swipe. |
|
|
52
|
+
| hidesBarsOnTap | Boolean | false | ios | Set this to true to hide the navigation bar on tap. |
|
|
53
|
+
| hidesBarsWhenKeyboardAppears | Boolean | false | ios | Set this to true to hide the navigation bar when the keyboard appears. |
|
|
54
|
+
| hidesBackButton | Boolean | false | both | Set this to true to hide the back button of navigation bar. |
|
|
55
|
+
| largeTitleEnabled | Boolean | false | ios | A Boolean value indicating whether the title should be displayed in a large for… |
|
|
56
|
+
| hidesSearchBarWhenScrolling | Boolean | true | ios | A Boolean value indicating whether the integrated search bar is hidden when scr… |
|
|
57
|
+
| largeTitleDisplayMode | Number | Titanium.UI.iOS.LARGE_TITLE_DISPLAY_MODE_AUTOMATIC | ios | The mode to use when displaying the title of the navigation bar. |
|
|
58
|
+
| leftNavButton | Ti.UI.View | — | ios | View to show in the left nav bar area. |
|
|
59
|
+
| leftNavButtons | Array<Titanium.UI.View> | — | ios | An Array of views to show in the left nav bar area. |
|
|
60
|
+
| modal | Boolean | false | both | Indicates to open a modal window or not. |
|
|
61
|
+
| navBarHidden | Boolean | false | both | Hides the navigation bar (`true`) or shows the navigation bar (`false`). |
|
|
62
|
+
| navTintColor | String \| Ti.UI.Color | — | ios | The tintColor to apply to the navigation bar. |
|
|
63
|
+
| navigationWindow | Ti.UI.NavigationWindow | — | ios | The <Titanium.UI.NavigationWindow> instance hosting this window. |
|
|
64
|
+
| onBack | Callback<void> | — | android | Callback function that overrides the default behavior when the user presses the… |
|
|
65
|
+
| orientationModes | Array<Number> | empty array | both | Array of supported orientation modes, specified using the orientation constants… |
|
|
66
|
+
| orientation | Number | — | both | Current orientation of the window. |
|
|
67
|
+
| rightNavButton | Ti.UI.View | — | ios | View to show in the right nav bar area. |
|
|
68
|
+
| rightNavButtons | Array<Titanium.UI.View> | — | ios | An Array of views to show in the right nav bar area. |
|
|
69
|
+
| safeAreaPadding | Padding | — | both | The padding needed to safely display content without it being overlapped by the… |
|
|
70
|
+
| shadowImage | String | — | ios | Shadow image for the navigation bar, specified as a URL to a local image.. |
|
|
71
|
+
| splitActionBar | Boolean | — | android | Boolean value to enable split action bar. |
|
|
72
|
+
| statusBarStyle | Number | — | ios | The status bar style associated with this window. |
|
|
73
|
+
| statusBarColor | Number | — | android | The color of the status bar (top bar) for this window. |
|
|
74
|
+
| navBarColor | Number | — | android | The color of the navigation bar (bottom bar) for this window. |
|
|
75
|
+
| sustainedPerformanceMode | Boolean | — | android | Maintain a sustainable level of performance. |
|
|
76
|
+
| swipeToClose | Boolean | true | ios | Boolean value indicating if the user should be able to close a window using a s… |
|
|
77
|
+
| tabBarHidden | Boolean | — | ios | Boolean value indicating if the tab bar should be hidden. |
|
|
78
|
+
| theme | String | — | android | Name of the theme to apply to the window. |
|
|
79
|
+
| title | String | — | both | Title of the window. |
|
|
80
|
+
| titleAttributes | titleAttributesParams | — | both | Title text attributes of the window. |
|
|
81
|
+
| titleControl | Ti.UI.View | — | ios | View to show in the title area of the nav bar. |
|
|
82
|
+
| titleImage | String | — | ios | Image to show in the title area of the nav bar, specified as a local file path … |
|
|
83
|
+
| titlePrompt | String | — | ios | Title prompt for the window. |
|
|
84
|
+
| titleid | String | — | both | Key identifying a string from the locale file to use for the window title. |
|
|
85
|
+
| titlepromptid | String | — | ios | Key identifying a string from the locale file to use for the window title promp… |
|
|
86
|
+
| toolbar | Array<Titanium.UI.View> | — | ios | Array of button objects to show in the window's toolbar. |
|
|
87
|
+
| transitionAnimation | Ti.Proxy | — | ios | Use a transition animation when opening or closing windows in a <Titanium.UI.Na… |
|
|
88
|
+
| translucent | Boolean | true on iOS 7 and above, false otherwise. | ios | Boolean value indicating if the nav bar is translucent. |
|
|
89
|
+
| windowFlags | Number | — | android | Additional flags to set on the Activity Window. |
|
|
90
|
+
| uiFlags | Number | — | android | Additional UI flags to set on the Activity Window. |
|
|
91
|
+
| windowSoftInputMode | Number | — | android | Determines whether a window's soft input area (ie software keyboard) is visible… |
|
|
92
|
+
| windowPixelFormat | Number | — | android | Set the pixel format for the Activity's Window. |
|
|
93
|
+
| activityExitTransition | Number | If not specified uses platform theme transition. | android | The type of transition used when activity is exiting. |
|
|
94
|
+
| activityEnterTransition | Number | If not specified uses platform theme transition. | android | The type of transition used when activity is entering. |
|
|
95
|
+
| activityReturnTransition | Number | If not specified uses `activityEnterTransition`. | android | The type of transition used when returning from a previously started activity. |
|
|
96
|
+
| activityReenterTransition | Number | If not specified uses `activityExitTransition`. | android | The type of transition used when reentering to a previously started activity. |
|
|
97
|
+
| activitySharedElementExitTransition | Number | Defaults to Android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition. | android | The type of exit transition used when animating shared elements between two act… |
|
|
98
|
+
| activitySharedElementEnterTransition | Number | Defaults to Android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition. | android | The type of enter transition used when animating shared elements between two ac… |
|
|
99
|
+
| activitySharedElementReturnTransition | Number | Defaults to Android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition. | android | The type of return transition used when animating shared elements between two a… |
|
|
100
|
+
| activitySharedElementReenterTransition | Number | Defaults to Android platform's [move](https://github.com/android/platform_frameworks_base/blob/lollipop-release/core/res/res/transition/move.xml) transition. | android | The type of reenter transition used when animating shared elements between two … |
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Methods (11)
|
|
104
|
+
| Method | Returns | Platform | Description |
|
|
105
|
+
|--------|---------|----------|-------------|
|
|
106
|
+
| addSharedElement(view, transitionName) | void | android | Adds a common UI element to participate in window transition animation. |
|
|
107
|
+
| close(params) | Promise<any> | both | Closes the window. |
|
|
108
|
+
| hideNavBar(options) | void | ios | Hides the navigation bar. |
|
|
109
|
+
| hideTabBar(—) | void | ios | Hides the tab bar. Must be called before opening the window. |
|
|
110
|
+
| open(params) | Promise<any> | both | Opens the window. |
|
|
111
|
+
| removeAllSharedElements(—) | void | android | Clears all added shared elements. |
|
|
112
|
+
| setToolbar(items, params) | void | ios | Sets the array of items to show in the window's toolbar. |
|
|
113
|
+
| showNavBar(options) | void | ios | Makes the navigation bar visible. |
|
|
114
|
+
| showTabBar(—) | void | ios | Shows the tab bar. Must be called before opening the window. |
|
|
115
|
+
| showToolbar(options) | void | ios | Makes the bottom toolbar visible. |
|
|
116
|
+
| hideToolbar(options) | void | ios | Makes the bottom toolbar invisible. |
|
|
117
|
+
|
|
118
|
+
### Events (10)
|
|
119
|
+
| Event | Platform | Description |
|
|
120
|
+
|-------|----------|-------------|
|
|
121
|
+
| focus | both | Fired when the window gains focus. |
|
|
122
|
+
| androidback | android | Fired when the back button is pressed by the user. |
|
|
123
|
+
| androidcamera | android | Fired when the Camera button is released. |
|
|
124
|
+
| androidfocus | android | Fired when the Camera button is half-pressed then released. |
|
|
125
|
+
| androidsearch | android | Fired when the Search button is released. |
|
|
126
|
+
| androidvoldown | android | Fired when the volume down button is released. |
|
|
127
|
+
| androidvolup | android | Fired when the volume up button is released. |
|
|
128
|
+
| blur | both | Fired when the window loses focus. |
|
|
129
|
+
| close | both | Fired when the window is closed. |
|
|
130
|
+
| open | both | Fired when the window is opened. |
|
|
131
|
+
|
|
132
|
+
### Community-Discovered Patterns
|
|
133
|
+
|
|
134
|
+
#### Large title with ScrollView
|
|
135
|
+
|
|
136
|
+
When using `largeTitleEnabled` with a ScrollView inside NavigationWindow, three properties must be configured together on the Window:
|
|
137
|
+
|
|
138
|
+
| Property | Required Value | Role |
|
|
139
|
+
|----------|----------------|------|
|
|
140
|
+
| `largeTitleEnabled` | `true` | Displays title in large format, collapses on scroll |
|
|
141
|
+
| `extendEdges` | `[Ti.UI.EXTEND_EDGE_ALL]` | Content extends behind bars (blur/translucent effect) |
|
|
142
|
+
| `autoAdjustScrollViewInsets` | `true` | Adjusts ScrollView insets to prevent content overlap |
|
|
143
|
+
|
|
144
|
+
**Without `autoAdjustScrollViewInsets`**, setting `extendEdges` causes ScrollView content to render behind the navigation bar. **Without `extendEdges`**, the large title renders with a visible delay (empty nav bar gap, then title draws).
|
|
145
|
+
|
|
146
|
+
Use `largeTitleDisplayMode` to control collapse behavior:
|
|
147
|
+
- `Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_AUTOMATIC` (default) — inherits from previous window in the navigation stack; collapses on scroll
|
|
148
|
+
- `Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_ALWAYS` — title stays large
|
|
149
|
+
- `Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_NEVER` — always standard size
|
|
150
|
+
|
|
151
|
+
This applies to Windows inside both standalone NavigationWindow and TabGroup (which wraps each Tab in an implicit NavigationWindow on iOS).
|
|
152
|
+
|
|
153
|
+
### Related Types
|
|
154
|
+
|
|
155
|
+
#### AnimatedOptions
|
|
156
|
+
> A JavaScript object holding an `animated` property. Used for many UI methods as a means of specifying some transition should be animated.
|
|
157
|
+
|
|
158
|
+
| Property | Type | Description |
|
|
159
|
+
|----------|------|-------------|
|
|
160
|
+
| animated | Boolean | If `true`, animate a transition for the method/value change. Note that for most… |
|
|
161
|
+
|
|
162
|
+
#### Padding
|
|
163
|
+
> Dictionary object of parameters for the padding/insets applied to all kinds of views.
|
|
164
|
+
|
|
165
|
+
| Property | Type | Description |
|
|
166
|
+
|----------|------|-------------|
|
|
167
|
+
| left | Number | Left padding/inset |
|
|
168
|
+
| right | Number | Right padding/inset |
|
|
169
|
+
| top | Number | Top padding/inset |
|
|
170
|
+
| bottom | Number | Bottom padding/inset |
|
|
171
|
+
|
|
172
|
+
#### closeWindowParams
|
|
173
|
+
> Dictionary of options for the <Titanium.UI.Window.close> method.
|
|
174
|
+
|
|
175
|
+
| Property | Type | Description |
|
|
176
|
+
|----------|------|-------------|
|
|
177
|
+
| animated | Boolean | Determines whether to use an animated effect when the window is closed. Default… |
|
|
178
|
+
| animationDuration | Number | duration of the animation in milliseconds |
|
|
179
|
+
| animationStyle | Number | Transition type to use during a transition animation. |
|
|
180
|
+
| activityEnterAnimation | Number | Animation resource to use for the incoming activity. |
|
|
181
|
+
| activityExitAnimation | Number | Animation resource to use for the outgoing activity. |
|
|
182
|
+
|
|
183
|
+
*Plus 3 more types: windowToolbarParam*
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Ti.UI.NavigationWindow
|
|
188
|
+
> A `NavigationWindow` implements a specialized view that manages the navigation of hierarchical content.
|
|
189
|
+
> Extends Ti.UI.Window
|
|
190
|
+
> Platforms: both
|
|
191
|
+
|
|
192
|
+
You create a `NavigationWindow` with the <Titanium.UI.createNavigationWindow> factory method or
|
|
193
|
+
a `<NavigationWindow>` Alloy element.
|
|
194
|
+
|
|
195
|
+
All `NavigationWindow` objects must have at least one root window that cannot be removed. When
|
|
196
|
+
creating a `NavigationWindow` with the factory method, you must set its `window` property to the
|
|
197
|
+
root level window. Equivalently, in an Alloy application, insert a `<Window>` element as a child of the
|
|
198
|
+
`<NavigationWindow>` element. See examples below.
|
|
199
|
+
|
|
200
|
+
This object is not meant to be added to other windows. However, it can be used within a <Titanium.UI.iOS.SplitWindow>.
|
|
201
|
+
|
|
202
|
+
### Properties (unique: 2/119)
|
|
203
|
+
| Property | Type | Default | Platform | Description |
|
|
204
|
+
|----------|------|---------|----------|-------------|
|
|
205
|
+
| window | Ti.UI.Window | — | both | Window to add to this navigation window. |
|
|
206
|
+
| interactiveDismissModeEnabled | Boolean | false | ios | A boolean indicating whether or not child windows of this navigation window sho… |
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Methods (3)
|
|
210
|
+
| Method | Returns | Platform | Description |
|
|
211
|
+
|--------|---------|----------|-------------|
|
|
212
|
+
| closeWindow(window, options) | void | both | Closes a window and removes it from the navigation window. |
|
|
213
|
+
| openWindow(window, options) | void | both | Opens a window within the navigation window. |
|
|
214
|
+
| popToRootWindow(options) | void | both | Closes all windows that are currently opened inside the navigation window. |
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
### Related Types
|
|
218
|
+
|
|
219
|
+
#### AnimatedOptions
|
|
220
|
+
> A JavaScript object holding an `animated` property. Used for many UI methods as a means of specifying some transition should be animated.
|
|
221
|
+
|
|
222
|
+
| Property | Type | Description |
|
|
223
|
+
|----------|------|-------------|
|
|
224
|
+
| animated | Boolean | If `true`, animate a transition for the method/value change. Note that for most… |
|
|
225
|
+
|
|
226
|
+
#### Dictionary
|
|
227
|
+
> Plain JavaScript object.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Ti.UI.TabGroup
|
|
232
|
+
> A tabbed group of windows.
|
|
233
|
+
> Extends Ti.UI.Window
|
|
234
|
+
> Platforms: both
|
|
235
|
+
|
|
236
|
+
| Android | iOS |
|
|
237
|
+
| ------- | --- |
|
|
238
|
+
|  | |
|
|
239
|
+
|
|
240
|
+
A tab group can contain one or more [Tab](Titanium.UI.Tab) objects, each of which has an
|
|
241
|
+
associated tab control that is used to bring it into focus.
|
|
242
|
+
|
|
243
|
+
Use the <Titanium.UI.createTabGroup> method or **`<TabGroup>`** Alloy element to create a tab group
|
|
244
|
+
that, in turn, contains one or more `<Tab>` elements.
|
|
245
|
+
|
|
246
|
+
You can add tabs to the group using [addTab](Titanium.UI.TabGroup.addTab), and programmatically
|
|
247
|
+
switch to a specific tab using [setActiveTab](Titanium.UI.TabGroup.setActiveTab).
|
|
248
|
+
|
|
249
|
+
### Platform Implementation Notes
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
*(See full overview in titanium-docs)*
|
|
253
|
+
|
|
254
|
+
### Properties (unique: 43/136)
|
|
255
|
+
| Property | Type | Default | Platform | Description |
|
|
256
|
+
|----------|------|---------|----------|-------------|
|
|
257
|
+
| tintColor | String | — | both | The tintColor to apply to tabs. |
|
|
258
|
+
| activity | Ti.Android.Activity | — | android | Reference to the Android Activity object associated with this tab group. |
|
|
259
|
+
| barColor | String \| Ti.UI.Color | — | both | Default navigation bar color (typically for the **More** tab), as a color name … |
|
|
260
|
+
| exitOnClose | Boolean | True if tab group is opened on top of the root activity. False otherwise. | android | Boolean value indicating if the application should exit when closing the tab gr… |
|
|
261
|
+
| navTintColor | String \| Ti.UI.Color | — | ios | The tintColor to apply to the navigation bar (typically for the **More** tab). |
|
|
262
|
+
| shadowImage | String | — | ios | Image of the shadow placed between the tab group and the content area. |
|
|
263
|
+
| statusBarColor | Number | — | android | The color of the status bar (top bar) for this window. |
|
|
264
|
+
| title | String | — | android | Title for this tabGroup. |
|
|
265
|
+
| titleAttributes | titleAttributesParams | — | ios | Title text attributes of the window to be applied on the **More** tab. |
|
|
266
|
+
| translucent | Boolean | true on iOS 7 and above, false otherwise. | ios | Boolean value indicating if the nav bar (typically for the **More** tab), is tr… |
|
|
267
|
+
| windowSoftInputMode | Number | — | android | Determines how the tab group is treated when a soft input method (such as a vir… |
|
|
268
|
+
| activeTab | Number \| Ti.UI.Tab | — | both | Active tab. |
|
|
269
|
+
| allowUserCustomization | Boolean | true | ios | Allow the user to reorder tabs in the tab group using the **Edit** button on th… |
|
|
270
|
+
| autoTabTitle | Boolean | false | android | If set to `true` it will automatically set the actionbar title to the current t… |
|
|
271
|
+
| bottomAccessoryView | Ti.UI.View | — | ios | View shown as a bottom accessory attached to the tab group. |
|
|
272
|
+
| minimizeBehavior | Number | — | ios | Defines the minimize behavior for the tab group, if it is supported. |
|
|
273
|
+
| enabled | Number | true | both | Enables or disables the menu in a BottomNavigation. If disabled you can't chang… |
|
|
274
|
+
| paddingLeft | Number \| String | — | android | Left padding of bottom navigation |
|
|
275
|
+
| paddingRight | Number \| String | — | android | Right padding of bottom navigation |
|
|
276
|
+
| paddingBottom | Number \| String | — | android | Bottom padding of bottom navigation |
|
|
277
|
+
| titleColor | String \| Ti.UI.Color | — | both | Defines the color of the title of tab when it's inactive. |
|
|
278
|
+
| activeTitleColor | String \| Ti.UI.Color | — | both | Defines the color of the title of tab when it's active. |
|
|
279
|
+
| editButtonTitle | String | — | ios | Title for the edit button on the **More** tab. |
|
|
280
|
+
| forceBottomPosition | Boolean | false | ios | Force tab bar to bottom position. |
|
|
281
|
+
| swipeable | Boolean | true | android | Boolean value indicating if tab navigation can be done by swipes, in addition t… |
|
|
282
|
+
| smoothScrollOnTabClick | Boolean | true | android | Boolean value indicating if changing pages by tab clicks is animated. |
|
|
283
|
+
| tabs | Array<Titanium.UI.Tab> | — | both | Tabs managed by the tab group. |
|
|
284
|
+
| shiftMode | Number | 1 | android | Determines whether the [TABS_STYLE_BOTTOM_NAVIGATION](Titanium.UI.Android.TABS_… |
|
|
285
|
+
| style | Number | — | android | Property defining which style for the TabGroup to be used. |
|
|
286
|
+
| tabsBackgroundColor | String \| Ti.UI.Color | — | both | Default background color for inactive tabs, as a color name or hex triplet. |
|
|
287
|
+
| tabMode | Number | — | android | Property defining which tabMode is used for the TabGroup. |
|
|
288
|
+
| tabsTintColor | String \| Ti.UI.Color | — | ios | The tintColor to apply to the tabs. |
|
|
289
|
+
| tabsTranslucent | Boolean | true | ios | A Boolean value that indicates whether the tab group is translucent. |
|
|
290
|
+
| flags | Number | — | android | Additional flags to set on the TabGroup. |
|
|
291
|
+
| activeTintColor | String | — | both | The activeTintColor to apply to tabs. |
|
|
292
|
+
| tabsBackgroundImage | String | — | ios | Default background image for tabs. |
|
|
293
|
+
| unselectedItemTintColor | String \| Ti.UI.Color | — | ios | Unselected items in this tab group will be tinted with this color. Setting this… |
|
|
294
|
+
| activeTabIconTint | String \| Ti.UI.Color | — | ios | Color applied to active tabs icons, as a color name or hex triplet, where the t… |
|
|
295
|
+
| tabsBackgroundSelectedColor | String | — | android | Default background selected color for tabs, as a color name or hex triplet. |
|
|
296
|
+
| activeTabBackgroundImage | String | — | ios | Default background image for the active tab. |
|
|
297
|
+
| tabBarVisible | Boolean | true | both | Programmatically shows / hides the bottom tab group of the tab group. |
|
|
298
|
+
| interactiveDismissModeEnabled | Boolean | false | ios | A boolean indicating whether or not child windows of this tab group should have… |
|
|
299
|
+
| experimental | Boolean | false | android | Only used for a BottomNavigation setup. If set to `true` it will use an optimiz… |
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
### Methods (10)
|
|
303
|
+
| Method | Returns | Platform | Description |
|
|
304
|
+
|--------|---------|----------|-------------|
|
|
305
|
+
| close(params) | Promise<any> | both | Closes the tab group and removes it from the UI. |
|
|
306
|
+
| hideTabBar(—) | void | both | Hides the tab group with animation. |
|
|
307
|
+
| open(params) | Promise<any> | both | Opens the tab group and makes it visible. |
|
|
308
|
+
| showTabBar(—) | void | both | Shows the tab group with animation. |
|
|
309
|
+
| addTab(tab) | void | both | Adds a tab to the tab group. |
|
|
310
|
+
| disableTabNavigation(params) | void | android | Disable (or re-enable) tab navigation. If tab navigation is disabled, the tabs … |
|
|
311
|
+
| getActiveTab(—) | Ti.UI.Tab | both | Gets the currently-active tab. |
|
|
312
|
+
| removeTab(tab) | void | ios | Removes a tab from the tab group. |
|
|
313
|
+
| setActiveTab(indexOrObject) | void | both | Selects the currently active tab in a tab group. |
|
|
314
|
+
| getTabs(—) | Array<Titanium.UI.Tab> | both | Gets all tabs that are managed by the tab group. |
|
|
315
|
+
|
|
316
|
+
### Events (10)
|
|
317
|
+
| Event | Platform | Description |
|
|
318
|
+
|-------|----------|-------------|
|
|
319
|
+
| focus | both | Fired when this tab group gains focus. On Android, fired when a tab in this tab… |
|
|
320
|
+
| androidback | android | Fired when the back button is pressed by the user. |
|
|
321
|
+
| androidcamera | android | Fired when the Camera button is released. |
|
|
322
|
+
| androidfocus | android | Fired when the Camera button is half-pressed then released. |
|
|
323
|
+
| androidsearch | android | Fired when the Search button is released. |
|
|
324
|
+
| androidvoldown | android | Fired when the volume down button is released. |
|
|
325
|
+
| androidvolup | android | Fired when the volume up button is released. |
|
|
326
|
+
| blur | both | Fired when this tab group loses focus. On Android, fired when a tab in this tab… |
|
|
327
|
+
| close | both | Fired when the tab group is closed. |
|
|
328
|
+
| open | both | Fired when the tab group is opened. |
|
|
329
|
+
|
|
330
|
+
### Related Types
|
|
331
|
+
|
|
332
|
+
#### closeWindowParams
|
|
333
|
+
> Dictionary of options for the <Titanium.UI.Window.close> method.
|
|
334
|
+
|
|
335
|
+
| Property | Type | Description |
|
|
336
|
+
|----------|------|-------------|
|
|
337
|
+
| animated | Boolean | Determines whether to use an animated effect when the window is closed. Default… |
|
|
338
|
+
| animationDuration | Number | duration of the animation in milliseconds |
|
|
339
|
+
| animationStyle | Number | Transition type to use during a transition animation. |
|
|
340
|
+
| activityEnterAnimation | Number | Animation resource to use for the incoming activity. |
|
|
341
|
+
| activityExitAnimation | Number | Animation resource to use for the outgoing activity. |
|
|
342
|
+
|
|
343
|
+
#### disableTabOptions
|
|
344
|
+
> Dictionary of options for the <Titanium.UI.TabGroup.disableTabOptions> method.
|
|
345
|
+
|
|
346
|
+
| Property | Type | Description |
|
|
347
|
+
|----------|------|-------------|
|
|
348
|
+
| animated | Boolean | Determines whether to use an animated effect to hide/show the navigation bar. |
|
|
349
|
+
| enabled | Boolean | Show or hide the navigation bar. |
|
|
350
|
+
|
|
351
|
+
#### openWindowParams
|
|
352
|
+
> Dictionary of options for the <Titanium.UI.Window.open> method.
|
|
353
|
+
|
|
354
|
+
| Property | Type | Description |
|
|
355
|
+
|----------|------|-------------|
|
|
356
|
+
| animated | Boolean | Determines whether to use an animated effect when the window is shown. |
|
|
357
|
+
| bottom | Number \| String | Window's bottom position, in platform-specific units. |
|
|
358
|
+
| fullscreen | Boolean | Determines if the window is fullscreen. |
|
|
359
|
+
| height | Number \| String | Window's height, in platform-specific units. |
|
|
360
|
+
| left | Number \| String | Window's left position, in platform-specific units. |
|
|
361
|
+
| modal | Boolean | Determines whether to open the window modal in front of other windows. |
|
|
362
|
+
| forceModal | Boolean | Indicates whether the window enforces modal behaviour. |
|
|
363
|
+
| modalStyle | Number | Presentation style of this modal window. |
|
|
364
|
+
| modalTransitionStyle | Number | Transition style of this modal window. |
|
|
365
|
+
| navBarHidden | Boolean | For modal windows, hides the nav bar (`true`) or shows the nav bar (`false`). |
|
|
366
|
+
| right | Number \| String | Window's right position, in platform-specific units. |
|
|
367
|
+
| top | Number \| String | Window's top position, in platform-specific units. |
|
|
368
|
+
| transition | Number | Transition style of this non-modal window. |
|
|
369
|
+
| width | Number \| String | Window's width, in platform-specific units. |
|
|
370
|
+
| activityEnterAnimation | Number | Animation resource to run on the activity being opened. |
|
|
371
|
+
| activityExitAnimation | Number | Animation resource to run on the activity that is being put in background as a … |
|
|
372
|
+
|
|
373
|
+
*Plus 1 more types: *
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Ti.UI.Tab
|
|
378
|
+
> A tab instance for a [TabGroup](Titanium.UI.TabGroup).
|
|
379
|
+
> Extends Ti.UI.View
|
|
380
|
+
> Platforms: both
|
|
381
|
+
|
|
382
|
+
A `TabGroup` tab instance. Each tab includes a button and one or more windows, which
|
|
383
|
+
holds the "contents" of the tab. Users can select a tab by clicking on the tab button.
|
|
384
|
+
|
|
385
|
+
Use the <Titanium.UI.createTab> method or **`<Tab>`** Alloy element to create a tab.
|
|
386
|
+
|
|
387
|
+
Use [TabGroup.setActiveTab](Titanium.UI.TabGroup.setActiveTab) to switch between tabs
|
|
388
|
+
in a tab group.
|
|
389
|
+
|
|
390
|
+
The behavior of tabs and tab groups follows the platform's native navigation style,
|
|
391
|
+
which varies significantly between platforms.
|
|
392
|
+
|
|
393
|
+
### iOS Platform Implementation Notes
|
|
394
|
+
|
|
395
|
+
On iOS, the tab maintains a stack of windows. Windows on top
|
|
396
|
+
of the stack can partially or totally obscure windows lower in the stack. Calling
|
|
397
|
+
|
|
398
|
+
*(See full overview in titanium-docs)*
|
|
399
|
+
|
|
400
|
+
### Properties (unique: 20/57)
|
|
401
|
+
| Property | Type | Default | Platform | Description |
|
|
402
|
+
|----------|------|---------|----------|-------------|
|
|
403
|
+
| backgroundColor | String \| Ti.UI.Color | — | android | Sets the color of the tab when it is inactive. |
|
|
404
|
+
| backgroundFocusedColor | String | — | android | Sets the color of the tab when it is focused. |
|
|
405
|
+
| tintColor | String | — | both | Defines the color of the tab icon. |
|
|
406
|
+
| active | Boolean | — | ios | `true` if this tab is active, `false` if it is not. |
|
|
407
|
+
| activeIcon | String | — | ios | Icon URL for this tab when active. |
|
|
408
|
+
| badge | String | — | both | Badge value for this tab. `null` indicates no badge. |
|
|
409
|
+
| badgeColor | String \| Ti.UI.Color | — | both | If this item displays a badge, this color will be used for the badge's backgrou… |
|
|
410
|
+
| badgeBackgroundColor | String \| Ti.UI.Color | — | both | If this item displays a badge, this color will be used for the badge's backgrou… |
|
|
411
|
+
| badgeTextColor | String \| Ti.UI.Color | — | android | Set the text color of the badge. |
|
|
412
|
+
| icon | String | — | both | Icon URL for this tab. |
|
|
413
|
+
| iconFamily | String | — | android | Specifies the font family or specific font to use. |
|
|
414
|
+
| iconInsets | TabIconInsets | All insets are zero. | ios | The icon inset or outset for each edge. |
|
|
415
|
+
| iconIsMask | Boolean | true | ios | Defines if the icon property of the tab must be used as a mask. |
|
|
416
|
+
| activeIconIsMask | Boolean | true | ios | Defines if the active icon property of the tab must be used as a mask. |
|
|
417
|
+
| activeTintColor | String | — | both | Defines the color of the tab icon when it is active. |
|
|
418
|
+
| title | String | — | both | Title for this tab. |
|
|
419
|
+
| titleid | String | — | both | Key identifying a string from the locale file to use for the tab title. Only on… |
|
|
420
|
+
| titleColor | String \| Ti.UI.Color | — | both | Defines the color of the title of tab when it's inactive. |
|
|
421
|
+
| activeTitleColor | String \| Ti.UI.Color | — | both | Defines the color of the title of tab when it's active. |
|
|
422
|
+
| window | Ti.UI.Window | — | both | Root-level tab window. All tabs must have at least one root-level tab window. |
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
### Methods (4)
|
|
426
|
+
| Method | Returns | Platform | Description |
|
|
427
|
+
|--------|---------|----------|-------------|
|
|
428
|
+
| open(window, options) | void | both | Opens a new window. |
|
|
429
|
+
| close(window, options) | void | both | Closes the top-level window for this tab. |
|
|
430
|
+
| setWindow(window) | void | both | Sets the root window that appears in the tab. |
|
|
431
|
+
| popToRootWindow(options) | void | both | Closes all windows that are currently opened inside the tab. |
|
|
432
|
+
|
|
433
|
+
### Events (3)
|
|
434
|
+
| Event | Platform | Description |
|
|
435
|
+
|-------|----------|-------------|
|
|
436
|
+
| click | both | Fired when this tab is clicked in the tab group. |
|
|
437
|
+
| unselected | both | Fired when the tab is no longer selected. |
|
|
438
|
+
| selected | both | Fired when the tab is selected. |
|
|
439
|
+
|
|
440
|
+
### Related Types
|
|
441
|
+
|
|
442
|
+
#### AnimatedOptions
|
|
443
|
+
> A JavaScript object holding an `animated` property. Used for many UI methods as a means of specifying some transition should be animated.
|
|
444
|
+
|
|
445
|
+
| Property | Type | Description |
|
|
446
|
+
|----------|------|-------------|
|
|
447
|
+
| animated | Boolean | If `true`, animate a transition for the method/value change. Note that for most… |
|
|
448
|
+
|
|
449
|
+
#### TabIconInsets
|
|
450
|
+
> Dictionary to specify edge insets for <Titanium.UI.Tab.iconInsets>. Difference from typical <Padding> is that `right` and `bottom` are ignored and calculated internally from `top`/`left` values.
|
|
451
|
+
|
|
452
|
+
| Property | Type | Description |
|
|
453
|
+
|----------|------|-------------|
|
|
454
|
+
| left | Number | Left inset. |
|
|
455
|
+
| top | Number | Top inset. |
|
|
456
|
+
|
|
457
|
+
#### openWindowParams
|
|
458
|
+
> Dictionary of options for the <Titanium.UI.Window.open> method.
|
|
459
|
+
|
|
460
|
+
| Property | Type | Description |
|
|
461
|
+
|----------|------|-------------|
|
|
462
|
+
| animated | Boolean | Determines whether to use an animated effect when the window is shown. |
|
|
463
|
+
| bottom | Number \| String | Window's bottom position, in platform-specific units. |
|
|
464
|
+
| fullscreen | Boolean | Determines if the window is fullscreen. |
|
|
465
|
+
| height | Number \| String | Window's height, in platform-specific units. |
|
|
466
|
+
| left | Number \| String | Window's left position, in platform-specific units. |
|
|
467
|
+
| modal | Boolean | Determines whether to open the window modal in front of other windows. |
|
|
468
|
+
| forceModal | Boolean | Indicates whether the window enforces modal behaviour. |
|
|
469
|
+
| modalStyle | Number | Presentation style of this modal window. |
|
|
470
|
+
| modalTransitionStyle | Number | Transition style of this modal window. |
|
|
471
|
+
| navBarHidden | Boolean | For modal windows, hides the nav bar (`true`) or shows the nav bar (`false`). |
|
|
472
|
+
| right | Number \| String | Window's right position, in platform-specific units. |
|
|
473
|
+
| top | Number \| String | Window's top position, in platform-specific units. |
|
|
474
|
+
| transition | Number | Transition style of this non-modal window. |
|
|
475
|
+
| width | Number \| String | Window's width, in platform-specific units. |
|
|
476
|
+
| activityEnterAnimation | Number | Animation resource to run on the activity being opened. |
|
|
477
|
+
| activityExitAnimation | Number | Animation resource to run on the activity that is being put in background as a … |
|
|
478
|
+
|
|
479
|
+
---
|
|
480
|
+
|
|
481
|
+
## Ti.UI.AlertDialog
|
|
482
|
+
> An alert dialog is a modal view that includes an optional title, a message and buttons, positioned in the middle of the display.
|
|
483
|
+
> Extends Ti.UI.View
|
|
484
|
+
> Platforms: both
|
|
485
|
+
|
|
486
|
+
| Android | iOS |
|
|
487
|
+
| ------- | --- |
|
|
488
|
+
|  |  |
|
|
489
|
+
|
|
490
|
+
An alert dialog is created using <Titanium.UI.createAlertDialog> or **`<AlertDialog>`** Alloy element.
|
|
491
|
+
|
|
492
|
+
Although this dialog always appears in the middle of the display (not touching the edges),
|
|
493
|
+
other aspects of its aesthetics and the way the user interacts with it are different for each
|
|
494
|
+
platform, as described below.
|
|
495
|
+
|
|
496
|
+
### Android
|
|
497
|
+
|
|
498
|
+
On Android, the default alert dialog displays text information, via a title and message, without
|
|
499
|
+
any buttons. As the user can use the system hardware `back` button to dismiss it, a button is
|
|
500
|
+
optional.
|
|
501
|
+
|
|
502
|
+
*(See full overview in titanium-docs)*
|
|
503
|
+
|
|
504
|
+
### Properties (unique: 36/60)
|
|
505
|
+
| Property | Type | Default | Platform | Description |
|
|
506
|
+
|----------|------|---------|----------|-------------|
|
|
507
|
+
| tintColor | String \| Ti.UI.Color | — | ios | The tint-color of the dialog. |
|
|
508
|
+
| androidView | Ti.UI.View | — | android | View to load inside the message area, to create a custom layout. |
|
|
509
|
+
| buttonNames | Array<String> | No buttons (Android), Single "OK" button (iOS) | both | Name of each button to create. |
|
|
510
|
+
| cancel | Number | undefined (Android), -1 (iOS) | both | Index to define the cancel button. |
|
|
511
|
+
| buttonClickRequired | Boolean | false on Android | android | Setting this to true requires the end-user to click a dialog button to close th… |
|
|
512
|
+
| canceledOnTouchOutside | Boolean | true on Android | android | When this is set to `true`, the dialog is canceled when touched outside the win… |
|
|
513
|
+
| destructive | Number | -1 | ios | Index to define the destructive button. |
|
|
514
|
+
| hintText | String | — | ios | Hint text of the text field inside the dialog. |
|
|
515
|
+
| hinttextid | String | — | ios | Key identifying a string from the locale file to use for the [hintText](Titaniu… |
|
|
516
|
+
| keyboardType | Number | <Titanium.UI.KEYBOARD_TYPE_DEFAULT> | ios | Keyboard type to display when this text field inside the dialog is focused. |
|
|
517
|
+
| keyboardAppearance | Number | <Titanium.UI.KEYBOARD_APPEARANCE_DEFAULT> | ios | Keyboard appearance to be displayed when the text field inside the dialog is fo… |
|
|
518
|
+
| loginPlaceholder | String | — | ios | Placeholder of the login text field inside the dialog. |
|
|
519
|
+
| loginHintText | String | — | ios | Hint text of the login text field inside the dialog. |
|
|
520
|
+
| loginhinttextid | String | — | ios | Key identifying a string from the locale file to use for the [loginHintText](Ti… |
|
|
521
|
+
| loginReturnKeyType | Number | <Titanium.UI.RETURNKEY_NEXT> | both | Specifies the text to display on the keyboard `Return` key when this field is f… |
|
|
522
|
+
| loginValue | String | — | ios | Value of the login text field inside the dialog. |
|
|
523
|
+
| loginKeyboardType | Number | <Titanium.UI.KEYBOARD_DEFAULT> | both | Keyboard type to display when this text field inside the dialog is focused. |
|
|
524
|
+
| message | String | — | both | Dialog message. |
|
|
525
|
+
| messageid | String | — | both | Key identifying a string in the locale file to use for the message text. |
|
|
526
|
+
| ok | String | — | both | Text for the `OK` button. |
|
|
527
|
+
| okid | String | — | ios | Key identifying a string in the locale file to use for the `ok` text. |
|
|
528
|
+
| passwordPlaceholder | String | — | ios | Placeholder of the password text field inside the dialog. |
|
|
529
|
+
| passwordHintText | String | — | ios | Hint text of the password text field inside the dialog. |
|
|
530
|
+
| passwordhinttextid | String | — | ios | Key identifying a string from the locale file to use for the [passwordHintText]… |
|
|
531
|
+
| passwordReturnKeyType | Number | <Titanium.UI.RETURNKEY_DONE> | both | Specifies the text to display on the keyboard `Return` key when this field is f… |
|
|
532
|
+
| passwordValue | String | — | ios | Value of the password text field inside the dialog. |
|
|
533
|
+
| passwordKeyboardType | Number | <Titanium.UI.KEYBOARD_DEFAULT> | both | Keyboard type to display when this text field inside the dialog is focused. |
|
|
534
|
+
| placeholder | String | — | ios | Placeholder of the text field inside the dialog. |
|
|
535
|
+
| persistent | Boolean | false on iOS, true on Android | both | Boolean value indicating if the alert dialog should only be cancelled by user g… |
|
|
536
|
+
| preferred | Number | -1 | ios | Index to define the preferred button. |
|
|
537
|
+
| returnKeyType | Number | <Titanium.UI.RETURNKEY_DEFAULT> | ios | Specifies the text to display on the keyboard `Return` key when this field is f… |
|
|
538
|
+
| style | Number | <Titanium.UI.iOS.AlertDialogStyle.DEFAULT> | ios | The style for the alert dialog. |
|
|
539
|
+
| severity | Number | <Titanium.UI.iOS.ALERT_SEVERITY_DEFAULT> | ios | Indicates the severity of the alert in apps built with Mac Catalyst. |
|
|
540
|
+
| title | String | — | both | Title of the dialog. |
|
|
541
|
+
| titleid | String | — | both | Key identifying a string in the locale file to use for the title text. |
|
|
542
|
+
| value | String | — | ios | Value of the text field inside the dialog. |
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
### Methods (2)
|
|
546
|
+
| Method | Returns | Platform | Description |
|
|
547
|
+
|--------|---------|----------|-------------|
|
|
548
|
+
| hide(options) | void | both | Hides this dialog. |
|
|
549
|
+
| show(options) | void | both | Shows this dialog. |
|
|
550
|
+
|
|
551
|
+
### Events (1)
|
|
552
|
+
| Event | Platform | Description |
|
|
553
|
+
|-------|----------|-------------|
|
|
554
|
+
| click | both | Fired when a button in the dialog is clicked. |
|
|
555
|
+
|
|
556
|
+
### Related Types
|
|
557
|
+
|
|
558
|
+
#### AnimatedOptions
|
|
559
|
+
> A JavaScript object holding an `animated` property. Used for many UI methods as a means of specifying some transition should be animated.
|
|
560
|
+
|
|
561
|
+
| Property | Type | Description |
|
|
562
|
+
|----------|------|-------------|
|
|
563
|
+
| animated | Boolean | If `true`, animate a transition for the method/value change. Note that for most… |
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
## Ti.UI.OptionDialog
|
|
568
|
+
> An option dialog is a modal view that includes a message and one or more option items positioned in the middle of the display on Android and at the bottom edge on iOS. On Android, buttons may be added below the options.
|
|
569
|
+
> Extends Ti.UI.View
|
|
570
|
+
> Platforms: both
|
|
571
|
+
|
|
572
|
+
| Android | iPhone | iPad |
|
|
573
|
+
| ------- | ------ | ---- |
|
|
574
|
+
|  |  |  |
|
|
575
|
+
|
|
576
|
+
An option dialog is created using <Titanium.UI.createOptionDialog> or Alloy `<OptionDialog>`
|
|
577
|
+
element. See Examples below for usage.
|
|
578
|
+
|
|
579
|
+
This dialog is presented differently on each platform, as described below.
|
|
580
|
+
|
|
581
|
+
### Android
|
|
582
|
+
|
|
583
|
+
On Android, the dialog is shown in the middle of the display (not touching the edges),
|
|
584
|
+
with the option items represented in a picker. The previously-selected, or default, item can be
|
|
585
|
+
set on creation.
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
*(See full overview in titanium-docs)*
|
|
589
|
+
|
|
590
|
+
### Properties (unique: 10/35)
|
|
591
|
+
| Property | Type | Default | Platform | Description |
|
|
592
|
+
|----------|------|---------|----------|-------------|
|
|
593
|
+
| androidView | Ti.UI.View | — | android | View to load inside the message area, to create a custom layout. |
|
|
594
|
+
| buttonNames | Array<String> | — | android | List of button names. |
|
|
595
|
+
| cancel | Number | undefined (Android), -1 (iOS) | both | Index to define the cancel option. |
|
|
596
|
+
| destructive | Number | -1 | ios | Index to define the destructive option, indicated by a visual cue when rendered. |
|
|
597
|
+
| options | Array<String> | — | both | List of option names to display in the dialog. |
|
|
598
|
+
| opaquebackground | Boolean | false | ios | Boolean value indicating if the option dialog should have an opaque background. |
|
|
599
|
+
| persistent | Boolean | true | both | Boolean value indicating if the option dialog should only be cancelled by user … |
|
|
600
|
+
| selectedIndex | Number | — | android | Defines the default selected option. Since `8.1.0`, if not defined or -1 it wil… |
|
|
601
|
+
| title | String | — | both | Title of the dialog. |
|
|
602
|
+
| titleid | String | — | both | Key identifying a string in the locale file to use for the title text. |
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
### Methods (2)
|
|
606
|
+
| Method | Returns | Platform | Description |
|
|
607
|
+
|--------|---------|----------|-------------|
|
|
608
|
+
| hide(params) | void | both | Hides this dialog. |
|
|
609
|
+
| show(params) | void | both | Shows this dialog. |
|
|
610
|
+
|
|
611
|
+
### Events (1)
|
|
612
|
+
| Event | Platform | Description |
|
|
613
|
+
|-------|----------|-------------|
|
|
614
|
+
| click | both | Fired when an option of this dialog is clicked or, under certain circumstances,… |
|
|
615
|
+
|
|
616
|
+
### Related Types
|
|
617
|
+
|
|
618
|
+
#### hideParams
|
|
619
|
+
> Dictionary of options for the <Titanium.UI.OptionDialog.hide> method.
|
|
620
|
+
|
|
621
|
+
| Property | Type | Description |
|
|
622
|
+
|----------|------|-------------|
|
|
623
|
+
| animated | Boolean | Determines whether to animate the dialog as it is dismissed. |
|
|
624
|
+
|
|
625
|
+
#### showParams
|
|
626
|
+
> Dictionary of options for the <Titanium.UI.OptionDialog.show> method.
|
|
627
|
+
|
|
628
|
+
| Property | Type | Description |
|
|
629
|
+
|----------|------|-------------|
|
|
630
|
+
| title | String | String to be used as title for the dialog. |
|
|
631
|
+
| message | String | String to be used as a message for the dialog. |
|
|
632
|
+
| buttonNames | Array<String> | Array of String instances. |
|
|
633
|
+
| options | Array<String> | Array of String instances. |
|
|
634
|
+
| animated | Boolean | Determines whether to animate the dialog as it is shown. |
|
|
635
|
+
| view | Ti.UI.View | View to which to attach the dialog. |
|
|
636
|
+
| rect | Dimension | Positions the arrow of the option dialog relative to the attached view's dimens… |
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
640
|
+
## Ti.UI.Notification
|
|
641
|
+
> A toast notification.
|
|
642
|
+
> Extends Ti.Proxy
|
|
643
|
+
> Platforms: android
|
|
644
|
+
|
|
645
|
+
| Android | iOS |
|
|
646
|
+
| ------- | --- |
|
|
647
|
+
|  | |
|
|
648
|
+
|
|
649
|
+
A toast notification is an unobtrusive, pop-up notification that does not
|
|
650
|
+
block the UI. Use the <Titanium.UI.createNotification> method or **`<Notification>`** Alloy element
|
|
651
|
+
to create a Toast notification.
|
|
652
|
+
|
|
653
|
+
On Android, by default, a toast notification appears centered on the bottom half of the screen.
|
|
654
|
+
On Windows Phone, by default, a toast notification appears over the status bar on the top part
|
|
655
|
+
of the screen.
|
|
656
|
+
|
|
657
|
+
### Properties (unique: 7/10)
|
|
658
|
+
| Property | Type | Default | Platform | Description |
|
|
659
|
+
|----------|------|---------|----------|-------------|
|
|
660
|
+
| message | String | — | android | Notification text to display. |
|
|
661
|
+
| duration | Number | <Titanium.UI.NOTIFICATION_DURATION_SHORT> | android | Determines how long the notification stays on screen. |
|
|
662
|
+
| gravity | Number | — | android | Determines the location at which the notification should appear on the screen. |
|
|
663
|
+
| xOffset | Number | 0 | android | X offset from the default position, in pixels. |
|
|
664
|
+
| yOffset | Number | 0 | android | Y offset from the default position, in pixels. |
|
|
665
|
+
| horizontalMargin | Number | 0 | android | Horizontal placement of the notification, *as a fraction of the screen width*. |
|
|
666
|
+
| verticalMargin | Number | 0 | android | Vertical placement of the notification, *as a fraction of the screen height*. |
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
### Methods (1)
|
|
670
|
+
| Method | Returns | Platform | Description |
|
|
671
|
+
|--------|---------|----------|-------------|
|
|
672
|
+
| show(—) | void | android | Show the notification. |
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|