Skip to content

Commit 42b1225

Browse files
committed
fixed issues
1 parent 2ca3218 commit 42b1225

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

demo/app/main-page.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded" class="page"
22
xmlns:ui="nativescript-block-ui">
33
<StackLayout class="p-20">
4-
<Label text="{{ message }}" class="t-20 text-center c-black" textWrap="true"/>
4+
<Button text="LOCK" tap="{{ lock }}"></Button>
5+
<Button text="UNLOCK" tap="{{ unlock }}"></Button>
56
</StackLayout>
67
</Page>

demo/app/main-view-model.ts

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export class HelloWorldModel extends Observable {
1212

1313
public lock() {
1414
this.blockUI.lock();
15+
setTimeout(() => {
16+
this.blockUI.unlock();
17+
}, 5000);
1518
}
1619

1720
public unlock() {

src/block-ui.android.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as application from "tns-core-modules/application";
33

44
declare const android: any;
55

6-
export class BlockUi extends Common {
6+
export class BlockUI extends Common {
77
public lock() {
88
let activity = application.android.foregroundActivity;
99

src/block-ui.ios.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as utils from "tns-core-modules/utils/utils";
33

44
declare const UIApplication;
55

6-
export class BlockUi extends Common {
6+
export class BlockUI extends Common {
77
public lock() {
88
utils.ios
99
.getter(UIApplication, UIApplication.sharedApplication)

src/index.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { Common } from "./block-ui.common";
22
export declare class BlockUI extends Common {
3-
// Block ui
43
public lock();
5-
// Unlock ui
64
public unlock();
75
}

0 commit comments

Comments
 (0)