| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,10 @@ | |||
| 1 | + <Page xmlns="http://schemas.nativescript.org/tns.xsd" backgroundColor="yellow"> | ||
| 2 | + | ||
| 3 | + <ActionBar flat="true" backgroundColor="blue"> | ||
| 4 | + <Label text="flat action bar"></Label> | ||
| 5 | + </ActionBar> | ||
| 6 | + | ||
| 7 | + <StackLayout backgroundColor="red"> | ||
| 8 | + <Label text="lorem ipsum" backgroundColor="green"></Label> | ||
| 9 | + </StackLayout> | ||
| 10 | + </Page> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,10 @@ | |||
| 1 | - <Page xmlns="http://schemas.nativescript.org/tns.xsd"> | ||
| 1 | + <Page xmlns="http://schemas.nativescript.org/tns.xsd" backgroundColor="yellow"> | ||
| 2 | 2 | ||
| 3 | 3 | <ActionBar flat="true" backgroundColor="blue"> | |
| 4 | 4 | <Label text="flat action bar"></Label> | |
| 5 | 5 | </ActionBar> | |
| 6 | 6 | ||
| 7 | - <ScrollView backgroundColor="green"> | ||
| 8 | - <Label text="lorem ipsum" backgroundColor="red"></Label> | ||
| 7 | + <ScrollView backgroundColor="red"> | ||
| 8 | + <Label text="lorem ipsum" backgroundColor="green"></Label> | ||
| 9 | 9 | </ScrollView> | |
| 10 | 10 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + import { EventData } from "tns-core-modules/data/observable"; | ||
| 2 | + import { TabView } from "tns-core-modules/ui/tab-view"; | ||
| 3 | + | ||
| 4 | + export function onLoaded(args: EventData) { | ||
| 5 | + const tabView = <TabView>args.object; | ||
| 6 | + tabView.ios.tabBar.translucent = false; | ||
| 7 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,13 @@ | |||
| 1 | + <Page backgroundColor="yellow"> | ||
| 2 | + <ActionBar flat="true" backgroundColor="blue"> | ||
| 3 | + <Label text="flat action bar"></Label> | ||
| 4 | + </ActionBar> | ||
| 5 | + | ||
| 6 | + <TabView androidTabsPosition="bottom" loaded="onLoaded"> | ||
| 7 | + <TabViewItem title="First"> | ||
| 8 | + <StackLayout backgroundColor="red"> | ||
| 9 | + <Label text="First View" backgroundColor="green"/> | ||
| 10 | + </StackLayout> | ||
| 11 | + </TabViewItem> | ||
| 12 | + </TabView> | ||
| 13 | + </Page> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,13 @@ | |||
| 1 | - <Page xmlns="http://schemas.nativescript.org/tns.xsd"> | ||
| 1 | + <Page xmlns="http://schemas.nativescript.org/tns.xsd" backgroundColor="yellow"> | ||
| 2 | 2 | ||
| 3 | - <ActionBar flat="true"> | ||
| 3 | + <ActionBar flat="true" backgroundColor="blue"> | ||
| 4 | 4 | <Label text="flat action bar"></Label> | |
| 5 | 5 | </ActionBar> | |
| 6 | 6 | ||
| 7 | 7 | <TabView selectedTabTextColor="green"> | |
| 8 | 8 | <TabViewItem title="First"> | |
| 9 | - <GridLayout backgroundColor="red"> | ||
| 10 | - <Button text="test" backgroundColor="yellow"></Button> | ||
| 9 | + <GridLayout backgroundColor="green"> | ||
| 10 | + <Button text="test" backgroundColor="red"></Button> | ||
| 11 | 11 | </GridLayout> | |
| 12 | 12 | </TabViewItem> | |
| 13 | 13 | </TabView> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,11 @@ | |||
| 1 | - <Page navigatedTo="onNavigateTo" > | ||
| 2 | - <Page.actionBar> | ||
| 3 | - <ActionBar title="Flat property"/> | ||
| 4 | - </Page.actionBar> | ||
| 5 | - <StackLayout> | ||
| 1 | + <Page navigatedTo="onNavigateTo" backgroundColor="yellow"> | ||
| 2 | + | ||
| 3 | + <ActionBar backgroundColor="blue"> | ||
| 4 | + <Label text="flat action bar"></Label> | ||
| 5 | + </ActionBar> | ||
| 6 | + | ||
| 7 | + <StackLayout backgroundColor="red"> | ||
| 6 | 8 | <Button margin="30" text="change flat property" tap="changeFlatPropertyValue"/> | |
| 7 | - <Label id="flatPropertyValue" /> | ||
| 9 | + <Label id="flatPropertyValue" backgroundColor="green" /> | ||
| 8 | 10 | </StackLayout> | |
| 9 | 11 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,8 @@ export function loadExamples() { | |||
| 23 | 23 | examples.set("modalShownActBar", "action-bar/modal-test-with-action-bar"); | |
| 24 | 24 | examples.set("flat", "action-bar/flat"); | |
| 25 | 25 | examples.set("flat-tab", "action-bar/flat-tab"); | |
| 26 | + examples.set("flat-tab-opaque-bar", "action-bar/flat-tab-opaque-bar"); | ||
| 27 | + examples.set("flat-layout", "action-bar/flat-layout"); | ||
| 26 | 28 | examples.set("flat-scrollview", "action-bar/flat-scrollview"); | |
| 27 | 29 | ||
| 28 | 30 | return examples; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,6 +7,6 @@ | |||
| 7 | 7 | <GridLayout rows="200, *" backgroundColor="blue"> | |
| 8 | 8 | <GridLayout row="1"> | |
| 9 | 9 | <Frame id="nestedFrame" defaultPage="ui-tests-app/nested-frames/nested-page" actionBarVisibility="never"></Frame> | |
| 10 | - </GridLayout>> | ||
| 10 | + </GridLayout> | ||
| 11 | 11 | </GridLayout> | |
| 12 | 12 | </Page> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,27 +93,13 @@ export class SafeAreaTests extends testModule.UITest<any> { | |||
| 93 | 93 | equal(insets.top, topInset, `${layout}.topInset - actual:${insets.top}; expected: ${topInset}`) | |
| 94 | 94 | } | |
| 95 | 95 | ||
| 96 | - private layout_insets_top_action_bar_flat_test(layout: view.View) { | ||
| 97 | - const insets = layout.getSafeAreaInsets(); | ||
| 98 | - equal(insets.top, 0, `${layout}.topInset - actual:${insets.top}; expected: ${0}`) | ||
| 99 | - } | ||
| 100 | - | ||
| 101 | 96 | private layout_in_full_screen_test(layout: view.View, pageOptions?: helper.PageOptions) { | |
| 102 | - let expectedTop = 0; | ||
| 103 | - if (pageOptions && (pageOptions.actionBarFlat)) { | ||
| 104 | - const app = iosUtils.getter(UIApplication, UIApplication.sharedApplication); | ||
| 105 | - const statusBarHeight = round(dipToDp(app.statusBarFrame.size.height)); | ||
| 106 | - const actionBarHeight = round(dipToDp(layout.page.actionBar.nativeViewProtected.frame.size.height)); | ||
| 107 | - | ||
| 108 | - expectedTop = statusBarHeight + actionBarHeight; | ||
| 109 | - } | ||
| 110 | - | ||
| 111 | 97 | const l = left(layout); | |
| 112 | 98 | const t = top(layout); | |
| 113 | 99 | const r = right(layout); | |
| 114 | 100 | const b = bottom(layout); | |
| 115 | 101 | equal(l, 0, `${layout}.left - actual:${l}; expected: ${0}`); | |
| 116 | - equal(t, expectedTop, `${layout}.top - actual:${t}; expected: ${expectedTop}`); | ||
| 102 | + equal(t, 0, `${layout}.top - actual:${t}; expected: ${0}`); | ||
| 117 | 103 | equal(r, platform.screen.mainScreen.widthPixels, `${layout}.right - actual:${r}; expected: ${platform.screen.mainScreen.widthPixels}`); | |
| 118 | 104 | equal(b, platform.screen.mainScreen.heightPixels, `${layout}.bottom - actual:${b}; expected: ${platform.screen.mainScreen.heightPixels}`); | |
| 119 | 105 | } | |
@@ -193,7 +179,7 @@ export class SafeAreaTests extends testModule.UITest<any> { | |||
| 193 | 179 | this.getViews(snippet), | |
| 194 | 180 | this.noop, | |
| 195 | 181 | ({ root }) => { | |
| 196 | - this.layout_insets_top_action_bar_flat_test(root); | ||
| 182 | + this.layout_insets_top_action_bar_test(root); | ||
| 197 | 183 | }, | |
| 198 | 184 | { actionBarFlat: true } | |
| 199 | 185 | ); | |
@@ -391,7 +377,7 @@ export class SafeAreaTests extends testModule.UITest<any> { | |||
| 391 | 377 | this.getViews(snippet), | |
| 392 | 378 | this.noop, | |
| 393 | 379 | ({ root }) => { | |
| 394 | - this.layout_insets_top_action_bar_flat_test(root); | ||
| 380 | + this.layout_insets_top_action_bar_test(root); | ||
| 395 | 381 | }, | |
| 396 | 382 | { actionBarFlat: true } | |
| 397 | 383 | ); | |
@@ -609,7 +595,7 @@ export class SafeAreaTests extends testModule.UITest<any> { | |||
| 609 | 595 | this.getViews(snippet), | |
| 610 | 596 | this.noop, | |
| 611 | 597 | ({ root }) => { | |
| 612 | - this.layout_insets_top_action_bar_flat_test(root); | ||
| 598 | + this.layout_insets_top_action_bar_test(root); | ||
| 613 | 599 | }, | |
| 614 | 600 | { actionBarFlat: true } | |
| 615 | 601 | ); | |
@@ -903,7 +889,7 @@ export class SafeAreaTests extends testModule.UITest<any> { | |||
| 903 | 889 | this.getViews(snippet), | |
| 904 | 890 | this.noop, | |
| 905 | 891 | ({ root }) => { | |
| 906 | - this.layout_insets_top_action_bar_flat_test(root); | ||
| 892 | + this.layout_insets_top_action_bar_test(root); | ||
| 907 | 893 | }, | |
| 908 | 894 | { actionBarFlat: true } | |
| 909 | 895 | ); | |
@@ -1140,7 +1126,7 @@ export class SafeAreaTests extends testModule.UITest<any> { | |||
| 1140 | 1126 | this.getViews(snippet), | |
| 1141 | 1127 | this.noop, | |
| 1142 | 1128 | ({ root }) => { | |
| 1143 | - this.layout_insets_top_action_bar_flat_test(root); | ||
| 1129 | + this.layout_insets_top_action_bar_test(root); | ||
| 1144 | 1130 | }, | |
| 1145 | 1131 | { actionBarFlat: true } | |
| 1146 | 1132 | ); | |
@@ -1354,7 +1340,7 @@ export class SafeAreaTests extends testModule.UITest<any> { | |||
| 1354 | 1340 | this.getViews(snippet), | |
| 1355 | 1341 | this.noop, | |
| 1356 | 1342 | ({ root }) => { | |
| 1357 | - this.layout_insets_top_action_bar_flat_test(root); | ||
| 1343 | + this.layout_insets_top_action_bar_test(root); | ||
| 1358 | 1344 | }, | |
| 1359 | 1345 | { actionBarFlat: true } | |
| 1360 | 1346 | ); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,20 +47,12 @@ export class ListViewSafeAreaTest extends UITest<ListView> { | |||
| 47 | 47 | }; | |
| 48 | 48 | ||
| 49 | 49 | private list_view_in_full_screen(listView: ListView, pageOptions?: helper.PageOptions) { | |
| 50 | - let expectedTop = 0; | ||
| 51 | - if (pageOptions && pageOptions.actionBarFlat) { | ||
| 52 | - const actionBarHeight = round(dipToDp(listView.page.actionBar.nativeViewProtected.frame.size.height)); | ||
| 53 | - const app = iosUtils.getter(UIApplication, UIApplication.sharedApplication); | ||
| 54 | - const statusBarHeight = round(dipToDp(app.statusBarFrame.size.height)); | ||
| 55 | - expectedTop = actionBarHeight + statusBarHeight; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | 50 | const l = left(listView); | |
| 59 | 51 | const t = top(listView); | |
| 60 | 52 | const r = right(listView); | |
| 61 | 53 | const b = bottom(listView); | |
| 62 | 54 | equal(l, 0, `${listView}.left - actual:${l}; expected: ${0}`); | |
| 63 | - equal(t, expectedTop, `${listView}.top - actual:${t}; expected: ${expectedTop}`); | ||
| 55 | + equal(t, 0, `${listView}.top - actual:${t}; expected: ${0}`); | ||
| 64 | 56 | equal(r, platform.screen.mainScreen.widthPixels, `${listView}.right - actual:${r}; expected: ${platform.screen.mainScreen.widthPixels}`); | |
| 65 | 57 | equal(b, platform.screen.mainScreen.heightPixels, `${listView}.bottom - actual:${b}; expected: ${platform.screen.mainScreen.heightPixels}`); | |
| 66 | 58 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments