mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge pull request #1466 from NativeScript/tab-fix
wrong for loop count fixed
This commit is contained in:
@@ -209,6 +209,8 @@
|
|||||||
<Content Include="apps\ui-tests-app\css\decoration-transform-formattedtext.xml" />
|
<Content Include="apps\ui-tests-app\css\decoration-transform-formattedtext.xml" />
|
||||||
<Content Include="apps\ui-tests-app\css\text-decoration.xml" />
|
<Content Include="apps\ui-tests-app\css\text-decoration.xml" />
|
||||||
<Content Include="apps\ui-tests-app\css\text-transform.xml" />
|
<Content Include="apps\ui-tests-app\css\text-transform.xml" />
|
||||||
|
<Content Include="apps\ui-tests-app\css\tab-view.xml" />
|
||||||
|
<Content Include="apps\ui-tests-app\css\text.css" />
|
||||||
<Content Include="apps\ui-tests-app\css\white-space.xml">
|
<Content Include="apps\ui-tests-app\css\white-space.xml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
@@ -2153,7 +2155,7 @@
|
|||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
</WebProjectProperties>
|
</WebProjectProperties>
|
||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
<UserProperties ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" />
|
<UserProperties ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
||||||
42
apps/ui-tests-app/css/tab-view.xml
Normal file
42
apps/ui-tests-app/css/tab-view.xml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<Page cssFile="~/css/text.css">
|
||||||
|
<TabView>
|
||||||
|
<TabView.items>
|
||||||
|
|
||||||
|
<TabViewItem title="Tab 1">
|
||||||
|
<TabViewItem.view>
|
||||||
|
<Label text="Label 1" />
|
||||||
|
</TabViewItem.view>
|
||||||
|
</TabViewItem>
|
||||||
|
|
||||||
|
<TabViewItem title="Tab 2">
|
||||||
|
<TabViewItem.view>
|
||||||
|
<Label text="Label 2" />
|
||||||
|
</TabViewItem.view>
|
||||||
|
</TabViewItem>
|
||||||
|
|
||||||
|
<TabViewItem title="Tab 3">
|
||||||
|
<TabViewItem.view>
|
||||||
|
<Label text="Label 3" />
|
||||||
|
</TabViewItem.view>
|
||||||
|
</TabViewItem>
|
||||||
|
|
||||||
|
<TabViewItem title="Tab 4">
|
||||||
|
<TabViewItem.view>
|
||||||
|
<Label text="Label 4" />
|
||||||
|
</TabViewItem.view>
|
||||||
|
</TabViewItem>
|
||||||
|
|
||||||
|
<TabViewItem title="Tab 5">
|
||||||
|
<TabViewItem.view>
|
||||||
|
<Label text="Label 5" />
|
||||||
|
</TabViewItem.view>
|
||||||
|
</TabViewItem>
|
||||||
|
<TabViewItem title="Tab 6">
|
||||||
|
<TabViewItem.view>
|
||||||
|
<Label text="Label 6" />
|
||||||
|
</TabViewItem.view>
|
||||||
|
</TabViewItem>
|
||||||
|
|
||||||
|
</TabView.items>
|
||||||
|
</TabView>
|
||||||
|
</Page>
|
||||||
3
apps/ui-tests-app/css/text.css
Normal file
3
apps/ui-tests-app/css/text.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
TabView{
|
||||||
|
font-size:10;
|
||||||
|
}
|
||||||
@@ -333,7 +333,7 @@ export class TabView extends common.TabView {
|
|||||||
tabBar.tintColor = this.selectedColor ? this.selectedColor.ios : null;
|
tabBar.tintColor = this.selectedColor ? this.selectedColor.ios : null;
|
||||||
var states = getTitleAttributesForStates(this);
|
var states = getTitleAttributesForStates(this);
|
||||||
|
|
||||||
for (var i = 0; i < this.items.length; i++) {
|
for (var i = 0; i < tabBar.items.count; i++) {
|
||||||
var item = <UITabBarItem>tabBar.items[i];
|
var item = <UITabBarItem>tabBar.items[i];
|
||||||
item.setTitleTextAttributesForState(states.normalState, UIControlState.UIControlStateNormal);
|
item.setTitleTextAttributesForState(states.normalState, UIControlState.UIControlStateNormal);
|
||||||
item.setTitleTextAttributesForState(states.selectedState, UIControlState.UIControlStateSelected);
|
item.setTitleTextAttributesForState(states.selectedState, UIControlState.UIControlStateSelected);
|
||||||
|
|||||||
Reference in New Issue
Block a user