Options for specifying Selected Icon and Selected Color are not working. Instead of setting the color the size of the text increases slightly when selected. This works correctly on iOS.
component: {
name: 'name',
options: {
bottomTab: {
fontSize: 12,
text: 'Tab',
icon: require('./assets/img/blah.png'),
selectedIconColor: 'black',
selectedTextColor: 'blue',
},
}
},
Move bottomTabs option to stack (stack.options) should help
ohh bottomTabs with a plural not bottomTab?
@Varnius no, I mean move options from component to stack like this, we have same issue with android and this help
```
root: {
bottomTabs: {
children: [
{
stack: {
children: [
{
component: {
name: SCREENS.main.home,
},
},
],
options: {
bottomTab: {
selectedIconColor: colors.secondary,
icon: iconHome,
},
},
},
},
@matpaul What version are you using? My code has options inside stack like yours but still not working.
@matpaul that fixed it for me! Thanks 馃檪
@minhloi latest 2.1.3 snapshot
I have the same problem,selected icon color is working from default configuration but not the selected icon in individual tabs.. I am using "latest" in my package.json
Thoughts?
stack: {
id: 'dfs_SCREEN',
children: [
{
component: {
name: dfs_SCREEN,
passProps: {
text: 'This is tab 1',
myFunction: () => 'Hello from a function!'
},
options: {
topBar: {
title: {
text: 'dfs'
}
},
bottomTab: {
text: 'dfs',
icon: constants.lockIcon,
selectedIcon: constants.lockIconSelected,
testID: dfs_SCREEN
}
}
}
}
]
}
},
@trialsNow as i write above, we move options.bottomTab to stack obj
So it should be stack.options.bottomTab
The selectedIconColor works but the selectedIcon does not work. I just checked there is a pull request to fix that bug that haven't merged yet. Pull request #3785
@minhloi Thanks. Makes sense. Seeing exactly the same thing
One more question.. in android the status bar is filled white in color (i mean the layout color) and if i touch it it shows status icon. What style needs to be set to show status icons always?
statusBar: {
style: "dark" // This will makes the status icon black
}
Closing as OP fixed his issue.
@ItsNoHax
Closing as OP fixed his issue.
WHO IS OP and how did he fix his issue?
Most helpful comment
@Varnius no, I mean move options from component to stack like this, we have same issue with android and this help
```
root: {
bottomTabs: {
children: [
{
stack: {
children: [
{
component: {
name: SCREENS.main.home,
},
},
],
options: {
bottomTab: {
selectedIconColor: colors.secondary,
icon: iconHome,
},
},
},
},