| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ function _createContentItems(count: number): Array<TabContentItem> { | |||
| 23 | 23 | const label = new Label(); | |
| 24 | 24 | label.text = "Tab " + i; | |
| 25 | 25 | const tabEntry = new TabContentItem(); | |
| 26 | - tabEntry.view = label; | ||
| 26 | + tabEntry.content = label; | ||
| 27 | 27 | items.push(tabEntry); | |
| 28 | 28 | } | |
| 29 | 29 | ||
@@ -101,12 +101,12 @@ export function testBackNavigationToTabViewWithNestedFramesShouldWork() { | |||
| 101 | 101 | let items = Array<TabContentItem>(); | |
| 102 | 102 | let tabViewitem = new TabContentItem(); | |
| 103 | 103 | // tabViewitem.title = "Item1"; | |
| 104 | - tabViewitem.view = _createFrameView(); | ||
| 104 | + tabViewitem.content = _createFrameView(); | ||
| 105 | 105 | items.push(tabViewitem); | |
| 106 | 106 | ||
| 107 | 107 | let tabViewitem2 = new TabContentItem(); | |
| 108 | 108 | // tabViewitem2.title = "Item2"; | |
| 109 | - tabViewitem2.view = _createFrameView(); | ||
| 109 | + tabViewitem2.content = _createFrameView(); | ||
| 110 | 110 | items.push(tabViewitem2); | |
| 111 | 111 | ||
| 112 | 112 | tabView.items = items; | |
@@ -145,7 +145,7 @@ export function testWhenNavigatingBackToANonCachedPageContainingATabViewWithALis | |||
| 145 | 145 | let items = Array<TabContentItem>(); | |
| 146 | 146 | let tabViewitem = new TabContentItem(); | |
| 147 | 147 | // tabViewitem.title = "List"; | |
| 148 | - tabViewitem.view = _createListView(); | ||
| 148 | + tabViewitem.content = _createListView(); | ||
| 149 | 149 | items.push(tabViewitem); | |
| 150 | 150 | ||
| 151 | 151 | let label = new Label(); | |
@@ -155,7 +155,7 @@ export function testWhenNavigatingBackToANonCachedPageContainingATabViewWithALis | |||
| 155 | 155 | aboutLayout.addChild(label); | |
| 156 | 156 | tabViewitem = new TabContentItem(); | |
| 157 | 157 | // tabViewitem.title = "About"; | |
| 158 | - tabViewitem.view = aboutLayout; | ||
| 158 | + tabViewitem.content = aboutLayout; | ||
| 159 | 159 | items.push(tabViewitem); | |
| 160 | 160 | ||
| 161 | 161 | tabView.items = items; | |
@@ -184,7 +184,7 @@ export function testWhenNavigatingBackToANonCachedPageContainingATabViewWithALis | |||
| 184 | 184 | ||
| 185 | 185 | TKUnit.waitUntilReady(() => topFrame.currentPage === rootPage); | |
| 186 | 186 | ||
| 187 | - TKUnit.assert(tabView.items[0].view instanceof ListView, "ListView should be created when navigating back to the main page."); | ||
| 187 | + TKUnit.assert(tabView.items[0].content instanceof ListView, "ListView should be created when navigating back to the main page."); | ||
| 188 | 188 | } | |
| 189 | 189 | ||
| 190 | 190 | function tabViewIsFullyLoaded(tabView: BottomNavigation): boolean { | |
@@ -232,8 +232,8 @@ export function testLoadedAndUnloadedAreFired_WhenNavigatingAwayAndBack() { | |||
| 232 | 232 | } | |
| 233 | 233 | ||
| 234 | 234 | tabView.items.forEach((item, i) => { | |
| 235 | - item.view.on("loaded", createLoadedFor(i)); | ||
| 236 | - item.view.on("unloaded", createUnloadedFor(i)); | ||
| 235 | + item.content.on("loaded", createLoadedFor(i)); | ||
| 236 | + item.content.on("unloaded", createUnloadedFor(i)); | ||
| 237 | 237 | }); | |
| 238 | 238 | ||
| 239 | 239 | const tabViewPage = new Page(); | |
@@ -252,8 +252,8 @@ export function testLoadedAndUnloadedAreFired_WhenNavigatingAwayAndBack() { | |||
| 252 | 252 | TKUnit.assertEqual(topFrame.currentPage, tabViewPage); | |
| 253 | 253 | ||
| 254 | 254 | for (let i = 0; i < itemCount; i++) { | |
| 255 | - tabView.items[i].view.off("loaded"); | ||
| 256 | - tabView.items[i].view.off("unloaded"); | ||
| 255 | + tabView.items[i].content.off("loaded"); | ||
| 256 | + tabView.items[i].content.off("unloaded"); | ||
| 257 | 257 | } | |
| 258 | 258 | ||
| 259 | 259 | helper.goBack(); | |
@@ -267,7 +267,7 @@ export function testLoadedAndUnloadedAreFired_WhenNavigatingAwayAndBack() { | |||
| 267 | 267 | ||
| 268 | 268 | function _clickTheFirstButtonInTheListViewNatively(tabView: BottomNavigation) { | |
| 269 | 269 | if (tabView.android) { | |
| 270 | - const androidListView = <android.widget.ListView>tabView.items[0].view.nativeView; | ||
| 270 | + const androidListView = <android.widget.ListView>tabView.items[0].content.nativeView; | ||
| 271 | 271 | // var viewPager: android.support.v4.view.ViewPager = (<any>tabView)._viewPager; | |
| 272 | 272 | // var androidListView = <android.widget.ListView>viewPager.getChildAt(0); | |
| 273 | 273 | var stackLayout = <org.nativescript.widgets.StackLayout>androidListView.getChildAt(0); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,7 +47,7 @@ function createFrame(i: number, page: Page) { | |||
| 47 | 47 | function createTabItem(i: number, frame: Frame) { | |
| 48 | 48 | const tabEntry = new TabContentItem(); | |
| 49 | 49 | // tabEntry.title = "Tab " + i; | |
| 50 | - tabEntry.view = frame; | ||
| 50 | + tabEntry.content = frame; | ||
| 51 | 51 | tabEntry["index"] = i; | |
| 52 | 52 | ||
| 53 | 53 | return tabEntry; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ export class BottomNavigationTest extends UITest<BottomNavigation> { | |||
| 27 | 27 | const label = new Label(); | |
| 28 | 28 | label.text = "Tab " + i; | |
| 29 | 29 | const tabEntry = new TabContentItem(); | |
| 30 | - tabEntry.view = label; | ||
| 30 | + tabEntry.content = label; | ||
| 31 | 31 | items.push(tabEntry); | |
| 32 | 32 | } | |
| 33 | 33 | ||
@@ -208,7 +208,7 @@ export class BottomNavigationTest extends UITest<BottomNavigation> { | |||
| 208 | 208 | TKUnit.assertThrows(() => { | |
| 209 | 209 | let item = new TabContentItem(); | |
| 210 | 210 | // item.title = "Tab 0"; | |
| 211 | - item.view = undefined; | ||
| 211 | + item.content = undefined; | ||
| 212 | 212 | tabView.items = [item]; | |
| 213 | 213 | ||
| 214 | 214 | }, "Binding TabNavigation to a TabItem with undefined view should throw."); | |
@@ -221,7 +221,7 @@ export class BottomNavigationTest extends UITest<BottomNavigation> { | |||
| 221 | 221 | TKUnit.assertThrows(() => { | |
| 222 | 222 | let item = new TabContentItem(); | |
| 223 | 223 | // item.title = "Tab 0"; | |
| 224 | - item.view = null; | ||
| 224 | + item.content = null; | ||
| 225 | 225 | tabView.items = [item]; | |
| 226 | 226 | ||
| 227 | 227 | }, "Binding TabNavigation to a TabItem with null view should throw."); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,7 +35,7 @@ function createFrame(i: number, page: Page) { | |||
| 35 | 35 | function createTabItem(i: number, frame: Frame) { | |
| 36 | 36 | const tabEntry = new TabContentItem(); | |
| 37 | 37 | // tabEntry.title = "Tab " + i; | |
| 38 | - tabEntry.view = frame; | ||
| 38 | + tabEntry.content = frame; | ||
| 39 | 39 | tabEntry["index"] = i; | |
| 40 | 40 | ||
| 41 | 41 | return tabEntry; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ export class TabsTest extends UITest<Tabs> { | |||
| 27 | 27 | const label = new Label(); | |
| 28 | 28 | label.text = "Tab " + i; | |
| 29 | 29 | const tabEntry = new TabContentItem(); | |
| 30 | - tabEntry.view = label; | ||
| 30 | + tabEntry.content = label; | ||
| 31 | 31 | items.push(tabEntry); | |
| 32 | 32 | } | |
| 33 | 33 | ||
@@ -210,7 +210,7 @@ export class TabsTest extends UITest<Tabs> { | |||
| 210 | 210 | TKUnit.assertThrows(() => { | |
| 211 | 211 | let item = new TabContentItem(); | |
| 212 | 212 | // item.title = "Tab 0"; | |
| 213 | - item.view = undefined; | ||
| 213 | + item.content = undefined; | ||
| 214 | 214 | tabView.items = [item]; | |
| 215 | 215 | ||
| 216 | 216 | }, "Binding TabNavigation to a TabItem with undefined view should throw."); | |
@@ -223,7 +223,7 @@ export class TabsTest extends UITest<Tabs> { | |||
| 223 | 223 | TKUnit.assertThrows(() => { | |
| 224 | 224 | let item = new TabContentItem(); | |
| 225 | 225 | // item.title = "Tab 0"; | |
| 226 | - item.view = null; | ||
| 226 | + item.content = null; | ||
| 227 | 227 | tabView.items = [item]; | |
| 228 | 228 | ||
| 229 | 229 | }, "Binding TabNavigation to a TabItem with null view should throw."); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments