| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | </ActionBar> | |
| 9 | 9 | </Page.actionBar> | |
| 10 | 10 | <StackLayout> | |
| 11 | - <Button text="go to cleared page" tap="navigate"/> | ||
| 11 | + <Button text="go to cleared page" automationText="goToClearedPage" tap="navigate"/> | ||
| 12 | 12 | <Button text="undefined" tap="onChangeRenderingMode"/> | |
| 13 | 13 | </StackLayout> | |
| 14 | 14 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | </ActionBar> | |
| 9 | 9 | </Page.actionBar> | |
| 10 | 10 | <StackLayout> | |
| 11 | - <Button text="go to cleared page" tap="navigate"/> | ||
| 11 | + <Button text="go to cleared page" automationText="goToClearedPage" tap="navigate"/> | ||
| 12 | 12 | <Button text="undefined" tap="onChangeRenderingMode"/> | |
| 13 | 13 | </StackLayout> | |
| 14 | 14 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,6 +30,7 @@ export function loadExamples() { | |||
| 30 | 30 | examples.set("ng-repo-1599", "issues/issue-ng-repo-1599"); | |
| 31 | 31 | examples.set("ng-repo-1626", "issues/issue-ng-repo-1626"); | |
| 32 | 32 | examples.set("6439", "issues/issue-6439"); | |
| 33 | + examples.set("open-file-6895", "issues/open-file-6895") | ||
| 33 | 34 | ||
| 34 | 35 | return examples; | |
| 35 | 36 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,5 @@ | |||
| 1 | + <Page navigatingTo="navigatingTo"> | ||
| 2 | + <GridLayout id="root"> | ||
| 3 | + <Button text="Open File" automationText="openFile" tap="openFile" height="40"></Button> | ||
| 4 | + </GridLayout> | ||
| 5 | + </Page> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,19 +1,36 @@ | |||
| 1 | - export function onOuterWrapLayoutTap() { | ||
| 2 | - console.log("on outer wrap layout tap"); | ||
| 1 | + import { EventData, Page } from "tns-core-modules/ui/page/page"; | ||
| 2 | + import { Label } from "tns-core-modules/ui/label/label"; | ||
| 3 | + | ||
| 4 | + const setLabelTextAndLog = (args, text: string) => { | ||
| 5 | + const page = <Page>args.object.page; | ||
| 6 | + const label = <Label>page.getViewById("resultLabel"); | ||
| 7 | + label.set("text", text); | ||
| 8 | + console.log("on button tap"); | ||
| 3 | 9 | } | |
| 4 | 10 | ||
| 5 | - export function onStackLayoutThrowTap() { | ||
| 6 | - throw new Error("Should not tap layout with IsPassThroughParentEnabled=true"); | ||
| 11 | + export function onTap(args: EventData) { | ||
| 12 | + setLabelTextAndLog(args, "onButtonTapResult"); | ||
| 7 | 13 | } | |
| 8 | 14 | ||
| 9 | - export function onUserInteractionDisabledTap() { | ||
| 10 | - throw new Error("Should not tap button with IsUserInteractionEnabled=false"); | ||
| 15 | + export function clearResult(args: EventData) { | ||
| 16 | + setLabelTextAndLog(args, "none"); | ||
| 11 | 17 | } | |
| 12 | 18 | ||
| 13 | - export function onDisabledThrowTap() { | ||
| 14 | - throw new Error("Should not tap button with IsEnabled=false"); | ||
| 19 | + export function onOuterWrapLayoutTap(args) { | ||
| 20 | + setLabelTextAndLog(args, "onOuterWrapLayoutTapResult"); | ||
| 15 | 21 | } | |
| 16 | 22 | ||
| 17 | - export function onTap() { | ||
| 18 | - console.log("on button tap"); | ||
| 19 | - } | ||
| 23 | + export function onStackLayoutThrowTap(args: EventData) { | ||
| 24 | + setLabelTextAndLog(args, "Should not tap layout with IsPassThroughParentEnabled=true"); | ||
| 25 | + // throw new Error("Should not tap layout with IsPassThroughParentEnabled=true"); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + export function onUserInteractionDisabledTap(args: EventData) { | ||
| 29 | + setLabelTextAndLog(args, "Should not tap button with IsUserInteractionEnabled=false"); | ||
| 30 | + // throw new Error("Should not tap button with IsUserInteractionEnabled=false"); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + export function onDisabledThrowTap(args: EventData) { | ||
| 34 | + setLabelTextAndLog(args, "Should not tap button with IsEnabled=false"); | ||
| 35 | + // throw new Error("Should not tap button with IsEnabled=false"); | ||
| 36 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,24 +1,28 @@ | |||
| 1 | - <Page class="page" actionBarHidden="true" xmlns="http://schemas.nativescript.org/tns.xsd"> | ||
| 1 | + <Page class="page" actionBarHidden="true" | ||
| 2 | + xmlns="http://schemas.nativescript.org/tns.xsd"> | ||
| 2 | 3 | ||
| 3 | - <WrapLayout tap="onOuterWrapLayoutTap" backgroundColor="#bed3f4"> | ||
| 4 | - | ||
| 5 | - <StackLayout tap="onStackLayoutThrowTap" backgroundColor="#f3f9db" height="200" isPassThroughParentEnabled="true"> | ||
| 6 | - <Label text="isPassThroughParentEnabled='true'" isUserInteractionEnabled="false" /> | ||
| 7 | - <Button isUserInteractionEnabled="false" tap="onUserInteractionDisabledThrowTap" text="isUserInteractionEnabled='false'"></Button> | ||
| 8 | - <Button isEnabled="false" tap="onDisabledThrowTap" text="isEnabled='false'"></Button> | ||
| 9 | - <Button tap="onTap" text="TAP"></Button> | ||
| 4 | + <WrapLayout tap="onOuterWrapLayoutTap" automationText="onOuterWrapLayoutTap" backgroundColor="#bed3f4" padding="5"> | ||
| 5 | + <StackLayout tap="onStackLayoutThrowTap" automationText="stackLayout1" backgroundColor="#f3f9db" height="180" isPassThroughParentEnabled="true"> | ||
| 6 | + <Label automationText="label1" text="isPassThroughParentEnabled='true'" isUserInteractionEnabled="false" /> | ||
| 7 | + <Button automationText="onUserInteractionDisabledThrowTap1" isUserInteractionEnabled="false" tap="onUserInteractionDisabledThrowTap" text="isUserInteractionEnabled='false'"></Button> | ||
| 8 | + <Button automationText="onDisabledThrowTap1" isEnabled="false" tap="onDisabledThrowTap" text="isEnabled='false'"></Button> | ||
| 9 | + <Button tap="onTap" text="TAP" automationText="btn1"></Button> | ||
| 10 | 10 | </StackLayout> | |
| 11 | 11 | ||
| 12 | - <StackLayout tap="onStackLayoutThrowTap" style.margin="20" height="300" width="300" backgroundColor="#f5edf7" isPassThroughParentEnabled="true"> | ||
| 13 | - <Label text="isPassThroughParentEnabled='true'" isUserInteractionEnabled="false" /> | ||
| 14 | - <StackLayout tap="onStackLayoutThrowTap" backgroundColor="#f3f9db" height="200" isPassThroughParentEnabled="true"> | ||
| 15 | - <Label text="isPassThroughParentEnabled='true'" isUserInteractionEnabled="false" /> | ||
| 16 | - <Button isUserInteractionEnabled="false" tap="onUserInteractionDisabledThrowTap" text="isUserInteractionEnabled='false'"></Button> | ||
| 17 | - <Button isEnabled="false" tap="onDisabledThrowTap" text="isEnabled='false'"></Button> | ||
| 18 | - <Button tap="onTap" text="TAP"></Button> | ||
| 12 | + <StackLayout tap="onStackLayoutThrowTap" automationText="stackLayout2" style.margin="20" height="250" width="300" backgroundColor="#f5edf7" isPassThroughParentEnabled="true"> | ||
| 13 | + <Label automationText="label2" text="isPassThroughParentEnabled='true'" isUserInteractionEnabled="false" /> | ||
| 14 | + <StackLayout tap="onStackLayoutThrowTap" automationText="stackLayout3" backgroundColor="#f3f9db" height="200" isPassThroughParentEnabled="true"> | ||
| 15 | + <Label automationText="label3" text="isPassThroughParentEnabled='true'" isUserInteractionEnabled="false" /> | ||
| 16 | + <Button automationText="onUserInteractionDisabledThrowTap2" isUserInteractionEnabled="false" tap="onUserInteractionDisabledThrowTap" text="isUserInteractionEnabled='false'"></Button> | ||
| 17 | + <Button automationText="onDisabledThrowTap2" isEnabled="false" tap="onDisabledThrowTap" text="isEnabled='false'"></Button> | ||
| 18 | + <Button automationText="btn2" tap="onTap" text="TAP"></Button> | ||
| 19 | 19 | </StackLayout> | |
| 20 | 20 | </StackLayout> | |
| 21 | 21 | ||
| 22 | - </WrapLayout> | ||
| 22 | + <Button text="x" automationText="clearResult" tap="clearResult" height="35" width="40" padding="0" /> | ||
| 23 | 23 | ||
| 24 | + <StackLayout> | ||
| 25 | + <Label id="resultLabel" textWrap="true" /> | ||
| 26 | + </StackLayout> | ||
| 27 | + </WrapLayout> | ||
| 24 | 28 | </Page> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments