Skip to content

Commit 0081f81

Browse files
authored
Merge pull request #283 from NativeScript/update-calendar-demo
chore: update 'calendar' demo for nativescript-ui-calendar v6.0.0
2 parents ee2673b + 27aca53 commit 0081f81

7 files changed

Lines changed: 22 additions & 20 deletions

File tree

calendar/app/App_Resources/Android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<activity
2929
android:name="com.tns.NativeScriptActivity"
3030
android:label="@string/title_activity_kimera"
31-
android:configChanges="keyboardHidden|orientation|screenSize"
31+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
3232
android:theme="@style/LaunchScreenTheme">
3333

3434
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />

calendar/app/App_Resources/Android/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
<!-- theme to use AFTER launch screen is loaded-->
2323
<style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
24+
<item name="android:forceDarkAllowed">true</item>
2425
<item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
2526

2627
<item name="colorPrimary">@color/ns_primary</item>

calendar/app/calendar/calendar-localization/calendar-localization.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from "@angular/core";
2-
import * as frameModule from "tns-core-modules/ui/frame";
2+
import { Frame } from "tns-core-modules/ui/frame";
33
import { RadCalendar } from "nativescript-ui-calendar";
44
import { Button } from "tns-core-modules/ui/button";
55

@@ -11,7 +11,7 @@ import { Button } from "tns-core-modules/ui/button";
1111
export class CalendarLocalizationComponent {
1212
constructor() { }
1313
public btnChangeLocaleTap(args) {
14-
let topFrame = frameModule.topmost();
14+
let topFrame = Frame.topmost();
1515
let calendar: RadCalendar = <RadCalendar>topFrame.getViewById('calendar');
1616
calendar.locale = (<Button>args.object).text;
1717
}

calendar/app/navigation/examples-list/examples-list.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, OnInit, OnDestroy } from "@angular/core";
22
import { ExampleItem } from "../exampleItem";
33
import { ExampleItemService } from "../exampleItemService.service";
4-
import * as frameModule from "tns-core-modules/ui/frame";
4+
import { Frame } from "tns-core-modules/ui/frame";
55
import { ActivatedRoute, Router } from '@angular/router';
66

77
@Component({
@@ -59,7 +59,7 @@ export class ExamplesListDepth1Component implements OnInit, OnDestroy {
5959
}
6060

6161
public onNavigationButtonTap() {
62-
frameModule.topmost().goBack();
62+
Frame.topmost().goBack();
6363
}
6464
}
6565

@@ -120,7 +120,7 @@ export class ExamplesListDepth2Component implements OnInit, OnDestroy {
120120
}
121121

122122
public onNavigationButtonTap() {
123-
frameModule.topmost().goBack();
123+
Frame.topmost().goBack();
124124
}
125125
}
126126

@@ -176,7 +176,7 @@ export class ExamplesListDepth3Component implements OnInit, OnDestroy {
176176
}
177177

178178
public onNavigationButtonTap() {
179-
frameModule.topmost().goBack();
179+
Frame.topmost().goBack();
180180
}
181181
}
182182

calendar/app/navigation/options/options.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, OnInit, OnDestroy, Injectable, ViewChild } from "@angular/core";
22
import { ObservableArray } from "tns-core-modules/data/observable-array";
33
import { ActivatedRoute } from '@angular/router';
4-
import * as frameModule from "tns-core-modules/ui/frame";
4+
import { Frame } from "tns-core-modules/ui/frame";
55
import { Page } from "tns-core-modules/ui/page";
66
import { OptionsService } from "../../navigation/options/options.service";
77

@@ -54,6 +54,6 @@ export class OptionsComponent implements OnInit, OnDestroy {
5454

5555
public onItemTap(args) {
5656
this._optionsService.paramValue = args.index;
57-
frameModule.topmost().goBack();
57+
Frame.topmost().goBack();
5858
}
5959
}

calendar/app/options-example-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as frameModule from "tns-core-modules/ui/frame";
1+
import { Frame } from "tns-core-modules/ui/frame";
22
import { Router } from '@angular/router';
33
import { Observable } from "tns-core-modules/data/observable";
44

@@ -14,6 +14,6 @@ export class OptionsExampleBase extends Observable {
1414
}
1515

1616
public onNavigationButtonTap() {
17-
frameModule.topmost().goBack();
17+
Frame.topmost().goBack();
1818
}
1919
}

calendar/package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"nativescript": {
77
"id": "org.nativescript.demoangular",
88
"tns-ios": {
9-
"version": "6.1.0"
9+
"version": "6.2.0"
1010
},
1111
"tns-android": {
12-
"version": "6.1.0"
12+
"version": "6.2.0"
1313
}
1414
},
1515
"dependencies": {
@@ -21,12 +21,12 @@
2121
"@angular/platform-browser": "~8.2.0",
2222
"@angular/platform-browser-dynamic": "~8.2.0",
2323
"@angular/router": "~8.2.0",
24-
"nativescript-angular": "~8.2.0",
24+
"nativescript-angular": "~8.20.0",
2525
"nativescript-theme-core": "~1.0.4",
2626
"nativescript-ui-calendar": "*",
2727
"reflect-metadata": "~0.1.10",
2828
"rxjs": "^6.4.0",
29-
"tns-core-modules": "^6.0.0",
29+
"tns-core-modules": "^6.2.0",
3030
"zone.js": "^0.9.1"
3131
},
3232
"devDependencies": {
@@ -35,21 +35,22 @@
3535
"@types/chai": "~4.1.3",
3636
"@types/mocha": "~5.2.1",
3737
"@types/node": "^7.0.5",
38+
"chai": "~4.2.0",
3839
"codelyzer": "^4.5.0",
3940
"filewalker": "0.1.3",
4041
"karma": "^1.6.0",
4142
"karma-chai": "^0.1.0",
4243
"karma-mocha": "^1.3.0",
4344
"karma-nativescript-launcher": "^0.4.0",
4445
"markdown-snippet-injector": "^0.2.4",
45-
"mocha": "^3.3.0",
46+
"mocha": "5.2.0",
4647
"mocha-junit-reporter": "^1.18.0",
47-
"mocha-multi": "1.1.0",
48+
"mocha-multi-reporters": "^1.1.0",
4849
"mochawesome": "^3.1.1",
4950
"nativescript-css-loader": "~0.26.0",
50-
"nativescript-dev-appium": "5.2.0",
51-
"nativescript-dev-webpack": "^1.0.0",
52-
"tns-platform-declarations": "^6.1.0",
51+
"nativescript-dev-appium": "^6.0.0",
52+
"nativescript-dev-webpack": "^1.3.0",
53+
"tns-platform-declarations": "^6.2.0",
5354
"tslint": "~5.11.0",
5455
"typescript": "~3.5.3"
5556
}

0 commit comments

Comments
 (0)