mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
Merge pull request #2819 from NativeScript/ui-tests-app
Update border test pages
This commit is contained in:
12
apps/app/ui-tests-app/css/all-non-uniform-border.ts
Normal file
12
apps/app/ui-tests-app/css/all-non-uniform-border.ts
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
<Page>
|
<Page loaded="onLoaded">
|
||||||
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
|
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
|
||||||
<Button class="s0" row="0" col="0" text="Button"/>
|
<Button class="s0" row="0" col="0" text="Button"/>
|
||||||
<Label class="s0" row="0" col="1" text="Label"/>
|
<Label class="s0" row="0" col="1" text="Label"/>
|
||||||
<TextField class="s0" row="0" col="2" text="TextField"/>
|
<TextField class="s0" row="0" col="2" text="TextField"/>
|
||||||
<TextView class="s0" row="1" col="0" text="TextView"/>
|
<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"/>
|
<Switch class="s0" row="1" col="2" checked="true"/>
|
||||||
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
||||||
<Progress class="s0" row="2" col="1" 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"/>
|
<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"/>
|
<ListView class="s0" row="3" col="1" items="ListView"/>
|
||||||
<HtmlView class="s0" row="3" col="2" html="<h1>HtmlView</h1>"/>
|
<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 class="s0" row="4" col="1">
|
||||||
<SegmentedBar.items>
|
<SegmentedBar.items>
|
||||||
<SegmentedBarItem title="SB 1" />
|
<SegmentedBarItem title="SB 1" />
|
||||||
|
12
apps/app/ui-tests-app/css/all-uniform-border.ts
Normal file
12
apps/app/ui-tests-app/css/all-uniform-border.ts
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
<Page>
|
<Page loaded="onLoaded">
|
||||||
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
|
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
|
||||||
<Button class="s0" row="0" col="0" text="Button"/>
|
<Button class="s0" row="0" col="0" text="Button"/>
|
||||||
<Label class="s0" row="0" col="1" text="Label"/>
|
<Label class="s0" row="0" col="1" text="Label"/>
|
||||||
<TextField class="s0" row="0" col="2" text="TextField"/>
|
<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."/>
|
<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"/>
|
<Switch class="s0" row="1" col="2" checked="true"/>
|
||||||
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
||||||
<Progress class="s0" row="2" col="1" 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"/>
|
<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"/>
|
<ListView class="s0" row="3" col="1" items="ListView"/>
|
||||||
<HtmlView class="s0" row="3" col="2" html="<h1>HtmlView</h1>"/>
|
<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 class="s0" row="4" col="1">
|
||||||
<SegmentedBar.items>
|
<SegmentedBar.items>
|
||||||
<SegmentedBarItem title="SB 1" />
|
<SegmentedBarItem title="SB 1" />
|
||||||
|
@ -25,7 +25,7 @@ TextView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#s5 {
|
#s5 {
|
||||||
border-width: 6 5 5 5; border-color: green;
|
border-width: 5 10 15 20; border-color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
#s6 {
|
#s6 {
|
||||||
|
@ -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="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="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="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="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="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;"/>
|
<TextView id="s8" row="2" col="2" textWrap="true" text="border-width: 5 10; border-color: red green;"/>
|
||||||
|
Reference in New Issue
Block a user