File tree Expand file tree Collapse file tree
e2e/ui-tests-app/app/button Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { Label } from "tns-core-modules/ui/label" ;
2+ import { EventData , TextBase } from "tns-core-modules/ui/text-base" ;
3+ import { Page } from "tns-core-modules/ui/page" ;
4+
5+ export function foxTap ( args : EventData ) {
6+ let page = < Page > ( < any > args . object ) . page ;
7+ let foxTapped = page . getViewById < Label > ( "foxTapped" ) ;
8+ foxTapped . visibility = "visible" ;
9+
10+ setTimeout ( ( ) => {
11+ foxTapped . visibility = "hidden" ;
12+ } , 1000 ) ;
13+
14+ console . log ( "foxTap" ) ;
15+ }
16+
17+ export function dogTap ( args : EventData ) {
18+ let page = < Page > ( < any > args . object ) . page ;
19+ let dogTapped = page . getViewById < Label > ( "dogTapped" ) ;
20+ dogTapped . visibility = "visible" ;
21+
22+ setTimeout ( ( ) => {
23+ dogTapped . visibility = "hidden" ;
24+ } , 1000 ) ;
25+
26+ console . log ( "dogTap" ) ;
27+ }
Original file line number Diff line number Diff line change 1+ <Page >
2+ <StackLayout style =" font-size: 50" >
3+ <Label automationText =" formattedText" id =" formattedText" textWrap =" true" style =" text-transform: capitalize;" >
4+ <Label .formattedText>
5+ <FormattedString >
6+ <FormattedString .spans>
7+ <Span text =" The quick brown " style =" font-weight: bold; color: green;" />
8+ <Span text =" fox" style =" font-weight: italic; color: green;" linkTap =" foxTap" />
9+ <Span text =" jumps over the lazy " style =" font-weight: bold; color: red;" />
10+ <Span text =" dog" style =" font-weight: bold; color: blue;" linkTap =" dogTap" />
11+ <Span text =" ." style =" font-weight: bold; color: green;" />
12+ </FormattedString .spans>
13+ </FormattedString >
14+ </Label .formattedText>
15+ </Label >
16+ <Label id =" foxTapped" text =" Fox tapped" visibility =" hidden" color =" green" />
17+ <Label id =" dogTapped" text =" Dog tapped" visibility =" hidden" color =" blue" />
18+ </StackLayout >
19+ </Page >
You can’t perform that action at this time.
0 commit comments