mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Fix search bar test page and images template test page (#4331)
This commit is contained in:
@ -7,10 +7,8 @@ export function navigatingTo(args: EventData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ImagesTemplateViewModel extends Observable {
|
export class ImagesTemplateViewModel extends Observable {
|
||||||
|
public items: Array<string> = ["res://icon", null, "~/ui-tests-app/resources/images/no-image.png", null, "~/ui-tests-app/resources/images/no-image.png", null, "res://icon", null];
|
||||||
public items: Array<string> = ["res://icon", null, "~/ui-tests-app/resources/images/no-image.png", null, "~/ui-tests-app/resources/images/git no-image.png", null, "res://icon", null];
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,18 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<Page loaded="pageLoaded">
|
<Page loaded="pageLoaded">
|
||||||
<GridLayout rows="auto, *">
|
<GridLayout rows="auto, *">
|
||||||
<StackLayout id="parentLayout">
|
<StackLayout id="parentLayout" row="0" >
|
||||||
<TextView automationText="tv" id="textView" text="{{ exampleName }}" />
|
<TextView automationText="tv" id="textView" text="{{ exampleName }}" />
|
||||||
<Button automationText="Run" id="btnRun" text="Run" tap="{{ loadExmaple }}" />
|
<Button automationText="Run" id="btnRun" text="Run" tap="{{ loadExmaple }}" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
<ScrollView row="1">
|
<ScrollView row="1">
|
||||||
<WrapLayout id="wrapLayoutWithExamples"/>
|
<WrapLayout id="wrapLayoutWithExamples"/>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<ListView items="{{ allExamples }}" row="1" itemTap="{{ loadExampleFromListView }}" id="allExamplesListView">
|
<ListView items="{{ allExamples }}" row="1" itemTap="{{ loadExampleFromListView }}" id="allExamplesListView" >
|
||||||
<ListView.itemTemplate>
|
<ListView.itemTemplate>
|
||||||
<GridLayout columns="*,*">
|
<GridLayout columns="*,2*" >
|
||||||
<Label text="{{ name }}" />
|
<Label text="{{ name }}" />
|
||||||
<Label text="{{ path }}" col="1"/>
|
<Label text="{{ path }}" textWrap="true" col="1"/>
|
||||||
</GridLayout>
|
</GridLayout>
|
||||||
</ListView.itemTemplate>
|
</ListView.itemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
|
5
apps/app/ui-tests-app/search-bar/issue-4147.ts
Normal file
5
apps/app/ui-tests-app/search-bar/issue-4147.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import * as frame from "tns-core-modules/ui/frame";
|
||||||
|
|
||||||
|
export function onNavBtnTap(args) {
|
||||||
|
frame.topmost().goBack();
|
||||||
|
}
|
@ -1,9 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<Page >
|
<Page >
|
||||||
|
<Page.actionBar>
|
||||||
|
<ActionBar title="Searchbar">
|
||||||
|
<NavigationButton text="Go Back" android.systemIcon="ic_menu_back" tap="onNavBtnTap"/>
|
||||||
|
</ActionBar>
|
||||||
|
</Page.actionBar>
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<SearchBar id="bg-color" hint="bg-color" text="" textFieldHintColor="green" />
|
<SearchBar id="bg-color" hint="bg-color" text="" textFieldHintColor="green" />
|
||||||
<SearchBar class="color" hint="color" text="color" />
|
<SearchBar class="color" hint="color" text="color" />
|
||||||
<SearchBar hint="Hint Text" id="searchBar" textFieldHintColor="#FFFFFF"
|
<SearchBar hint="Hint Text" id="searchBar" textFieldHintColor="#FFFFFF" style="color:#FFFFFF;background-color: #795548;height:60" />
|
||||||
style="color:#FFFFFF;background-color: #795548;height:60" />
|
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</Page>
|
</Page>
|
Reference in New Issue
Block a user