mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: android Tabs selected item color incorrectly applied (#9040)
* fix: selected-item-color gets applied to wrong TabStripItems * chore: Added selection colors to 2 ui examples. * chore: Removing used for testing.
This commit is contained in:
committed by
GitHub
parent
e16bc606ef
commit
b47ce0a97c
15
apps/ui/src/tabs/swipe-disabled-page.ts
Normal file
15
apps/ui/src/tabs/swipe-disabled-page.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { EventData, Page, Tabs } from '@nativescript/core';
|
||||
|
||||
export function goToFirst(args: EventData) {
|
||||
console.log('---> goToFirst');
|
||||
const page = <Page>(<any>args.object).page;
|
||||
const tabsNav = <Tabs>page.getViewById('tabs');
|
||||
tabsNav.selectedIndex = 0;
|
||||
}
|
||||
|
||||
export function goToSecond(args: EventData) {
|
||||
console.log('---> goToSecond');
|
||||
const page = <Page>(<any>args.object).page;
|
||||
const tabsNav = <Tabs>page.getViewById('tabs');
|
||||
tabsNav.selectedIndex = 1;
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
</ActionBar>
|
||||
|
||||
<Tabs id="tabs" swipeEnabled="false" automationText="tabNavigation" >
|
||||
<TabStrip>
|
||||
<TabStrip selectedItemColor="red" unSelectedItemColor="black">
|
||||
<TabStripItem title="First Tab 11" iconSource="res://icon"></TabStripItem>
|
||||
<TabStripItem>
|
||||
<!-- <Image src="res://icon" /> -->
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</ActionBar>
|
||||
|
||||
<Tabs id="tabs" tabsPosition="bottom" automationText="tabNavigation" >
|
||||
<TabStrip>
|
||||
<TabStrip selectedItemColor="blue" unSelectedItemColor="gray">
|
||||
<TabStripItem title="First Tab 11" iconSource="res://icon"></TabStripItem>
|
||||
<TabStripItem>
|
||||
<!-- <Image src="res://icon" /> -->
|
||||
|
||||
Reference in New Issue
Block a user