Open alexbepple opened 8 years ago
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.)
However, this is not:
<TabLayout style={{flex: 1}}> <Tab> <Icon name='view-headline' size={24} /> </Tab> </TabLayout>
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.
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
This is rendering fine:
(I used the custom_icon from your example project.)
However, this is not:
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.