-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from bradmartin/ns-7-update
Ns 7 update
- Loading branch information
Showing
67 changed files
with
15,262 additions
and
1,081 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Build CI | ||
|
||
# Trigger the workflow on push | ||
on: [push] | ||
|
||
jobs: | ||
job1: | ||
name: Android Builds | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Base Setup | ||
run: npm run ci.base.setup | ||
|
||
- name: Lint | ||
run: npm run ci.tslint | ||
|
||
- name: Build Vanilla Android Demo App | ||
run: npm run ci.vanilla.android.build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"semi": true | ||
"semi": true, | ||
"arrowParens": "avoid", | ||
"trailingComma": "none" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,31 +6,33 @@ NativeScript-Wear-OS is a NativeScript plugin that provides layouts and utilitie | |
</h4> | ||
|
||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/nativescript-gif"> | ||
<img src="https://github.com/bradmartin/nativescript-wear-os/workflows/Build%20CI/badge.svg" alt="Action Build"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/nativescript-wear-os"> | ||
<img src="https://img.shields.io/npm/v/nativescript-wear-os.svg" alt="npm"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/nativescript-wear-os"> | ||
<img src="https://img.shields.io/npm/dt/nativescript-wear-os.svg?label=npm%20downloads" alt="npm"> | ||
</a> | ||
<a href="https://github.com/bradmartin/nativescript-wear-os/stargazers"> | ||
<img src="https://img.shields.io/github/stars/bradmartin/nativescript-wear-os.svg" alt="stars"> | ||
</a> | ||
<a href="https://github.com/bradmartin/nativescript-wear-os/network"> | ||
<img src="https://img.shields.io/github/forks/bradmartin/nativescript-wear-os.svg" alt="forks"> | ||
</a> | ||
<a href="https://github.com/bradmartin/nativescript-wear-os/blob/master/LICENSE"> | ||
<img src="https://img.shields.io/github/license/bradmartin/nativescript-wear-os.svg" alt="license"> | ||
</a> | ||
</p> | ||
|
||
--- | ||
|
||
## Installation | ||
|
||
NativeScript Version 7+: | ||
|
||
```bash | ||
tns plugin add nativescript-wear-os | ||
``` | ||
|
||
NativeScript version prior to 7: | ||
|
||
```bash | ||
tns plugin add [email protected] | ||
``` | ||
|
||
--- | ||
|
||
### Ambient Mode Support | ||
|
@@ -56,9 +58,9 @@ tns plugin add nativescript-wear-os | |
```javascript | ||
// Add your custom Activities, Services and other Android app components here. | ||
const appComponents = [ | ||
'tns-core-modules/ui/frame', | ||
'tns-core-modules/ui/frame/activity', | ||
resolve(__dirname, 'app/ambient-activity') | ||
'@nativescript/core/ui/frame', | ||
'@nativescript/core/ui/frame/activity', | ||
resolve(__dirname, 'app/ambient-activity'), | ||
]; | ||
``` | ||
|
||
|
@@ -156,7 +158,7 @@ The plugin has a success dialog and failure/error dialog to present on WearOS. T | |
```typescript | ||
import { | ||
showFailure, | ||
showSuccess | ||
showSuccess, | ||
} from 'nativescript-wear-os/packages/dialogs'; | ||
|
||
showSuccess('Great choice! NativeScript is awesome.', 4).then(() => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import * as application from 'tns-core-modules/application'; | ||
application.run({ moduleName: 'app-root' }); | ||
import { Application } from '@nativescript/core'; | ||
Application.run({ moduleName: 'app-root' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
import * as observable from 'tns-core-modules/data/observable'; | ||
import * as pages from 'tns-core-modules/ui/page'; | ||
import { EventData, Page } from '@nativescript/core'; | ||
import { HelloWorldModel } from './main-view-model'; | ||
|
||
// Event handler for Page 'loaded' event attached in main-page.xml | ||
export function navigatingTo(args: observable.EventData) { | ||
export function navigatingTo(args: EventData) { | ||
// Get the event sender | ||
const page = <pages.Page>args.object; | ||
const page = <Page>args.object; | ||
page.actionBarHidden = true; | ||
page.bindingContext = new HelloWorldModel(page); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.