Update border test pages

This commit is contained in:
vchimev
2016-09-29 14:12:59 +03:00
parent 2d8f436396
commit 30dac9c440
6 changed files with 32 additions and 8 deletions

View File

@@ -0,0 +1,12 @@
import { EventData} from "data/observable";
import { Page } from "ui/page";
import { SearchBar } from "ui/search-bar";
import { isAndroid } from "platform";
export function onLoaded(args: EventData){
var page = <Page>args.object;
var searchBar = <SearchBar>page.getViewById("sb");
if(isAndroid){
searchBar.android.clearFocus();
}
}

View File

@@ -1,10 +1,10 @@
<Page>
<Page loaded="onLoaded">
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
<Button class="s0" row="0" col="0" text="Button"/>
<Label class="s0" row="0" col="1" text="Label"/>
<TextField class="s0" row="0" col="2" text="TextField"/>
<TextView class="s0" row="1" col="0" text="TextView"/>
<SearchBar class="s0" row="1" col="1" text="SearchBar"/>
<SearchBar id="sb" class="s0" row="1" col="1" text="SearchBar"/>
<Switch class="s0" row="1" col="2" checked="true"/>
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
<Progress class="s0" row="2" col="1" maxValue="100" value="50"/>
@@ -12,7 +12,7 @@
<Image class="s0" row="3" col="0" src="~/ui-tests-app/image-view/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="https://www.nativescript.org/"/>
<WebView class="s0" row="4" col="0" src="~/ui-tests-app/web-view/test.html"/>
<SegmentedBar class="s0" row="4" col="1">
<SegmentedBar.items>
<SegmentedBarItem title="SB 1" />

View File

@@ -0,0 +1,12 @@
import { EventData} from "data/observable";
import { Page } from "ui/page";
import { SearchBar } from "ui/search-bar";
import { isAndroid } from "platform";
export function onLoaded(args: EventData){
var page = <Page>args.object;
var searchBar = <SearchBar>page.getViewById("sb");
if(isAndroid){
searchBar.android.clearFocus();
}
}

View File

@@ -1,10 +1,10 @@
<Page>
<Page loaded="onLoaded">
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
<Button class="s0" row="0" col="0" text="Button"/>
<Label class="s0" row="0" col="1" text="Label"/>
<TextField class="s0" row="0" col="2" text="TextField"/>
<TextView class="s0" row="1" col="0" text="TextView Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec blandit, tortor vitae imperdiet gravida, eros neque scelerisque sapien, vel ultricies turpis ipsum vitae nisi. Sed ut consequat magna, scelerisque malesuada elit. Proin posuere purus dolor, semper sagittis dolor tempus ut. Praesent lorem mauris, ultricies eu faucibus quis, auctor ut leo. Mauris tincidunt justo id urna malesuada, at dapibus orci tincidunt. Suspendisse sollicitudin eget lorem porttitor pharetra. Phasellus cursus mauris ut urna sollicitudin pharetra."/>
<SearchBar class="s0" row="1" col="1" text="SearchBar"/>
<SearchBar id="sb" class="s0" row="1" col="1" text="SearchBar"/>
<Switch class="s0" row="1" col="2" checked="true"/>
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
<Progress class="s0" row="2" col="1" maxValue="100" value="50"/>
@@ -12,7 +12,7 @@
<Image class="s0" row="3" col="0" src="~/ui-tests-app/image-view/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="https://www.nativescript.org/"/>
<WebView class="s0" row="4" col="0" src="~/ui-tests-app/web-view/test.html"/>
<SegmentedBar class="s0" row="4" col="1">
<SegmentedBar.items>
<SegmentedBarItem title="SB 1" />

View File

@@ -25,7 +25,7 @@ TextView {
}
#s5 {
border-width: 6 5 5 5; border-color: green;
border-width: 5 10 15 20; border-color: green;
}
#s6 {

View File

@@ -5,7 +5,7 @@
<TextView id="s2" row="0" col="2" textWrap="true" text="border-width: 5; border-color: red red red green;"/>
<TextView id="s3" row="1" col="0" textWrap="true" text="border-width: 5; border-color: red; border-radius: 5;"/>
<TextView id="s4" row="1" col="1" textWrap="true" text="border-width: 5; border-color: red; border-radius: 50;"/>
<TextView id="s5" row="1" col="2" textWrap="true" text="border-width: 5 10 15 20; border-color: red;"/>
<TextView id="s5" row="1" col="2" textWrap="true" text="border-width: 5 10 15 20; border-color: green;"/>
<TextView id="s6" row="2" col="0" textWrap="true" text="border-width: 5; border-color: red green blue yellow;"/>
<TextView id="s7" row="2" col="1" textWrap="true" text="border-width: 5 10 15 20; border-color: red green blue yellow;"/>
<TextView id="s8" row="2" col="2" textWrap="true" text="border-width: 5 10; border-color: red green;"/>