Include resource folder
Fix tslint error
@ -1,23 +0,0 @@
|
||||
import * as observable from "tns-core-modules/data/observable";
|
||||
import * as pages from "tns-core-modules/ui/page";
|
||||
import * as viewModule from "tns-core-modules/ui/core/view";
|
||||
import * as color from "tns-core-modules/color";
|
||||
|
||||
var view: viewModule.View;
|
||||
|
||||
export function pageLoaded(args: observable.EventData) {
|
||||
var page = <pages.Page>args.object;
|
||||
view = page.getViewById<viewModule.View>("view");
|
||||
}
|
||||
|
||||
export function onAnimate(args: observable.EventData) {
|
||||
view.backgroundColor = new color.Color("Green");
|
||||
view.animate({
|
||||
backgroundColor: new color.Color("Blue"),
|
||||
duration: 2500
|
||||
});
|
||||
}
|
||||
|
||||
export function onReset(args: observable.EventData) {
|
||||
view.backgroundColor = new color.Color("White");
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<Page loaded="pageLoaded">
|
||||
<StackLayout>
|
||||
<Button text="Animate" tap="onAnimate"/>
|
||||
<Button text="Reset" tap="onReset"/>
|
||||
<AbsoluteLayout width="300" height="300" clipToBounds="true" backgroundColor="LightGray">
|
||||
<Button id="view" text="{N}" width="100" height="100" left="100" top="100" style.textAlignment="center" backgroundColor="White" style.fontSize="30"/>
|
||||
</AbsoluteLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
@ -0,0 +1,13 @@
|
||||
<Page>
|
||||
<Page.actionBar>
|
||||
<ActionBar title="{{ exampleName }}">
|
||||
<NavigationButton text="Go Back" android.systemIcon="ic_menu_back"></NavigationButton>
|
||||
</ActionBar>
|
||||
</Page.actionBar>
|
||||
<GridLayout rows="*,*,*,*">
|
||||
<Button text="This a test of a wrapping button [CENTER]" textWrap="true" style="text-align:center;width:100" />
|
||||
<Button row="1" text="This a test of a wrapping button [RIGHT]" textWrap="true" style="text-align:right;width:100" />
|
||||
<Button row="2" text="This a test of a wrapping button [LEFT]" textWrap="true" style="text-align:left;width:100" />
|
||||
<Button row="3" text=" This a test of a wrapping button [CENTER ICON]" textWrap="true" style="text-align:center;width:100" />
|
||||
</GridLayout>
|
||||
</Page>
|
22
apps/app/ui-tests-app/button/main-page.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { EventData } from "tns-core-modules/data/observable";
|
||||
import { MainPageViewModel } from "../mainPage";
|
||||
import { WrapLayout } from "tns-core-modules/ui/layouts/wrap-layout";
|
||||
import { Page } from "tns-core-modules/ui/page";
|
||||
|
||||
export function pageLoaded(args: EventData) {
|
||||
let page = <Page>args.object;
|
||||
let view = require("ui/core/view");
|
||||
let wrapLayout = view.getViewById(page, "wrapLayoutWithExamples");
|
||||
|
||||
let examples: Map<string, string> = new Map<string, string>();
|
||||
examples.set("btn-wrap-text-alignment-4266", "button/btn-wrap-text-alignment-4266");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
}
|
||||
|
||||
export class SubMainPageViewModel extends MainPageViewModel {
|
||||
constructor(container: WrapLayout, examples: Map<string, string>) {
|
||||
super(container, examples);
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
||||
<Progress class="s0" row="2" col="1" maxValue="100" value="50"/>
|
||||
<ActivityIndicator class="s0" row="2" col="2" busy="false"/>
|
||||
<Image class="s0" row="3" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image class="s0" row="3" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<ListView class="s0" row="3" col="1" items="ListView"/>
|
||||
<HtmlView class="s0" row="3" col="2" html="<h1>HtmlView</h1>"/>
|
||||
<WebView class="s0" row="4" col="0" src="~/ui-tests-app/web-view/test.html"/>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
||||
<Progress class="s0" row="2" col="1" maxValue="100" value="50"/>
|
||||
<ActivityIndicator class="s0" row="2" col="2" busy="false"/>
|
||||
<Image class="s0" row="3" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image class="s0" row="3" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<ListView class="s0" row="3" col="1" items="ListView"/>
|
||||
<HtmlView class="s0" row="3" col="2" html="<h1>HtmlView</h1>"/>
|
||||
<WebView class="s0" row="4" col="0" src="~/ui-tests-app/web-view/test.html"/>
|
||||
|
@ -31,7 +31,7 @@ export function onToggle(args: EventData){
|
||||
debugConsole.text += `> background-color: ${target.backgroundColor}\n`;
|
||||
}
|
||||
else if (button.text === "BGImage"){
|
||||
target.backgroundImage = target.backgroundImage ? undefined : `~/ui-tests-app/pages/test2.png`;
|
||||
target.backgroundImage = target.backgroundImage ? undefined : `~/ui-tests-app/resources/images/test2.png`;
|
||||
debugConsole.text += `> background-image: ${target.backgroundImage}\n`;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ Button {
|
||||
}
|
||||
|
||||
#s15 {
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');
|
||||
}
|
||||
|
||||
#s16 {
|
||||
|
@ -15,7 +15,7 @@
|
||||
<Button id="s12" row="4" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5 10 15 20;"/>
|
||||
<Button id="s13" row="4" col="1" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5;"/>
|
||||
<Button id="s14" row="4" col="2" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-color: magenta;"/>
|
||||
<Button id="s15" row="5" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');"/>
|
||||
<Button id="s15" row="5" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');"/>
|
||||
<Button id="s16" row="5" col="1" textWrap="true" text="border-width: 5; border-color: red; padding: 5;"/>
|
||||
<Button id="s17" row="5" col="2" textWrap="true" text="border-width: 5 6 7 8; border-color: red green blue yellow; padding: 5 6 7 8;"/>
|
||||
</GridLayout>
|
||||
|
@ -65,7 +65,7 @@ Image {
|
||||
}
|
||||
|
||||
#s15 {
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');
|
||||
}
|
||||
|
||||
#s16 {
|
||||
|
@ -1,22 +1,22 @@
|
||||
<Page>
|
||||
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
|
||||
<Image id="s0" row="0" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s1" row="0" col="1" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s2" row="0" col="2" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s3" row="1" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s4" row="1" col="1" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s5" row="1" col="2" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s6" row="2" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s7" row="2" col="1" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s8" row="2" col="2" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s9" row="3" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s10" row="3" col="1" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s11" row="3" col="2" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s12" row="4" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s13" row="4" col="1" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s14" row="4" col="2" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s15" row="5" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s16" row="5" col="1" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s17" row="5" col="2" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||
<Image id="s0" row="0" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s1" row="0" col="1" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s2" row="0" col="2" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s3" row="1" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s4" row="1" col="1" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s5" row="1" col="2" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s6" row="2" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s7" row="2" col="1" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s8" row="2" col="2" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s9" row="3" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s10" row="3" col="1" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s11" row="3" col="2" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s12" row="4" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s13" row="4" col="1" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s14" row="4" col="2" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s15" row="5" col="0" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s16" row="5" col="1" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
<Image id="s17" row="5" col="2" src="~/ui-tests-app/resources/images/gravatar.png" stretch="fill"/>
|
||||
</GridLayout>
|
||||
</Page>
|
@ -1,5 +1,5 @@
|
||||
Label {
|
||||
background-image: url('~/ui-tests-app/pages/test2.png');
|
||||
background-image: url('~/ui-tests-app/resources/images/test2.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: left;
|
||||
background-size: contain;
|
||||
|
@ -65,7 +65,7 @@ Label {
|
||||
}
|
||||
|
||||
#s15 {
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');
|
||||
}
|
||||
|
||||
#s16 {
|
||||
|
@ -15,7 +15,7 @@
|
||||
<Label id="s12" row="4" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5 10 15 20;"/>
|
||||
<Label id="s13" row="4" col="1" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5;"/>
|
||||
<Label id="s14" row="4" col="2" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-color: magenta;"/>
|
||||
<Label id="s15" row="5" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');"/>
|
||||
<Label id="s15" row="5" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');"/>
|
||||
<Label id="s16" row="5" col="1" textWrap="true" text="border-width: 5; border-color: red; padding: 5;"/>
|
||||
<Label id="s17" row="5" col="2" textWrap="true" text="border-width: 5 6 7 8; border-color: red green blue yellow; padding: 5 6 7 8;"/>
|
||||
</GridLayout>
|
||||
|
@ -68,7 +68,7 @@ Label {
|
||||
}
|
||||
|
||||
#s15 {
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');
|
||||
}
|
||||
|
||||
#s16 {
|
||||
|
@ -15,7 +15,7 @@
|
||||
<StackLayout id="s12" row="4" col="0"><Label textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5 10 15 20;"/></StackLayout>
|
||||
<StackLayout id="s13" row="4" col="1"><Label textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5;"/></StackLayout>
|
||||
<StackLayout id="s14" row="4" col="2"><Label textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-color: magenta;"/></StackLayout>
|
||||
<StackLayout id="s15" row="5" col="0"><Label textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');"/></StackLayout>
|
||||
<StackLayout id="s15" row="5" col="0"><Label textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');"/></StackLayout>
|
||||
<StackLayout id="s16" row="5" col="1"><Label textWrap="true" text="border-width: 5; border-color: red; padding: 5;"/></StackLayout>
|
||||
<StackLayout id="s17" row="5" col="2"><Label textWrap="true" text="border-width: 5 6 7 8; border-color: red green blue yellow; padding: 5 6 7 8;"/></StackLayout>
|
||||
</GridLayout>
|
||||
|
@ -47,7 +47,6 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("hint-text-color", "css/hint-text-color");
|
||||
examples.set("combinators", "css/combinators");
|
||||
examples.set("styled-formatted-text", "css/styled-formatted-text");
|
||||
examples.set("secured-text-field", "css/secured-text-field-4135");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
|
@ -5,12 +5,12 @@
|
||||
<Button text="Button" class="c1"/>
|
||||
<TextField text="TextField" class="c1"/>
|
||||
<TextView text="TextView" class="c1"/>
|
||||
<Image src="~/ui-tests-app/image-view/gravatar2.png" class="c1" stretch="none"/>
|
||||
<Image src="~/ui-tests-app/resources/images/gravatar2.png" class="c1" stretch="none"/>
|
||||
|
||||
<Label text="Label" class="c2"/>
|
||||
<Button text="Button" class="c2"/>
|
||||
<TextField text="TextField" class="c2"/>
|
||||
<TextView text="TextView" class="c2" style.horizonhorizontalAlignmenttalAligment="left"/>
|
||||
<Image src="~/ui-tests-app/image-view/gravatar2.png" class="c2" stretch="none"/>
|
||||
<Image src="~/ui-tests-app/resources/images/gravatar2.png" class="c2" stretch="none"/>
|
||||
</StackLayout>
|
||||
</Page>
|
@ -7,7 +7,7 @@
|
||||
<Button text="Button" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
|
||||
<TextView text="Text View" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
|
||||
<TextField text="Text Field" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
|
||||
<Image src="~/ui-tests-app/image-view/gravatar.png" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
|
||||
<Image src="~/ui-tests-app/resources/images/gravatar.png" borderWidth="1px" borderRadius="10px" borderColor="green" padding="1px" margin="1px" />
|
||||
</StackLayout>
|
||||
|
||||
<StackLayout borderWidth="2px" borderColor="green" orientation="horizontal" padding="2px">
|
||||
@ -35,7 +35,7 @@
|
||||
<Button text="Button" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
|
||||
<TextView text="Text View" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
|
||||
<TextField text="Text Field" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
|
||||
<Image src="~/ui-tests-app/image-view/gravatar.png" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
|
||||
<Image src="~/ui-tests-app/resources/images/gravatar.png" borderWidth="1" borderRadius="10" borderColor="green" padding="1" margin="1" />
|
||||
</StackLayout>
|
||||
|
||||
<StackLayout borderWidth="2" borderColor="green" orientation="horizontal" padding="2">
|
||||
|
@ -1,7 +0,0 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<StackLayout>
|
||||
<TextField secure="true" text="test" hint="hint"></TextField>
|
||||
<TextField secure="true" text="text"></TextField>
|
||||
<TextField secure="true" hint="hint"></TextField>
|
||||
</StackLayout>
|
||||
</Page>
|
@ -65,7 +65,7 @@ TextField {
|
||||
}
|
||||
|
||||
#s15 {
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');
|
||||
}
|
||||
|
||||
#s16 {
|
||||
|
@ -15,7 +15,7 @@
|
||||
<TextField id="s12" row="4" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5 10 15 20;"/>
|
||||
<TextField id="s13" row="4" col="1" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5;"/>
|
||||
<TextField id="s14" row="4" col="2" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-color: magenta;"/>
|
||||
<TextField id="s15" row="5" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');"/>
|
||||
<TextField id="s15" row="5" col="0" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');"/>
|
||||
<TextField id="s16" row="5" col="1" textWrap="true" text="border-width: 5; border-color: red; padding: 5;"/>
|
||||
<TextField id="s17" row="5" col="2" textWrap="true" text="border-width: 5 6 7 8; border-color: red green blue yellow; padding: 5 6 7 8;"/>
|
||||
</GridLayout>
|
||||
|
@ -65,7 +65,7 @@ TextView {
|
||||
}
|
||||
|
||||
#s15 {
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');
|
||||
border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');
|
||||
}
|
||||
|
||||
#s16 {
|
||||
|
@ -15,7 +15,7 @@
|
||||
<TextView id="s12" row="4" col="0" textWrap="true" autocorrect="false" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5 10 15 20;"/>
|
||||
<TextView id="s13" row="4" col="1" textWrap="true" autocorrect="false" text="border-width: 5 10 15 20; border-color: red green blue yellow; border-radius: 5;"/>
|
||||
<TextView id="s14" row="4" col="2" textWrap="true" autocorrect="false" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-color: magenta;"/>
|
||||
<TextView id="s15" row="5" col="0" textWrap="true" autocorrect="false" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/pages/test2.png');"/>
|
||||
<TextView id="s15" row="5" col="0" textWrap="true" autocorrect="false" text="border-width: 5 10 15 20; border-color: red green blue yellow; background-image: url('~/ui-tests-app/resources/images/test2.png');"/>
|
||||
<TextView id="s16" row="5" col="1" textWrap="true" autocorrect="false" text="border-width: 5; border-color: red; padding: 5;"/>
|
||||
<TextView id="s17" row="5" col="2" textWrap="true" autocorrect="false" text="border-width: 5 6 7 8; border-color: red green blue yellow; padding: 5 6 7 8;"/>
|
||||
</GridLayout>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<AbsoluteLayout style="background-color: brown;" row="1">
|
||||
<TextField text="TextField" autocorrect="false" style="height: 60; width: 100; z-index: 999; background-color: red;" />
|
||||
<TextView text="TextView" autocorrect="false" left="10" top="30" style="height: 70; width: 100; padding-top:40; z-index:1; background-color: yellow;"/>
|
||||
<Image src="~/ui-tests-app/image-view/gravatar.png" left="30" top="70" style="height: 60; width: 100; z-index:0; background-color: blue;"/>
|
||||
<Image src="~/ui-tests-app/resources/images/gravatar.png" left="30" top="70" style="height: 60; width: 100; z-index:0; background-color: blue;"/>
|
||||
<TimePicker hour="5" minute="30" minHour="3" maxHour="7" top="90" style="z-index:-1; background-color: orange; width: auto;"/>
|
||||
</AbsoluteLayout>
|
||||
<AbsoluteLayout row="1" col="1" style="background-color: red;">
|
||||
|
@ -11,16 +11,17 @@ export function pageLoaded(args: EventData) {
|
||||
|
||||
let examples: Map<string, string> = new Map<string, string>();
|
||||
|
||||
examples.set("gestures", "pages/gestures");
|
||||
examples.set("touch", "pages/touch-event");
|
||||
examples.set("pan", "pages/pan-event");
|
||||
examples.set("handlers", "pages/handlers");
|
||||
examples.set("console", "pages/console");
|
||||
examples.set("i61", "pages/i61");
|
||||
examples.set("i73", "pages/i73");
|
||||
examples.set("i86", "pages/i86");
|
||||
examples.set("gestures", "gestures");
|
||||
examples.set("touch", "touch-event");
|
||||
examples.set("pan", "pan-event");
|
||||
examples.set("handlers", "handlers");
|
||||
examples.set("console", "console");
|
||||
examples.set("i61", "i61");
|
||||
examples.set("i73", "i73");
|
||||
examples.set("i86", "i86");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
viewModel.basePath="events";
|
||||
page.bindingContext = viewModel;
|
||||
}
|
||||
|
6
apps/app/ui-tests-app/events/main-page.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page loaded="pageLoaded">
|
||||
<ScrollView orientation="vertical" row="1">
|
||||
<WrapLayout id="wrapLayoutWithExamples"/>
|
||||
</ScrollView>
|
||||
</Page>
|
@ -1,5 +1,5 @@
|
||||
.bg-background {
|
||||
background-image: url("~/ui-tests-app/image-view/gravatar.png");
|
||||
background-image: url("~/ui-tests-app/resources/images/gravatar.png");
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { topmost } from "tns-core-modules/ui/frame";
|
||||
|
||||
export function onTap(){
|
||||
topmost().navigate("ui-tests-app/font/issue-3654-2");
|
||||
topmost().navigate("ui-tests-app/font/font-awesome/issue-3654-2");
|
||||
}
|
@ -15,10 +15,10 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("fontlbl", "font/label");
|
||||
examples.set("fontfield", "font/text-field");
|
||||
examples.set("fontview", "font/text-view");
|
||||
examples.set("nordic", "nordic/nordic");
|
||||
examples.set("nordic", "/font/nordic/nordic");
|
||||
examples.set("customfonts", "font/custom-fonts");
|
||||
examples.set("all-fonts", "font/all-fonts");
|
||||
examples.set("awesome-3654", "font/issue-3654");
|
||||
examples.set("awesome-3654", "font/font-awesome/issue-3654");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<Page>
|
||||
<StackLayout>
|
||||
<Button text="ButtonCircle" style="width:200;height:200;color:white;border-radius:100;border-width:2;border-color:red;background-color:blue" />
|
||||
<Button text="ButtonImage" style="width:200;height:200;color:white;border-radius:100;border-width:2;border-color:blue;background-image:url('~/ui-tests-app/image-view/red.png')" />
|
||||
<Button text="ButtonImage" style="width:200;height:200;color:white;border-radius:100;border-width:2;border-color:blue;background-image:url('~/ui-tests-app/resources/images/red.png')" />
|
||||
</StackLayout>
|
||||
</Page>
|
@ -57,5 +57,5 @@ style {
|
||||
border-width: 2;
|
||||
border-color: blue;
|
||||
border-radius: 100;
|
||||
background-image: url('~/ui-tests-app/pages/red.png');
|
||||
background-image: url('~/ui-tests-app/resources/images/red.png');
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
<Page>
|
||||
<GridLayout rows="*,*,*" columns="*,*">
|
||||
<Image row="0" col="0" src="~/ui-tests-app/image-view/gravatar.png" class="one"/>
|
||||
<Image row="0" col="1" src="~/ui-tests-app/image-view/gravatar.png" class="two"/>
|
||||
<Image row="1" col="0" src="~/ui-tests-app/image-view/gravatar.png" class="three"/>
|
||||
<Image row="1" col="1" src="~/ui-tests-app/image-view/gravatar.png" class="four"/>
|
||||
<Image row="2" col="0" src="~/ui-tests-app/image-view/gravatar.png" class="five"/>
|
||||
<Image row="2" col="1" src="~/ui-tests-app/image-view/gravatar.png" class="six"/>
|
||||
<Image row="0" col="0" src="~/ui-tests-app/resources/images/gravatar.png" class="one"/>
|
||||
<Image row="0" col="1" src="~/ui-tests-app/resources/images/gravatar.png" class="two"/>
|
||||
<Image row="1" col="0" src="~/ui-tests-app/resources/images/gravatar.png" class="three"/>
|
||||
<Image row="1" col="1" src="~/ui-tests-app/resources/images/gravatar.png" class="four"/>
|
||||
<Image row="2" col="0" src="~/ui-tests-app/resources/images/gravatar.png" class="five"/>
|
||||
<Image row="2" col="1" src="~/ui-tests-app/resources/images/gravatar.png" class="six"/>
|
||||
</GridLayout>
|
||||
</Page>
|
@ -1,5 +1,5 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<StackLayout style="color: white">
|
||||
<Image src="~/ui-tests-app/image-view/gravatar.png" stretch="aspectFill"/>
|
||||
<Image src="~/ui-tests-app/resources/images/gravatar.png" stretch="aspectFill"/>
|
||||
</StackLayout>
|
||||
</Page>
|
@ -1,6 +1,6 @@
|
||||
Button {
|
||||
background-color: red;
|
||||
background-image: url('~/ui-tests-app/image-view/gravatar2.png');
|
||||
background-image: url('~/ui-tests-app/resources/images/gravatar2.png');
|
||||
background-position: center;
|
||||
background-size: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Page id="Page" xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<ScrollView height="auto">
|
||||
<StackLayout id="StackLayout">
|
||||
<Image id="Image" width="100" height="100" class="elementStyle" src="~/ui-tests-app/image-view/gravatar.png"/>
|
||||
<Image id="Image" width="100" height="100" class="elementStyle" src="~/ui-tests-app/resources/images/gravatar.png"/>
|
||||
<Button id="Button" backgroundColor="blue" class="elementStyle" text="TAP" />
|
||||
<Label id="Label" backgroundColor="red" class="elementStyle" text="sample label" textWrap="true"/>
|
||||
<TextField id="TextField" backgroundColor="green" class="elementStyle" hint="" text="Sample textfield" />
|
||||
|
@ -21,7 +21,7 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("image-view", "image-view/main-page");
|
||||
examples.set("tab-view", "tab-view/main-page");
|
||||
examples.set("layouts", "layouts/main-page");
|
||||
examples.set("pages-events", "pages/main-page");
|
||||
examples.set("events", "events/main-page");
|
||||
examples.set("webview", "web-view/main-page");
|
||||
examples.set("flexbox", "flexbox/flexbox-main-page");
|
||||
|
||||
@ -29,8 +29,6 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("dialogs", "dialogs/dialogs");
|
||||
examples.set("htmlview", "html-view/html-view");
|
||||
examples.set("timePicker", "time-picker/time-picker");
|
||||
examples.set("animeBG", "animations/background");
|
||||
examples.set("transitions", "transitions/page0");
|
||||
examples.set("segStyle", "segmented-bar/all");
|
||||
examples.set("list-view", "list-view/main-page");
|
||||
examples.set("issues", "issues/main-page");
|
||||
@ -40,7 +38,9 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("list-picker", "list-picker/main-page");
|
||||
|
||||
examples.set("listview_binding", "pages/listview_binding");
|
||||
examples.set("textfield", "text-field/text-field");
|
||||
examples.set("textfield", "text-field/main-page");
|
||||
examples.set("button","button/main-page");
|
||||
examples.set("perf","perf/main-page");
|
||||
|
||||
let viewModel = new MainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
@ -57,9 +57,9 @@ export function pageLoaded(args: EventData) {
|
||||
|
||||
export class MainPageViewModel extends observable.Observable {
|
||||
private _exampleName: string;
|
||||
private basePath: string = "";
|
||||
private colors = ["#ff0000", "#0000cc", "#33cc33", "#33cc33"];
|
||||
|
||||
public basePath: string = "";
|
||||
public examples: Map<string, string> = new Map<string, string>();
|
||||
|
||||
constructor(private panel: WrapLayout, private _examples: Map<string, string>) {
|
||||
@ -92,8 +92,13 @@ export class MainPageViewModel extends observable.Observable {
|
||||
|
||||
public loadExmaple() {
|
||||
let selectedExample = this.exampleName.toLocaleLowerCase().trim();
|
||||
this.exampleName = selectedExample;
|
||||
if (selectedExample.indexOf("/") > 0) {
|
||||
frame.topmost().navigate("ui-tests-app/" + selectedExample);
|
||||
try {
|
||||
rame.topmost().navigate("ui-tests-app/" + selectedExample);
|
||||
} catch (error) {
|
||||
dialogs.alert("Cannot find example: " + selectedExample);
|
||||
}
|
||||
} else {
|
||||
this.selectExample(this.exampleName.toLocaleLowerCase());
|
||||
}
|
||||
@ -107,7 +112,7 @@ export class MainPageViewModel extends observable.Observable {
|
||||
console.log(" EXAMPLE: " + selectedExample);
|
||||
|
||||
if (this.examples.has(selectedExample)) {
|
||||
frame.topmost().navigate("ui-tests-app/" + this.basePath + this.examples.get(selectedExample));
|
||||
frame.topmost().navigate("ui-tests-app/" + this.basePath + "/"+ this.examples.get(selectedExample));
|
||||
}
|
||||
else {
|
||||
dialogs.alert("Cannot find example: " + selectedExample);
|
||||
|
@ -2,11 +2,11 @@
|
||||
<Page loaded="pageLoaded">
|
||||
<GridLayout rows="auto, *">
|
||||
<StackLayout id="parentLayout">
|
||||
<TextView automationText="tv" id="textView" text="{{ exampleName }}"/>
|
||||
<Button automationText="Run" id="btnRun" text="Run" tap="{{ loadExmaple }}"/>
|
||||
<TextView automationText="tv" id="textView" text="{{ exampleName }}" />
|
||||
<Button automationText="Run" id="btnRun" text="Run" tap="{{ loadExmaple }}" />
|
||||
</StackLayout>
|
||||
<ScrollView row="1">
|
||||
<WrapLayout id="wrapLayoutWithExamples"/>
|
||||
</ScrollView>
|
||||
</GridLayout>
|
||||
</Page>
|
||||
</Page>
|
@ -1,14 +1,6 @@
|
||||
/*.bg-main-page{
|
||||
background-image: url('~/ui-tests-app/image-view/gravatar.png');
|
||||
}*/
|
||||
|
||||
/*.image {
|
||||
width:100;
|
||||
height:100;
|
||||
background-image: url('~/ui-tests-app/image-view/gravatar.png');
|
||||
clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
|
||||
}*/
|
||||
|
||||
.bg-main-page{
|
||||
background-image: url('~/ui-tests-app/resources/images/gravatar.png');
|
||||
}
|
||||
|
||||
.info {
|
||||
font-size: 20;
|
||||
|
@ -11,7 +11,7 @@ var images = ["gravatar", "gravatar2", "red"];
|
||||
export function onLoad(args: EventData) {
|
||||
let index = indexCounter++ % 3;
|
||||
let page = <Page>args.object;
|
||||
page.backgroundImage = '~/ui-tests-app/image-view/' + images[index] + '.png';
|
||||
page.backgroundImage = '~/ui-tests-app/resources/images/' + images[index] + '.png';
|
||||
setLabelText(page, navCounter, "countInfo");
|
||||
getMemoryUsage(args);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 669 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 925 B After Width: | Height: | Size: 925 B |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
23
apps/app/ui-tests-app/text-field/main-page.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { EventData } from "tns-core-modules/data/observable";
|
||||
import { MainPageViewModel } from "../mainPage";
|
||||
import { WrapLayout } from "tns-core-modules/ui/layouts/wrap-layout";
|
||||
import { Page } from "tns-core-modules/ui/page";
|
||||
|
||||
export function pageLoaded(args: EventData) {
|
||||
let page = <Page>args.object;
|
||||
let view = require("ui/core/view");
|
||||
|
||||
let wrapLayout = view.getViewById(page, "wrapLayoutWithExamples");
|
||||
|
||||
let examples: Map<string, string> = new Map<string, string>();
|
||||
examples.set("secured-text-field", "text-field/secured-text-field-4135");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
}
|
||||
|
||||
export class SubMainPageViewModel extends MainPageViewModel {
|
||||
constructor(container: WrapLayout, examples: Map<string, string>) {
|
||||
super(container, examples);
|
||||
}
|
||||
}
|
6
apps/app/ui-tests-app/text-field/main-page.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page loaded="pageLoaded">
|
||||
<ScrollView orientation="vertical" row="1">
|
||||
<WrapLayout id="wrapLayoutWithExamples"/>
|
||||
</ScrollView>
|
||||
</Page>
|
11
apps/app/ui-tests-app/text-field/secured-text-field-4135.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded">
|
||||
<StackLayout>
|
||||
<Label text="hint" />
|
||||
<TextField secure="true" text="test" hint="hint"></TextField>
|
||||
<TextField secure="true" text="text"></TextField>
|
||||
<TextField secure="true" hint="hint"></TextField>
|
||||
<Label text="bindings" />
|
||||
<TextField id="textField" automationText="textField" text="{{ textProperty }}" />
|
||||
<TextField id="textFieldSecured" automationText="textFieldSecured" text="{{ textProperty }}" />
|
||||
</StackLayout>
|
||||
</Page>
|
@ -1,6 +0,0 @@
|
||||
<Page loaded="pageLoaded">
|
||||
<StackLayout orientation="vertical">
|
||||
<TextField id="textField" automationText="textField" text="{{ textProperty }}" />
|
||||
<TextField id="textFieldSecured" automationText="textFieldSecured" text="{{ textProperty }}" />
|
||||
</StackLayout>
|
||||
</Page>
|
@ -1,14 +0,0 @@
|
||||
import * as frame from "tns-core-modules/ui/frame";
|
||||
|
||||
export function onTap(args) {
|
||||
var navigationEntry = {
|
||||
moduleName: "ui-tests-app/transitions/page1",
|
||||
animated: true,
|
||||
transition: {
|
||||
name: args.object.tag,
|
||||
duration: 380,
|
||||
curve: "easeIn"
|
||||
}
|
||||
};
|
||||
frame.topmost().navigate(navigationEntry);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
<Page loaded="pageLoaded" backgroundColor="LightGreen" >
|
||||
<ScrollView>
|
||||
<StackLayout style.textAlignment="center">
|
||||
|
||||
<Label text="iOS" automationText="iOS" />
|
||||
<Button text="curl" tap="onTap" tag="curl" automationText="curl" />
|
||||
<Button text="curlUp" tap="onTap" tag="curlUp" automationText="curlUp" />
|
||||
<Button text="curlDown" tap="onTap" tag="curlDown" automationText="curlDown" />
|
||||
|
||||
<Label text="Android" automationText="Android" />
|
||||
<Button text="explode" tap="onTap" tag="explode" automationText="explode" />
|
||||
|
||||
<Label text="Cross" automationText="Cross" />
|
||||
<Button text="fade" tap="onTap" tag="fade" automationText="fade" />
|
||||
<Button text="flip" tap="onTap" tag="flip" automationText="flip"/>
|
||||
<Button text="flipRight" tap="onTap" tag="flipRight" automationText="flipRight" />
|
||||
<Button text="flipLeft" tap="onTap" tag="flipLeft" automationText="flipLeft"/>
|
||||
|
||||
<Button text="slide" tap="onTap" tag="slide" automationText="slide" />
|
||||
<Button text="slideLeft" tap="onTap" tag="slideLeft" automationText="slideLeft" />
|
||||
<Button text="slideRight" tap="onTap" tag="slideRight" automationText="slideRight" />
|
||||
<Button text="slideTop" tap="onTap" tag="slideTop" automationText="slideTop"/>
|
||||
<Button text="slideBottom" tap="onTap" tag="slideBottom" automationText="slideBottom"/>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Page>
|
@ -1,14 +0,0 @@
|
||||
import * as frame from "tns-core-modules/ui/frame";
|
||||
|
||||
export function onTap(args) {
|
||||
var navigationEntry = {
|
||||
moduleName: "ui-tests-app/transitions/page0",
|
||||
animated: true,
|
||||
transition: {
|
||||
name: args.object.tag,
|
||||
duration: 380,
|
||||
curve: "easeIn"
|
||||
}
|
||||
};
|
||||
frame.topmost().navigate(navigationEntry);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
<Page loaded="pageLoaded" backgroundColor="LightBlue" >
|
||||
<ScrollView>
|
||||
<StackLayout style.textAlignment="center">
|
||||
|
||||
<Label text="iOS" automationText="iOS" />
|
||||
<Button text="curl" tap="onTap" tag="curl" automationText="curl" />
|
||||
<Button text="curlUp" tap="onTap" tag="curlUp" automationText="curlUp" />
|
||||
<Button text="curlDown" tap="onTap" tag="curlDown" automationText="curlDown" />
|
||||
|
||||
<Label text="Android" automationText="Android" />
|
||||
<Button text="explode" tap="onTap" tag="explode" automationText="explode" />
|
||||
|
||||
<Label text="Cross" automationText="Cross" />
|
||||
<Button text="fade" tap="onTap" tag="fade" automationText="fade" />
|
||||
<Button text="flip" tap="onTap" tag="flip" automationText="flip"/>
|
||||
<Button text="flipRight" tap="onTap" tag="flipRight" automationText="flipRight" />
|
||||
<Button text="flipLeft" tap="onTap" tag="flipLeft" automationText="flipLeft"/>
|
||||
|
||||
<Button text="slide" tap="onTap" tag="slide" automationText="slide" />
|
||||
<Button text="slideLeft" tap="onTap" tag="slideLeft" automationText="slideLeft" />
|
||||
<Button text="slideRight" tap="onTap" tag="slideRight" automationText="slideRight" />
|
||||
<Button text="slideTop" tap="onTap" tag="slideTop" automationText="slideTop"/>
|
||||
<Button text="slideBottom" tap="onTap" tag="slideBottom" automationText="slideBottom"/>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Page>
|
@ -3,7 +3,7 @@
|
||||
|
||||
<!-- WebView: local and string -->
|
||||
<WebView src="~/ui-tests-app/web-view/test.html" height="50" />
|
||||
<WebView src="<html><body><img src='./ui-tests-app/pages/test2.png'></img></body></html>" height="75" />
|
||||
<WebView src="<html><body><img src='./ui-tests-app/resources/images/test2.png'></img></body></html>" height="75" />
|
||||
|
||||
<!-- Resources: png and jpg -->
|
||||
<WrapLayout>
|
||||
|