Fix search bar test page and images template test page (#4331)

This commit is contained in:
SvetoslavTsenov
2017-06-07 14:02:51 +03:00
committed by GitHub
parent 97b1cd9060
commit ce01ab597f
4 changed files with 19 additions and 12 deletions

View File

@ -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();
} }
} }

View File

@ -1,20 +1,20 @@
<?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>
</GridLayout> </GridLayout>
</Page> </Page>

View File

@ -0,0 +1,5 @@
import * as frame from "tns-core-modules/ui/frame";
export function onNavBtnTap(args) {
frame.topmost().goBack();
}

View File

@ -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>