File tree Expand file tree Collapse file tree
apps/app/ui-tests-app/issues Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { EventData } from 'tns-core-modules/data/observable' ;
2+ import { Page } from 'tns-core-modules/ui/page' ;
3+ import { Button } from "tns-core-modules/ui/button" ;
4+ import { Label } from "tns-core-modules/ui/label" ;
5+ import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout" ;
6+ import { GridLayout } from "tns-core-modules/ui/layouts/grid-layout" ;
7+
8+ export function toggle ( args : EventData ) {
9+ const page = < Page > ( ( < any > args . object ) . page ) ;
10+
11+ const getElementById = id => { return page . getViewById ( id ) ; }
12+
13+ const toggleBtn = < Button > getElementById ( "toggleUserInteraction" ) ;
14+ const isEnabled = toggleBtn . text === "disable" ? true : false ;
15+ toggleBtn . text = ! isEnabled ? "disable" : "enable" ;
16+
17+ ( < Button > getElementById ( "testBtn" ) ) . isUserInteractionEnabled = ! isEnabled ;
18+ ( < Button > getElementById ( "testLabel" ) ) . isUserInteractionEnabled = ! isEnabled ;
19+ ( < StackLayout > getElementById ( "testStackLayout" ) ) . isUserInteractionEnabled = ! isEnabled ;
20+ }
21+
22+ export function test ( ) {
23+ console . log ( "onTap" ) ;
24+ alert ( "onTap" ) ;
25+ }
Original file line number Diff line number Diff line change 1+ <Page
2+ xmlns =" http://schemas.nativescript.org/tns.xsd" class =" page" >
3+ <StackLayout class =" p-20" >
4+ <Button text =" disable" tap =" toggle" id =" toggleUserInteraction" automationText =" toggleUserInteraction" />
5+ <GridLayout rows =" 100 50 100" id =" layoutid" >
6+ <Button id =" testBtn" automationText =" testBtn" row =" 0" isUserInteractionEnabled =" {{userinteraction}}" text =" test" tap =" test" />
7+ <Label id =" testLabel" automationText =" testLabel" row =" 1" text =" test" isUserInteractionEnabled =" {{userinteraction}}" tap =" test" />
8+ <StackLayout id =" testStackLayout" automationText =" testStackLayout" row =" 2" isUserInteractionEnabled =" {{userinteraction}}" backgroundColor =" red" tap =" test" ></StackLayout >
9+ </GridLayout >
10+ </StackLayout >
11+ </Page >
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export function loadExamples() {
2121 examples . set ( "3175" , "issues/issue-3175" ) ;
2222 examples . set ( "3211" , "issues/issue-3211" ) ;
2323 examples . set ( "1639" , "issues/issue-1639" ) ;
24+ examples . set ( "3714" , "issues/issue-3714" ) ;
2425 examples . set ( "1657-ios" , "issues/issue-1657-ios" ) ;
2526 examples . set ( "tabview-with-scrollview_4022" , "issues/tabview-with-scrollview_4022" ) ;
2627 examples . set ( "3354-ios" , "issues/issue-3354" ) ;
You can’t perform that action at this time.
0 commit comments