Skip to content

Commit ce01ab5

Browse files
Fix search bar test page and images template test page (NativeScript#4331)
1 parent 97b1cd9 commit ce01ab5

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

apps/app/ui-tests-app/list-view/images-template.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ export function navigatingTo(args: EventData) {
77
}
88

99
export class ImagesTemplateViewModel extends Observable {
10-
11-
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];
10+
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];
1211
constructor() {
1312
super();
14-
1513
}
1614
}

apps/app/ui-tests-app/mainPage.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<Page loaded="pageLoaded">
33
<GridLayout rows="auto, *">
4-
<StackLayout id="parentLayout">
4+
<StackLayout id="parentLayout" row="0" >
55
<TextView automationText="tv" id="textView" text="{{ exampleName }}" />
66
<Button automationText="Run" id="btnRun" text="Run" tap="{{ loadExmaple }}" />
77
</StackLayout>
88
<ScrollView row="1">
99
<WrapLayout id="wrapLayoutWithExamples"/>
1010
</ScrollView>
11-
<ListView items="{{ allExamples }}" row="1" itemTap="{{ loadExampleFromListView }}" id="allExamplesListView">
12-
<ListView.itemTemplate>
13-
<GridLayout columns="*,*">
14-
<Label text="{{ name }}" />
15-
<Label text="{{ path }}" col="1"/>
11+
<ListView items="{{ allExamples }}" row="1" itemTap="{{ loadExampleFromListView }}" id="allExamplesListView" >
12+
<ListView.itemTemplate>
13+
<GridLayout columns="*,2*" >
14+
<Label text="{{ name }}" />
15+
<Label text="{{ path }}" textWrap="true" col="1"/>
1616
</GridLayout>
17-
</ListView.itemTemplate>
17+
</ListView.itemTemplate>
1818
</ListView>
1919
</GridLayout>
2020
</Page>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import * as frame from "tns-core-modules/ui/frame";
2+
3+
export function onNavBtnTap(args) {
4+
frame.topmost().goBack();
5+
}
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<Page >
3+
<Page.actionBar>
4+
<ActionBar title="Searchbar">
5+
<NavigationButton text="Go Back" android.systemIcon="ic_menu_back" tap="onNavBtnTap"/>
6+
</ActionBar>
7+
</Page.actionBar>
38
<StackLayout>
49
<SearchBar id="bg-color" hint="bg-color" text="" textFieldHintColor="green" />
510
<SearchBar class="color" hint="color" text="color" />
6-
<SearchBar hint="Hint Text" id="searchBar" textFieldHintColor="#FFFFFF"
7-
style="color:#FFFFFF;background-color: #795548;height:60" />
11+
<SearchBar hint="Hint Text" id="searchBar" textFieldHintColor="#FFFFFF" style="color:#FFFFFF;background-color: #795548;height:60" />
812
</StackLayout>
913
</Page>

0 commit comments

Comments
 (0)