BIN
apps/app/App_Resources/Android/drawable-hdpi/add_to_fav.png
Normal file
|
After Width: | Height: | Size: 915 B |
BIN
apps/app/App_Resources/Android/drawable-mdpi/add_to_fav.png
Normal file
|
After Width: | Height: | Size: 669 B |
BIN
apps/app/App_Resources/Android/drawable-xhdpi/add_to_fav.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
apps/app/App_Resources/Android/drawable-xxhdpi/add_to_fav.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
apps/app/App_Resources/Android/drawable-xxxhdpi/add_to_fav.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
apps/app/App_Resources/iOS/add_to_fav.png
Normal file
|
After Width: | Height: | Size: 669 B |
BIN
apps/app/App_Resources/iOS/add_to_fav@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
apps/app/App_Resources/iOS/add_to_fav@3x.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
apps/app/App_Resources/iOS/icon.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
apps/app/App_Resources/iOS/icon@2x.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
apps/app/App_Resources/iOS/icon@3x.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
@@ -18,6 +18,7 @@ export function pageLoaded(args: EventData) {
|
||||
examples.set("tabStyle", "tab-view/all");
|
||||
examples.set("tabmore", "tab-view/tab-view-more");
|
||||
examples.set("tabViewCss", "tab-view/tab-view-css");
|
||||
examples.set("tab-view-icons", "tab-view/tab-view-icon");
|
||||
|
||||
let viewModel = new SubMainPageViewModel(wrapLayout, examples);
|
||||
page.bindingContext = viewModel;
|
||||
|
||||
14
apps/app/ui-tests-app/tab-view/tab-view-icon.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { EventData } from "data/observable";
|
||||
import { Button } from "ui/button";
|
||||
import { TabView } from "ui/tab-view";
|
||||
|
||||
let iconModes = ["automatic", "alwaysOriginal", "alwaysTemplate", undefined];
|
||||
|
||||
export function onChangeRenderingMode(args: EventData){
|
||||
let button = (<Button>args.object);
|
||||
let tabView = button.page.getViewById<TabView>("tab-view");
|
||||
tabView.iosIconRenderingMode = iconModes[(iconModes.indexOf(tabView.iosIconRenderingMode) + 1) % iconModes.length];
|
||||
for(let i = 0, length = tabView.items.length; i < length; i++){
|
||||
(<Button>tabView.items[i].view).text = "" + tabView.iosIconRenderingMode;
|
||||
}
|
||||
}
|
||||
26
apps/app/ui-tests-app/tab-view/tab-view-icon.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<TabView id="tab-view" tabTextColor="green" selectedTabTextColor="red" tabBackgroundColor="yellow">
|
||||
<TabView.items>
|
||||
<TabViewItem iconSource="res://icon">
|
||||
<TabViewItem.view>
|
||||
<Button text="undefined" tap="onChangeRenderingMode"/>
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem iconSource="res://add_to_fav">
|
||||
<TabViewItem.view>
|
||||
<Button text="undefined" tap="onChangeRenderingMode"/>
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem iconSource="res://icon" title="NativeScript">
|
||||
<TabViewItem.view>
|
||||
<Button text="undefined" tap="onChangeRenderingMode"/>
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem iconSource="res://add_to_fav" title="Favorites">
|
||||
<TabViewItem.view>
|
||||
<Button text="undefined" tap="onChangeRenderingMode"/>
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
</TabView.items>
|
||||
</TabView>
|
||||
</Page>
|
||||