mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +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 {
|
||||
|
||||
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];
|
||||
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];
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
}
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Page loaded="pageLoaded">
|
||||
<GridLayout rows="auto, *">
|
||||
<StackLayout id="parentLayout">
|
||||
<StackLayout id="parentLayout" row="0" >
|
||||
<TextView automationText="tv" id="textView" text="{{ exampleName }}" />
|
||||
<Button automationText="Run" id="btnRun" text="Run" tap="{{ loadExmaple }}" />
|
||||
</StackLayout>
|
||||
<ScrollView row="1">
|
||||
<WrapLayout id="wrapLayoutWithExamples"/>
|
||||
</ScrollView>
|
||||
<ListView items="{{ allExamples }}" row="1" itemTap="{{ loadExampleFromListView }}" id="allExamplesListView">
|
||||
<ListView.itemTemplate>
|
||||
<GridLayout columns="*,*">
|
||||
<Label text="{{ name }}" />
|
||||
<Label text="{{ path }}" col="1"/>
|
||||
<ListView items="{{ allExamples }}" row="1" itemTap="{{ loadExampleFromListView }}" id="allExamplesListView" >
|
||||
<ListView.itemTemplate>
|
||||
<GridLayout columns="*,2*" >
|
||||
<Label text="{{ name }}" />
|
||||
<Label text="{{ path }}" textWrap="true" col="1"/>
|
||||
</GridLayout>
|
||||
</ListView.itemTemplate>
|
||||
</ListView.itemTemplate>
|
||||
</ListView>
|
||||
</GridLayout>
|
||||
</Page>
|
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" ?>
|
||||
<Page >
|
||||
<Page.actionBar>
|
||||
<ActionBar title="Searchbar">
|
||||
<NavigationButton text="Go Back" android.systemIcon="ic_menu_back" tap="onNavBtnTap"/>
|
||||
</ActionBar>
|
||||
</Page.actionBar>
|
||||
<StackLayout>
|
||||
<SearchBar id="bg-color" hint="bg-color" text="" textFieldHintColor="green" />
|
||||
<SearchBar class="color" hint="color" text="color" />
|
||||
<SearchBar hint="Hint Text" id="searchBar" textFieldHintColor="#FFFFFF"
|
||||
style="color:#FFFFFF;background-color: #795548;height:60" />
|
||||
<SearchBar hint="Hint Text" id="searchBar" textFieldHintColor="#FFFFFF" style="color:#FFFFFF;background-color: #795548;height:60" />
|
||||
</StackLayout>
|
||||
</Page>
|
Reference in New Issue
Block a user