| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b7c61ca commit f246215
16 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,13 @@ | |||
| 1 | + .btn1 { | ||
| 2 | + background-color: lightgreen; | ||
| 3 | + color: coral; | ||
| 4 | + font-size: 20; | ||
| 5 | + font-family: monospace; | ||
| 6 | + } | ||
| 7 | + | ||
| 8 | + .btn2 { | ||
| 9 | + background-color: coral; | ||
| 10 | + color: lightgreen; | ||
| 11 | + font-size: 24; | ||
| 12 | + font-family: serif; | ||
| 13 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + import * as application from "tns-core-modules/application"; | ||
| 2 | + | ||
| 3 | + // Needed only for build infrastructure | ||
| 4 | + application.setCssFileName("devtools-app/app.css"); | ||
| 5 | + | ||
| 6 | + application.start({ moduleName: "devtools-app/main-page" }); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,36 @@ | |||
| 1 | + import * as frame from "tns-core-modules/ui/frame"; | ||
| 2 | + import { Label } from "tns-core-modules/ui/label"; | ||
| 3 | + import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; | ||
| 4 | + // import { DOMNode } from "tns-core-modules/debugger/dom-node"; | ||
| 5 | + | ||
| 6 | + export function print(args) { | ||
| 7 | + // const node = new DOMNode(frame.topmost()); | ||
| 8 | + // console.dir(node.toJSON()); | ||
| 9 | + | ||
| 10 | + // const btn = args.object.page.getViewById("btn"); | ||
| 11 | + // btn.ensureDomNode(); | ||
| 12 | + // console.dir(btn.domNode.getComputedProperties()); | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + let i = 0; | ||
| 16 | + export function add(args) { | ||
| 17 | + const container = args.object.page.getViewById("container"); | ||
| 18 | + const lbl = new Label(); | ||
| 19 | + lbl.text = "label " + i++; | ||
| 20 | + container.addChild(lbl); | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + export function remove(args) { | ||
| 24 | + const container = <StackLayout>args.object.page.getViewById("container"); | ||
| 25 | + const lbl = container.getChildAt(container.getChildrenCount() - 1); | ||
| 26 | + container.removeChild(lbl); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + export function navigate() { | ||
| 30 | + frame.topmost().navigate("gallery-app/main-page"); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + export function change(args){ | ||
| 34 | + args.object.text = "hi " + Math.random(); | ||
| 35 | + | ||
| 36 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,29 @@ | |||
| 1 | + <?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | + <Page navigatedTo="print"> | ||
| 3 | + <GridLayout rows="* * *" columns="* * *"> | ||
| 4 | + | ||
| 5 | + <Button id="btn" | ||
| 6 | + customProp="custom" | ||
| 7 | + text="hi there" | ||
| 8 | + fontSize="30" | ||
| 9 | + row="1" | ||
| 10 | + col="1" | ||
| 11 | + color="red" | ||
| 12 | + backgroundColor="lightgreen" | ||
| 13 | + class="btn" | ||
| 14 | + tap="change"/> | ||
| 15 | + <Button text="class: btn1" class="btn1" row="1" col="0"/> | ||
| 16 | + <Button text="class: btn2" class="btn2" row="1" col="2"/> | ||
| 17 | + | ||
| 18 | + <Button text="add" tap="add" /> | ||
| 19 | + <Button text="remove" tap="remove" col="2" /> | ||
| 20 | + | ||
| 21 | + <Button text="move beach" tap="navigate" col="1" /> | ||
| 22 | + <StackLayout colSpan="3" row="2" id="container"> | ||
| 23 | + <TextField hint="hint" text="123" /> | ||
| 24 | + <TextField hint="hint" text="456" /> | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + </StackLayout> | ||
| 28 | + </GridLayout> | ||
| 29 | + </Page> | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments