You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced-concepts.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ title: Advanced Concepts
6
6
7
7
## The Layout process
8
8
9
-
Getting views to render with the right dimensions and positions requires a run of the layout process. When rendering, a recursive process runs through every view in the **view hiearchy** in two passes — a measure pass and a layout pass.
9
+
Getting views to render with the right dimensions and positions requires a run of the layout process. When rendering, a recursive process runs through every view in the **view hierarchy** in two passes — a measure pass and a layout pass.
10
10
11
11
During **the measure pass** every view is measured to obtain its desired size. The following properties are considered during the measuring:
12
12
@@ -23,7 +23,7 @@ During **the layout pass** every view is placed in a specific layout slot. The s
23
23
The layout process is by nature an resource-intensive process and it's performance highly depends on the number views (and complexity).
24
24
25
25
:::tip
26
-
Try to keep the view hierachy as flat as possible by utilizing different [Layout Containers](/ui-and-styling#layout-containers) rather than relying on excessive view nesting.
26
+
Try to keep the view hierarchy as flat as possible by utilizing different [Layout Containers](/ui-and-styling#layout-containers) rather than relying on excessive view nesting.
27
27
28
28
**For example:** don't treat `<StackLayout>` as a `<div>`— instead try to use a `<GridLayout>` with specific `rows` and `columns` to achieve the same result:
29
29
@@ -42,7 +42,7 @@ Try to keep the view hierachy as flat as possible by utilizing different [Layout
42
42
<!---->
43
43
44
44
```html
45
-
<GridLayoutrows="auto, auto"colums="auto, auto">
45
+
<GridLayoutrows="auto, auto"columns="auto, auto">
46
46
<SomeItemrow="0"col="0" />
47
47
<SomeItemrow="0"col="1" />
48
48
<!-- ... row="1" ... -->
@@ -152,7 +152,7 @@ The source code of `application.android.ts` is bundled separately as `applicatio
152
152
The `bundle.js` and `vendor.js` files are not loaded early enough in the application launch. That's why the logic in `application.android.ts` is needed to be bundled separately in order to be loaded as early as needed in the application lifecycle.
153
153
154
154
::: warning Note
155
-
This approach will not work if aplication.android.ts requires external modules.
155
+
This approach will not work if application.android.ts requires external modules.
156
156
:::
157
157
158
158
### Extending Android Activity
@@ -658,7 +658,7 @@ iOS contains both an Objective-C standard library (the Foundation framework) and
658
658
659
659
#### Toll-free Bridging
660
660
661
-
Core Foundation has the concept of [Toll-free bridged types](https://developer.apple.com/library/ios/documentation/CoreFoundation/Conceptual/CFDesignConcepts/Articles/tollFreeBridgedTypes.html) - data types which can be used interchangably with their Objective-C counterparts. When dealing with a toll-free bridged type NativeScript always treats it as its Objective-C counterpart. Core Foundation objects on the [toll-free bridged types list](https://developer.apple.com/library/ios/documentation/CoreFoundation/Conceptual/CFDesignConcepts/Articles/tollFreeBridgedTypes.html#//apple_ref/doc/uid/TP40010677-SW4) are exposed as if they were instances of the equivalent Objective-C class. This means that a `CFDictionaryRef` value in JavaScript has the same methods on its prototype as if it were a `NSDictionary` object. Unlike regular Core Foundation objects, toll-free bridged types are automatically memory managed by NativeScript, so there is no need to retain or release them using `CFRetain` and `CFRelease`.
661
+
Core Foundation has the concept of [Toll-free bridged types](https://developer.apple.com/library/ios/documentation/CoreFoundation/Conceptual/CFDesignConcepts/Articles/tollFreeBridgedTypes.html) - data types which can be used interchangeably with their Objective-C counterparts. When dealing with a toll-free bridged type NativeScript always treats it as its Objective-C counterpart. Core Foundation objects on the [toll-free bridged types list](https://developer.apple.com/library/ios/documentation/CoreFoundation/Conceptual/CFDesignConcepts/Articles/tollFreeBridgedTypes.html#//apple_ref/doc/uid/TP40010677-SW4) are exposed as if they were instances of the equivalent Objective-C class. This means that a `CFDictionaryRef` value in JavaScript has the same methods on its prototype as if it were a `NSDictionary` object. Unlike regular Core Foundation objects, toll-free bridged types are automatically memory managed by NativeScript, so there is no need to retain or release them using `CFRetain` and `CFRelease`.
662
662
663
663
#### Null Values
664
664
@@ -2357,7 +2357,7 @@ After analyzing the filtering rules for a platform, {N} CLI builds final whiteli
2357
2357
- If it is `true`, the final whitelist is a concatenation of all plugins' usage lists with the app's whitelist
2358
2358
- Otherwise, it is equal to the app's whitelist
2359
2359
2360
-
These two lists unambigously determine how filtering is performed:
2360
+
These two lists unambiguously determine how filtering is performed:
2361
2361
2362
2362
1. If the whitelist is empty, then everything is considered whitelisted by default
2363
2363
2. If it contains at least one rule, only entities matching a rule are considered whitelisted
Copy file name to clipboardExpand all lines: best-practices/android-tips.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ On Android images inside the various drawable directories are used to serve the
10
10
11
11
Google provides a great resource to learn more about [supporting different pixel densities](https://developer.android.com/training/multiscreen/screendensities).
12
12
13
-
In our NativeScript project, you will have the `App_Resources/Android` directory. Everything in here will mirror a standard Android project. Inside the `App_Resources/Android/src/main` directory you shuld have a `res` directory which contains many `drawable-...` directories. This is where you should place images that have been resized for the different device displays. To read more on this topic you can read [the Android documentation for alternative bitmaps](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp).
13
+
In our NativeScript project, you will have the `App_Resources/Android` directory. Everything in here will mirror a standard Android project. Inside the `App_Resources/Android/src/main` directory you should have a `res` directory which contains many `drawable-...` directories. This is where you should place images that have been resized for the different device displays. To read more on this topic you can read [the Android documentation for alternative bitmaps](https://developer.android.com/training/multiscreen/screendensities#TaskProvideAltBmp).
14
14
15
15
There are many approaches to resizing your images for the different drawable folders. You could use Android Studio or other third party tools. For this example we will look at a tool specifically built to help NativeScript developers resize their images, [images.nativescript.rocks](https://images.nativescript.rocks/).
Copy file name to clipboardExpand all lines: best-practices/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ title: Best Practices
9
9
Over the years several distinct best practices have emerged when working with NativeScript and we'd like to outline a few here for you in hopes that you can enjoy NativeScripting as much as we do. More importantly though, that your end product gives you all the right _feels_ you expect.
10
10
11
11
We are providing a sample "vanilla" NativeScript app which shows some of the bad vs. good practices for you to run and see for yourself.
12
-
Using vanilla NativeScript is a great way to see the raw examples of why these are bad and good practices which are applicable to any frontend framework integration. Each framework integration effectively utilitizes these same practices for it's own various cases.
12
+
Using vanilla NativeScript is a great way to see the raw examples of why these are bad and good practices which are applicable to any frontend framework integration. Each framework integration effectively utilizes these same practices for it's own various cases.
13
13
14
14
Clone and see for yourself: https://github.com/NativeScript/examples-best-practices
Copy file name to clipboardExpand all lines: code-sharing/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,13 @@ Over the years, several lessons have emerged around scalability with JavaScript
20
20
21
21
4. A good code sharing approach should clearly identify deployment/distribution lines as well as distinct platform separation allowing various shared code segments to have clear designated deployment targets allowing teams to control their own sophisticated build pipelines as they desire. Further the shared code should live within a thoughtful organizational structure that supports the ability to scale and adapt to future needs aside from the deployment targets that use the shared code.
22
22
23
-
5. Within the specific scope of NativeScript's viewpoint, JavaScript is the universal langugage which provides the opportunity to share code effectively and responsibly. An approach that is based fundamentally on the strengths of JavaScript (and inherently TypeScript) is a good code sharing approach.
23
+
5. Within the specific scope of NativeScript's viewpoint, JavaScript is the universal language which provides the opportunity to share code effectively and responsibly. An approach that is based fundamentally on the strengths of JavaScript (and inherently TypeScript) is a good code sharing approach.
24
24
25
25
Notes:
26
26
27
27
Framework's are often "domain specific in nature". Programming languages are often the opposite or at least more broadly applicable to a wider set of domain problems. A good code sharing approach centers itself around the programming language and not the framework.
28
28
29
-
If a "code sharing solution" is maintained by a framework that can often mean there are inherent biases that interlock it's "sharable nature" with the framework, even if not intentional, it is somewhat inevitable. This breaks the first rule of a good code sharing approach.
29
+
If a "code sharing solution" is maintained by a framework that can often mean there are inherent biases that interlock it's "shareable nature" with the framework, even if not intentional, it is somewhat inevitable. This breaks the first rule of a good code sharing approach.
Copy file name to clipboardExpand all lines: interaction.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -701,7 +701,7 @@ NativeScript lets you animate the following properties:
701
701
702
702
:::tip Note
703
703
704
-
To use `translate` or `scale` you must preceed with an object declaring both x and y values, for example `translate: { x: 100, y: 250 }` or `scale: { x: 1.5, y: 0 }`.
704
+
To use `translate` or `scale` you must proceed with an object declaring both x and y values, for example `translate: { x: 100, y: 250 }` or `scale: { x: 1.5, y: 0 }`.
705
705
706
706
:::
707
707
@@ -1524,7 +1524,7 @@ export function showActionDialog() {
Copy file name to clipboardExpand all lines: native-api-access.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Now for a short walk through of one way to go about translating Java to JavaScri
51
51
52
52
3. The `getSystemService(java.lang.String)` method accepts a String. When programming in Android you can use `BATTERY_SERVICE` if the `import android.content.Context` is declared in the .java file. The compiler will know that `BATTERY_SERVICE` is the [static final string declared here](https://developer.android.com/reference/android/content/Context#BATTERY_SERVICE).
53
53
54
-
You could also write the `getSystemService("batterymanager")` using the statics constant value: "batterymanager". In your NativeScript code, you could do the same, but if you prefer to use the full namespace path to the static value, you can write it like the example does with `android.content.Context.BATTERY_SERVICE`.
54
+
You could also write the `getSystemService("batterymanager")` using the static constant value: "batterymanager". In your NativeScript code, you could do the same, but if you prefer to use the full namespace path to the static value, you can write it like the example does with `android.content.Context.BATTERY_SERVICE`.
55
55
56
56
4. Now we have an instance of the [Android BatteryManager](https://developer.android.com/reference/android/os/BatteryManager) which is what the [docs state as the return value](https://developer.android.com/reference/android/content/Context#BATTERY_SERVICE) for this system service.
Copy file name to clipboardExpand all lines: plugins/background-http.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The below attached code snippets demonstrate how to use `@nativescript/backgroun
15
15
16
16
### Uploading files
17
17
18
-
Sample code for configuring the upload session. Each session must have a unique `id`, but it can have multiple tasks running simultaneously. The `id` is passed as a parameter when creating the session (the `image-upload` string in the code bellow):
18
+
Sample code for configuring the upload session. Each session must have a unique `id`, but it can have multiple tasks running simultaneously. The `id` is passed as a parameter when creating the session (the `image-upload` string in the code below):
Copy file name to clipboardExpand all lines: plugins/datetimepicker.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ The `DateTimePickerFields` has a `date` property which can be used to get its cu
133
133
134
134
- Orientation
135
135
136
-
The `DateTimePickerFields` have an `orientation` property which allows changing the way the fields are laid out. If the orientation is `horizontal` (the default), the fields are on the same row, if the orienation is `vertical`, the fields will be on separate rows. Here's an example in the [demo](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo/app/home/home-page.xml#L160), [demo-angular](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo-angular/src/app/home/home.component.html#L155) and [demo-vue](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo-vue/app/components/Home.vue#L157) applications.
136
+
The `DateTimePickerFields` have an `orientation` property which allows changing the way the fields are laid out. If the orientation is `horizontal` (the default), the fields are on the same row, if the orientation is `vertical`, the fields will be on separate rows. Here's an example in the [demo](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo/app/home/home-page.xml#L160), [demo-angular](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo-angular/src/app/home/home.component.html#L155) and [demo-vue](https://github.com/NativeScript/nativescript-datetimepicker/blob/master/demo-vue/app/components/Home.vue#L157) applications.
0 commit comments