Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon not rendering with only icons from oblador/react-native-vector-icons #15

Open
alexbepple opened this issue Feb 29, 2016 · 1 comment

Comments

@alexbepple
Copy link

This is rendering fine:

import Icon from 'react-native-vector-icons/MaterialIcons'
…
<TabLayout style={{flex: 1}}>
  <Tab>
    <Icon name='view-headline' size={24} />
  </Tab>
  <Tab iconSize={24} iconResId='custom_icon' />
</TabLayout>

(I used the custom_icon from your example project.)

screen shot 2016-02-29 at 12 19 18

However, this is not:

<TabLayout style={{flex: 1}}>
  <Tab>
    <Icon name='view-headline' size={24} />
  </Tab>
</TabLayout>

screen shot 2016-02-29 at 12 23 52

Do you have any idea as to why? I read your todo ("custom views need a width and height to work"). But no amount of width and height properties on TabLayout, Tab or Icon did help.

@alexbepple
Copy link
Author

A workaround is to use to provide an iconUri as shown in https://github.com/AlbertBrand/react-native-android-tablayout-example/blob/master/app/IconsOnTopTabLayout.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant