| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,17 @@ | |||
| 1 | 1 | import * as frame from "tns-core-modules/ui/frame"; | |
| 2 | + import { EventData } from "tns-core-modules/ui/frame"; | ||
| 3 | + import { Button } from "tns-core-modules/ui/button"; | ||
| 4 | + import { ActionBar } from "tns-core-modules/ui/action-bar"; | ||
| 5 | + | ||
| 6 | + const iconModes = ["automatic", "alwaysOriginal", "alwaysTemplate", undefined]; | ||
| 2 | 7 | ||
| 3 | 8 | export function navigate(args) { | |
| 4 | 9 | frame.topmost().navigate("ui-tests-app/action-bar/clean"); | |
| 5 | 10 | } | |
| 11 | + | ||
| 12 | + export function onChangeRenderingMode(args: EventData) { | ||
| 13 | + const button = <Button>args.object; | ||
| 14 | + const actionBar = <ActionBar>button.page.actionBar | ||
| 15 | + actionBar.iosIconRenderingMode = <"automatic" | "alwaysOriginal" | "alwaysTemplate">iconModes[(iconModes.indexOf(actionBar.iosIconRenderingMode) + 1) % iconModes.length]; | ||
| 16 | + button.text = "" + actionBar.iosIconRenderingMode; | ||
| 17 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,5 +9,6 @@ | |||
| 9 | 9 | </Page.actionBar> | |
| 10 | 10 | <StackLayout> | |
| 11 | 11 | <Button text="go to cleared page" tap="navigate"/> | |
| 12 | + <Button text="undefined" tap="onChangeRenderingMode"/> | ||
| 12 | 13 | </StackLayout> | |
| 13 | 14 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,17 @@ | |||
| 1 | 1 | import * as frame from "tns-core-modules/ui/frame"; | |
| 2 | + import { EventData } from "tns-core-modules/ui/frame"; | ||
| 3 | + import { Button } from "tns-core-modules/ui/button"; | ||
| 4 | + import { ActionBar } from "tns-core-modules/ui/action-bar"; | ||
| 5 | + | ||
| 6 | + const iconModes = ["automatic", "alwaysOriginal", "alwaysTemplate", undefined]; | ||
| 2 | 7 | ||
| 3 | 8 | export function navigate(args) { | |
| 4 | 9 | frame.topmost().navigate("ui-tests-app/action-bar/clean"); | |
| 5 | 10 | } | |
| 11 | + | ||
| 12 | + export function onChangeRenderingMode(args: EventData) { | ||
| 13 | + const button = <Button>args.object; | ||
| 14 | + const actionBar = <ActionBar>button.page.actionBar | ||
| 15 | + actionBar.iosIconRenderingMode = <"automatic" | "alwaysOriginal" | "alwaysTemplate">iconModes[(iconModes.indexOf(actionBar.iosIconRenderingMode) + 1) % iconModes.length]; | ||
| 16 | + button.text = "" + actionBar.iosIconRenderingMode; | ||
| 17 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,5 +9,6 @@ | |||
| 9 | 9 | </Page.actionBar> | |
| 10 | 10 | <StackLayout> | |
| 11 | 11 | <Button text="go to cleared page" tap="navigate"/> | |
| 12 | + <Button text="undefined" tap="onChangeRenderingMode"/> | ||
| 12 | 13 | </StackLayout> | |
| 13 | 14 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ let executeTests = true; | |||
| 7 | 7 | trace.enable(); | |
| 8 | 8 | trace.addCategories(trace.categories.Test + "," + trace.categories.Error); | |
| 9 | 9 | ||
| 10 | - // // When debugging | ||
| 10 | + // When debugging | ||
| 11 | 11 | // trace.setCategories(trace.categories.concat( | |
| 12 | 12 | // trace.categories.Test, | |
| 13 | 13 | // trace.categories.Navigation, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments