@maccesar/titools 2.2.4 → 2.2.8
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 +23 -23
- package/lib/commands/update.js +4 -12
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +31 -31
- package/skills/alloy-guides/references/CONCEPTS.md +3 -3
- package/skills/alloy-guides/references/CONTROLLERS.md +1 -1
- package/skills/alloy-guides/references/MODELS.md +6 -6
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +1 -1
- package/skills/alloy-guides/references/VIEWS_XML.md +1 -1
- package/skills/alloy-guides/references/WIDGETS.md +1 -1
- package/skills/alloy-howtos/SKILL.md +27 -27
- package/skills/alloy-howtos/references/best_practices.md +9 -9
- package/skills/alloy-howtos/references/cli_reference.md +14 -14
- package/skills/alloy-howtos/references/config_files.md +16 -16
- package/skills/alloy-howtos/references/custom_tags.md +16 -16
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +11 -15
- package/skills/alloy-howtos/references/samples.md +19 -19
- package/skills/purgetss/SKILL.md +11 -1
- package/skills/purgetss/references/animation-system.md +1 -1
- package/skills/purgetss/references/cli-commands.md +3 -3
- package/skills/purgetss/references/customization-deep-dive.md +1 -1
- package/skills/purgetss/references/dynamic-component-creation.md +1 -1
- package/skills/purgetss/references/icon-fonts.md +4 -0
- package/skills/purgetss/references/installation-setup.md +8 -1
- package/skills/purgetss/references/migration-guide.md +4 -0
- package/skills/purgetss/references/tikit-components.md +193 -204
- package/skills/purgetss/references/ui-ux-design.md +1 -1
- package/skills/ti-expert/SKILL.md +78 -118
- package/skills/ti-expert/references/alloy-builtins.md +18 -18
- package/skills/ti-expert/references/alloy-structure.md +21 -21
- package/skills/ti-expert/references/anti-patterns.md +15 -15
- package/skills/ti-expert/references/cli-expert.md +15 -15
- package/skills/ti-expert/references/code-conventions.md +38 -38
- package/skills/ti-expert/references/contracts.md +8 -8
- package/skills/ti-expert/references/controller-patterns.md +14 -14
- package/skills/ti-expert/references/error-handling.md +11 -11
- package/skills/ti-expert/references/examples.md +12 -12
- package/skills/ti-expert/references/migration-patterns.md +24 -24
- package/skills/ti-expert/references/patterns.md +10 -10
- package/skills/ti-expert/references/performance-listview.md +16 -16
- package/skills/ti-expert/references/performance-optimization.md +41 -41
- package/skills/ti-expert/references/security-device.md +22 -22
- package/skills/ti-expert/references/security-fundamentals.md +19 -19
- package/skills/ti-expert/references/state-management.md +33 -33
- package/skills/ti-expert/references/testing-e2e-ci.md +25 -25
- package/skills/ti-expert/references/testing-unit.md +24 -24
- package/skills/ti-expert/references/theming.md +15 -15
- package/skills/ti-guides/SKILL.md +58 -60
- package/skills/ti-guides/references/advanced-data-and-images.md +33 -33
- package/skills/ti-guides/references/android-manifest.md +15 -15
- package/skills/ti-guides/references/app-distribution.md +70 -166
- package/skills/ti-guides/references/application-frameworks.md +96 -114
- package/skills/ti-guides/references/cli-reference.md +294 -294
- package/skills/ti-guides/references/coding-best-practices.md +42 -33
- package/skills/ti-guides/references/commonjs-advanced.md +57 -51
- package/skills/ti-guides/references/hello-world.md +36 -36
- package/skills/ti-guides/references/hyperloop-native-access.md +66 -66
- package/skills/ti-guides/references/javascript-primer.md +83 -101
- package/skills/ti-guides/references/reserved-words.md +9 -9
- package/skills/ti-guides/references/resources.md +75 -83
- package/skills/ti-guides/references/style-and-conventions.md +35 -28
- package/skills/ti-guides/references/tiapp-config.md +110 -74
- package/skills/ti-howtos/SKILL.md +88 -92
- package/skills/ti-howtos/references/android-platform-deep-dives.md +104 -104
- package/skills/ti-howtos/references/automation-fastlane-appium.md +39 -39
- package/skills/ti-howtos/references/buffer-codec-streams.md +60 -60
- package/skills/ti-howtos/references/cross-platform-development.md +115 -136
- package/skills/ti-howtos/references/debugging-profiling.md +167 -181
- package/skills/ti-howtos/references/extending-titanium.md +121 -121
- package/skills/ti-howtos/references/google-maps-v2.md +84 -82
- package/skills/ti-howtos/references/ios-map-kit.md +65 -60
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +123 -123
- package/skills/ti-howtos/references/local-data-sources.md +79 -78
- package/skills/ti-howtos/references/location-and-maps.md +116 -120
- package/skills/ti-howtos/references/media-apis.md +87 -86
- package/skills/ti-howtos/references/notification-services.md +250 -260
- package/skills/ti-howtos/references/remote-data-sources.md +98 -93
- package/skills/ti-howtos/references/tutorials.md +226 -216
- package/skills/ti-howtos/references/using-modules.md +73 -102
- package/skills/ti-howtos/references/web-content-integration.md +101 -103
- package/skills/ti-howtos/references/webpack-build-pipeline.md +52 -44
- package/skills/ti-ui/SKILL.md +85 -85
- package/skills/ti-ui/references/accessibility-deep-dive.md +57 -57
- package/skills/ti-ui/references/animation-and-matrices.md +79 -79
- package/skills/ti-ui/references/application-structures.md +96 -99
- package/skills/ti-ui/references/custom-fonts-styling.md +99 -99
- package/skills/ti-ui/references/event-handling.md +58 -58
- package/skills/ti-ui/references/gestures.md +62 -64
- package/skills/ti-ui/references/icons-and-splash-screens.md +88 -88
- package/skills/ti-ui/references/layouts-and-positioning.md +87 -97
- package/skills/ti-ui/references/listviews-and-performance.md +107 -107
- package/skills/ti-ui/references/orientation.md +87 -88
- package/skills/ti-ui/references/platform-ui-android.md +87 -81
- package/skills/ti-ui/references/platform-ui-ios.md +63 -61
- package/skills/ti-ui/references/scrolling-views.md +29 -29
- package/skills/ti-ui/references/tableviews.md +56 -56
|
@@ -1,89 +1,79 @@
|
|
|
1
|
-
# Layouts,
|
|
1
|
+
# Layouts, positioning, and view hierarchy
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Critical: platform-specific properties require modifiers
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
**Using `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties WITHOUT modifiers will:**
|
|
5
|
+
Do not use `Ti.UI.iOS.*` or `Ti.UI.Android.*` properties without modifiers. It will break builds.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
2. **Add Android code to iOS builds** → compilation failures
|
|
10
|
-
3. **Create invalid cross-platform code**
|
|
11
|
-
|
|
12
|
-
**REAL EXAMPLE of the damage:**
|
|
7
|
+
Example of the problem:
|
|
13
8
|
```javascript
|
|
14
|
-
//
|
|
9
|
+
// WRONG - Adds Ti.UI.iOS to Android project
|
|
15
10
|
const win = Ti.UI.createWindow({
|
|
16
|
-
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT //
|
|
11
|
+
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT // Fails on Android
|
|
17
12
|
})
|
|
18
13
|
```
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
Correct approaches:
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
Option 1: TSS modifier (Alloy projects)
|
|
23
18
|
```tss
|
|
24
|
-
//
|
|
19
|
+
// CORRECT - Only adds to iOS
|
|
25
20
|
"#mainWindow[platform=ios]": {
|
|
26
21
|
statusBarStyle: Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
27
22
|
}
|
|
28
23
|
```
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
Option 2: conditional code
|
|
31
26
|
```javascript
|
|
32
27
|
if (OS_IOS) {
|
|
33
28
|
$.mainWindow.statusBarStyle = Ti.UI.iOS.StatusBar.LIGHT_CONTENT
|
|
34
29
|
}
|
|
35
30
|
```
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
Common platform-specific properties that require modifiers:
|
|
38
33
|
- iOS: `statusBarStyle`, `modalStyle`, `modalTransitionStyle`, any `Ti.UI.iOS.*`
|
|
39
34
|
- Android: `actionBar` config, any `Ti.Android.*` constant
|
|
40
|
-
:::
|
|
41
35
|
|
|
42
|
-
## 1. Units of
|
|
36
|
+
## 1. Units of measurement
|
|
43
37
|
|
|
44
|
-
### Available
|
|
38
|
+
### Available units
|
|
45
39
|
|
|
46
|
-
| Unit | Description | Platform
|
|
47
|
-
| ------------ | -------------------------- |
|
|
48
|
-
| `dp` / `dip` | Density-independent pixels |
|
|
49
|
-
| `px` | Absolute pixels | Use sparingly
|
|
50
|
-
| `%` | Percentage of parent size | Relative to parent
|
|
51
|
-
| `mm` | Millimeters | Absolute physical unit
|
|
52
|
-
| `cm` | Centimeters | Absolute physical unit
|
|
53
|
-
| `in` | Inches | Absolute physical unit
|
|
54
|
-
| `system` | Platform default | iOS = dip, Android = px (unless
|
|
40
|
+
| Unit | Description | Platform notes |
|
|
41
|
+
| ------------ | -------------------------- | ---------------------------------------- |
|
|
42
|
+
| `dp` / `dip` | Density-independent pixels | Recommended for cross-platform |
|
|
43
|
+
| `px` | Absolute pixels | Use sparingly, varies by density |
|
|
44
|
+
| `%` | Percentage of parent size | Relative to parent dimension |
|
|
45
|
+
| `mm` | Millimeters | Absolute physical unit |
|
|
46
|
+
| `cm` | Centimeters | Absolute physical unit |
|
|
47
|
+
| `in` | Inches | Absolute physical unit |
|
|
48
|
+
| `system` | Platform default | iOS = dip, Android = px (unless changed) |
|
|
55
49
|
|
|
56
|
-
### Density-
|
|
50
|
+
### Density-independent pixels (dp)
|
|
57
51
|
|
|
58
|
-
|
|
52
|
+
Android: `actual pixels = dip * (screen density) / 160`
|
|
59
53
|
- mdpi (160 dpi): 1dp = 1px
|
|
60
54
|
- hdpi (240 dpi): 1dp = 1.5px
|
|
61
55
|
- xhdpi (320 dpi): 1dp = 2px
|
|
62
56
|
- xxhdpi (480 dpi): 1dp = 3px
|
|
63
57
|
|
|
64
|
-
|
|
58
|
+
iOS: effectively `1dip = 1px` on non-retina, `1dip = 2px` on retina.
|
|
65
59
|
|
|
66
|
-
### Default
|
|
60
|
+
### Default units in tiapp.xml
|
|
67
61
|
|
|
68
|
-
You can set app-wide default units via
|
|
62
|
+
You can set app-wide default units via `ti.ui.defaultunit` in `tiapp.xml`:
|
|
69
63
|
|
|
70
64
|
```xml
|
|
71
65
|
<property name="ti.ui.defaultunit" type="string">dp</property>
|
|
72
66
|
```
|
|
73
67
|
|
|
74
|
-
When set, numeric values without explicit units (
|
|
68
|
+
When set, numeric values without explicit units (for example, `width: 100`) use this unit instead of the platform default.
|
|
75
69
|
|
|
76
|
-
### Platform
|
|
70
|
+
### Platform coordinate grid differences
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
> - **iOS** uses a density-independent grid (e.g., 320×480 dip for iPhone classic, 1024×768 for iPad). Values are always in dip.
|
|
80
|
-
> - **Android** uses a pixel-based grid by default (varies by device: HVGA 320×480px, WVGA800 480×800px, etc.).
|
|
81
|
-
>
|
|
82
|
-
> This is why setting `ti.ui.defaultunit` to `dp` is recommended for cross-platform consistency — it normalizes Android's behavior to match iOS's density-independent approach.
|
|
72
|
+
iOS uses a density-independent grid. Android uses a pixel-based grid by default. That is why setting `ti.ui.defaultunit` to `dp` is the safest cross-platform choice.
|
|
83
73
|
|
|
84
|
-
### Best
|
|
74
|
+
### Best practice
|
|
85
75
|
|
|
86
|
-
|
|
76
|
+
Use `dp` for consistent sizing across devices:
|
|
87
77
|
|
|
88
78
|
```javascript
|
|
89
79
|
// GOOD
|
|
@@ -99,9 +89,9 @@ const view = Ti.UI.createView({
|
|
|
99
89
|
});
|
|
100
90
|
```
|
|
101
91
|
|
|
102
|
-
## 2. Positioning
|
|
92
|
+
## 2. Positioning properties
|
|
103
93
|
|
|
104
|
-
### Edge-
|
|
94
|
+
### Edge-based positioning
|
|
105
95
|
|
|
106
96
|
Relative to parent edges:
|
|
107
97
|
|
|
@@ -114,7 +104,7 @@ const view = Ti.UI.createView({
|
|
|
114
104
|
});
|
|
115
105
|
```
|
|
116
106
|
|
|
117
|
-
### Center
|
|
107
|
+
### Center positioning
|
|
118
108
|
|
|
119
109
|
```javascript
|
|
120
110
|
const view = Ti.UI.createView({
|
|
@@ -122,7 +112,7 @@ const view = Ti.UI.createView({
|
|
|
122
112
|
});
|
|
123
113
|
```
|
|
124
114
|
|
|
125
|
-
### Dynamic
|
|
115
|
+
### Dynamic sizing
|
|
126
116
|
|
|
127
117
|
Omit a dimension to calculate dynamically:
|
|
128
118
|
|
|
@@ -135,9 +125,9 @@ const view = Ti.UI.createView({
|
|
|
135
125
|
});
|
|
136
126
|
```
|
|
137
127
|
|
|
138
|
-
## 3. Layout
|
|
128
|
+
## 3. Layout modes
|
|
139
129
|
|
|
140
|
-
### Composite (
|
|
130
|
+
### Composite (default)
|
|
141
131
|
|
|
142
132
|
Views stack on top of each other:
|
|
143
133
|
|
|
@@ -161,13 +151,13 @@ container.add(view2);
|
|
|
161
151
|
// view2 appears on top of view1
|
|
162
152
|
```
|
|
163
153
|
|
|
164
|
-
Stacking order controlled by:
|
|
154
|
+
Stacking order is controlled by:
|
|
165
155
|
- Addition order
|
|
166
|
-
- `zIndex`
|
|
156
|
+
- `zIndex` (higher is on top)
|
|
167
157
|
|
|
168
|
-
|
|
158
|
+
Android limitation: `zIndex` is only supported by composite layouts. It is ignored by horizontal and vertical layouts.
|
|
169
159
|
|
|
170
|
-
### Vertical
|
|
160
|
+
### Vertical layout
|
|
171
161
|
|
|
172
162
|
Children stack vertically:
|
|
173
163
|
|
|
@@ -193,12 +183,12 @@ container.add(label2);
|
|
|
193
183
|
// label2 appears below label1 with 10dp gap
|
|
194
184
|
```
|
|
195
185
|
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
- Children are
|
|
199
|
-
- Set `horizontalWrap: false` to prevent wrapping
|
|
186
|
+
Vertical layout rules:
|
|
187
|
+
- `top` is an offset from the previous sibling.
|
|
188
|
+
- Children are horizontally centered by default.
|
|
189
|
+
- Set `horizontalWrap: false` to prevent wrapping.
|
|
200
190
|
|
|
201
|
-
### Horizontal
|
|
191
|
+
### Horizontal layout
|
|
202
192
|
|
|
203
193
|
Children line up left to right:
|
|
204
194
|
|
|
@@ -225,12 +215,12 @@ container.add(view2);
|
|
|
225
215
|
// view2 appears to right of view1 with 10dp gap
|
|
226
216
|
```
|
|
227
217
|
|
|
228
|
-
|
|
229
|
-
-
|
|
230
|
-
- `horizontalWrap: true` (default)
|
|
231
|
-
- `horizontalWrap: false`
|
|
218
|
+
Horizontal layout rules:
|
|
219
|
+
- `left` is an offset from the previous sibling.
|
|
220
|
+
- `horizontalWrap: true` (default) moves to the next row if needed.
|
|
221
|
+
- `horizontalWrap: false` keeps items on one row and may overflow.
|
|
232
222
|
|
|
233
|
-
## 4. Auto-
|
|
223
|
+
## 4. Auto-size behaviors
|
|
234
224
|
|
|
235
225
|
### Ti.UI.SIZE
|
|
236
226
|
|
|
@@ -255,19 +245,19 @@ const view = Ti.UI.createView({
|
|
|
255
245
|
});
|
|
256
246
|
```
|
|
257
247
|
|
|
258
|
-
### Component
|
|
248
|
+
### Component defaults
|
|
259
249
|
|
|
260
|
-
| SIZE
|
|
261
|
-
|
|
|
250
|
+
| SIZE components | FILL components | Mixed |
|
|
251
|
+
| --------------- | --------------- | -------------------------------------- |
|
|
262
252
|
| Button | Window | TableViewRow (FILL width, SIZE height) |
|
|
263
253
|
| Label | View | Slider (FILL width, SIZE height) |
|
|
264
254
|
| ImageView | ScrollView | Toolbar (FILL width, SIZE height) |
|
|
265
255
|
| Switch | WebView | |
|
|
266
256
|
| TextField | ScrollableView | |
|
|
267
257
|
|
|
268
|
-
### ScrollView
|
|
258
|
+
### ScrollView auto-sizing
|
|
269
259
|
|
|
270
|
-
When a `ScrollView`
|
|
260
|
+
When a `ScrollView` has `contentWidth` or `contentHeight` set to `"auto"` or `Ti.UI.SIZE`, its content area grows based on the bottom and right offsets of its children:
|
|
271
261
|
|
|
272
262
|
```javascript
|
|
273
263
|
const scrollView = Ti.UI.createScrollView({
|
|
@@ -277,15 +267,15 @@ const scrollView = Ti.UI.createScrollView({
|
|
|
277
267
|
});
|
|
278
268
|
```
|
|
279
269
|
|
|
280
|
-
### Auto-
|
|
270
|
+
### Auto-size in layout modes
|
|
281
271
|
|
|
282
|
-
In
|
|
283
|
-
- `FILL` takes into account previously added siblings
|
|
284
|
-
- Example: First child `FILL`, second child `SIZE`
|
|
272
|
+
In vertical and horizontal layouts:
|
|
273
|
+
- `FILL` takes into account previously added siblings.
|
|
274
|
+
- Example: First child `FILL`, second child `SIZE` means the second gets remaining space.
|
|
285
275
|
|
|
286
|
-
## 5. Combining
|
|
276
|
+
## 5. Combining layouts
|
|
287
277
|
|
|
288
|
-
### Nested
|
|
278
|
+
### Nested layouts
|
|
289
279
|
|
|
290
280
|
```javascript
|
|
291
281
|
const outerContainer = Ti.UI.createView({
|
|
@@ -324,9 +314,9 @@ outerContainer.add(header);
|
|
|
324
314
|
outerContainer.add(content);
|
|
325
315
|
```
|
|
326
316
|
|
|
327
|
-
## 6. View
|
|
317
|
+
## 6. View hierarchy and zIndex
|
|
328
318
|
|
|
329
|
-
### Stacking
|
|
319
|
+
### Stacking order
|
|
330
320
|
|
|
331
321
|
Views added later appear on top:
|
|
332
322
|
|
|
@@ -346,9 +336,9 @@ win.add(view1);
|
|
|
346
336
|
win.add(view2); // view2 appears on top of view1
|
|
347
337
|
```
|
|
348
338
|
|
|
349
|
-
### The `size`
|
|
339
|
+
### The `size` property and `postlayout` event
|
|
350
340
|
|
|
351
|
-
The read-only `size` property
|
|
341
|
+
The read-only `size` property gives the width and height of a view after layout. It is accurate only after `postlayout` fires:
|
|
352
342
|
|
|
353
343
|
```javascript
|
|
354
344
|
const view = Ti.UI.createView({ width: '50%', height: Ti.UI.SIZE });
|
|
@@ -358,7 +348,7 @@ view.addEventListener('postlayout', () => {
|
|
|
358
348
|
});
|
|
359
349
|
```
|
|
360
350
|
|
|
361
|
-
### Explicit
|
|
351
|
+
### Explicit zIndex
|
|
362
352
|
|
|
363
353
|
```javascript
|
|
364
354
|
const view1 = Ti.UI.createView({
|
|
@@ -378,9 +368,9 @@ win.add(view2);
|
|
|
378
368
|
win.add(view1); // Still below view2 due to zIndex
|
|
379
369
|
```
|
|
380
370
|
|
|
381
|
-
## 7. Common
|
|
371
|
+
## 7. Common layout patterns
|
|
382
372
|
|
|
383
|
-
### Full-
|
|
373
|
+
### Full-screen overlay
|
|
384
374
|
|
|
385
375
|
```javascript
|
|
386
376
|
const overlay = Ti.UI.createView({
|
|
@@ -401,7 +391,7 @@ overlay.add(dialog);
|
|
|
401
391
|
win.add(overlay);
|
|
402
392
|
```
|
|
403
393
|
|
|
404
|
-
### Centered
|
|
394
|
+
### Centered content
|
|
405
395
|
|
|
406
396
|
```javascript
|
|
407
397
|
const container = Ti.UI.createView({
|
|
@@ -419,7 +409,7 @@ const centered = Ti.UI.createView({
|
|
|
419
409
|
container.add(centered);
|
|
420
410
|
```
|
|
421
411
|
|
|
422
|
-
### Bottom-
|
|
412
|
+
### Bottom-aligned content
|
|
423
413
|
|
|
424
414
|
```javascript
|
|
425
415
|
const footer = Ti.UI.createView({
|
|
@@ -429,7 +419,7 @@ const footer = Ti.UI.createView({
|
|
|
429
419
|
});
|
|
430
420
|
```
|
|
431
421
|
|
|
432
|
-
### Percentage-
|
|
422
|
+
### Percentage-based layout
|
|
433
423
|
|
|
434
424
|
```javascript
|
|
435
425
|
const leftPanel = Ti.UI.createView({
|
|
@@ -446,25 +436,25 @@ const rightPanel = Ti.UI.createView({
|
|
|
446
436
|
});
|
|
447
437
|
```
|
|
448
438
|
|
|
449
|
-
## 8. Platform
|
|
439
|
+
## 8. Platform considerations
|
|
450
440
|
|
|
451
|
-
### Android
|
|
441
|
+
### Android density-specific resources
|
|
452
442
|
|
|
453
443
|
Place resources in appropriate directories:
|
|
454
444
|
- `res-ldpi`, `res-mdpi`, `res-hdpi`, `res-xhdpi`, `res-xxhdpi`
|
|
455
445
|
|
|
456
|
-
### iOS
|
|
446
|
+
### iOS asset catalog
|
|
457
447
|
|
|
458
|
-
PNG
|
|
459
|
-
- `foo.png`
|
|
460
|
-
- `foo@2x.png`
|
|
461
|
-
- `foo@3x.png`
|
|
448
|
+
PNG or JPEG images with naming conventions:
|
|
449
|
+
- `foo.png` for non-retina
|
|
450
|
+
- `foo@2x.png` for retina
|
|
451
|
+
- `foo@3x.png` for iPhone Plus sizes
|
|
462
452
|
|
|
463
|
-
## Best
|
|
453
|
+
## Best practices
|
|
464
454
|
|
|
465
|
-
1.
|
|
466
|
-
2.
|
|
467
|
-
3.
|
|
468
|
-
4.
|
|
469
|
-
5.
|
|
470
|
-
6.
|
|
455
|
+
1. Use `dp` units for cross-platform consistency.
|
|
456
|
+
2. Prefer `Ti.UI.FILL` over percentages for containers.
|
|
457
|
+
3. Avoid `Ti.UI.SIZE` in ListViews for performance.
|
|
458
|
+
4. Use layout modes instead of manual positioning when possible.
|
|
459
|
+
5. Test on multiple devices with different screen sizes.
|
|
460
|
+
6. Use `zIndex` sparingly and rely on add order where possible.
|