File tree 5 files changed +7
-5
lines changed
5 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
<Page xmlns =" http://schemas.nativescript.org/tns.xsd" loaded =" pageLoaded" class =" page"
2
2
xmlns : ui =" nativescript-block-ui" >
3
3
<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 >
5
6
</StackLayout >
6
7
</Page >
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ export class HelloWorldModel extends Observable {
12
12
13
13
public lock ( ) {
14
14
this . blockUI . lock ( ) ;
15
+ setTimeout ( ( ) => {
16
+ this . blockUI . unlock ( ) ;
17
+ } , 5000 ) ;
15
18
}
16
19
17
20
public unlock ( ) {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as application from "tns-core-modules/application";
3
3
4
4
declare const android : any ;
5
5
6
- export class BlockUi extends Common {
6
+ export class BlockUI extends Common {
7
7
public lock ( ) {
8
8
let activity = application . android . foregroundActivity ;
9
9
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as utils from "tns-core-modules/utils/utils";
3
3
4
4
declare const UIApplication ;
5
5
6
- export class BlockUi extends Common {
6
+ export class BlockUI extends Common {
7
7
public lock ( ) {
8
8
utils . ios
9
9
. getter ( UIApplication , UIApplication . sharedApplication )
Original file line number Diff line number Diff line change 1
1
import { Common } from "./block-ui.common" ;
2
2
export declare class BlockUI extends Common {
3
- // Block ui
4
3
public lock ( ) ;
5
- // Unlock ui
6
4
public unlock ( ) ;
7
5
}
You can’t perform that action at this time.
0 commit comments