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 show on Android #2038

Closed
jonathanroze opened this issue Jul 15, 2017 · 8 comments
Closed

Icon not show on Android #2038

jonathanroze opened this issue Jul 15, 2017 · 8 comments

Comments

@jonathanroze
Copy link

jonathanroze commented Jul 15, 2017

Hi,

I have create an app with a tabbbar, on IOS everything works, icon are print but on Android only texts are print !

Do you have any idea ? And do you know how can i hide text on tabs ?

Thanks

@aksonov
Copy link
Owner

aksonov commented Jul 15, 2017

RNRF is just wrapper around ReactNavigation. Please check ReactNavigation first and make sure that your icons are displayed there.

@jonathanroze
Copy link
Author

Yes i know it, i've tried with pure ReactNavigation and it's working ! With RNRF it's not working ! , It's working on IOS but not on ANDROID.

IOS :

capture d ecran 2017-07-15 a 15 32 49

ANDROID :

capture d ecran 2017-07-15 a 15 33 01

CODE :

import React from 'react'
import { View } from 'react-native';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import Reducers from '@Redux/Reducers';
import scenes from '@scenes';
import { Actions, Scene, Router,ActionConst } from 'react-native-router-flux';
import IconMaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import {ORANGE} from '@Theme/colors'
import {
  Login,
  Home,
  Events,
  EventDetail,
  CreateEvent,
  Messages,
  Notifications,
  PrivateProfil,

} from '@Pages';

const tabbarConfigStyle= {
      height: 60,
      backgroundColor: '#ECF0F1',
      borderColor: '#ECF0F1',
};

const iconHome = (navigation) => (<IconMaterialCommunityIcons size={25} color={navigation.tintColor} name="map-marker" />)
const iconNotifications = (navigation) => (<IconMaterialCommunityIcons size={25} color={navigation.tintColor} name="map-marker" />)
const iconEvents = (navigation) => (<IconMaterialCommunityIcons size={25} color={navigation.tintColor} name="map-marker" />)
const iconMessages = (navigation) => (<IconMaterialCommunityIcons size={25} color={navigation.tintColor} name="map-marker" />)
const iconProfil = (navigation) => (<IconMaterialCommunityIcons size={25} color={navigation.tintColor} name="map-marker" />)


const Kernel = () => (
  <Provider store={createStore(Reducers)}>
  <Router>
    <Scene key="app" hideNavBar>

      <Scene key="login" initial hideNavBar>
        <Scene key="welcome" component={Login} />
      </Scene>

      <Scene key="PrivateProfil" mode="modal" modal direction="vertical" component={PrivateProfil} title="MyProfil"  />

      <Scene key="inapp"
      panHandlers={null}
      tabBarStyle={tabbarConfigStyle}
      showLabel={false}
      activeTintColor={ORANGE}
      tabBar
      tabs>

        <Scene key="Home" tabBarIcon={iconHome}>
            <Scene key="Home" component={Home} header={null} title="Home" />
        </Scene>

        <Scene key="Notifications" icon={iconNotifications} component={Notifications} title="Notifications"  />

        <Scene key="Events" tabBarIcon={iconEvents} >
          <Scene key="Events" component={Events} title="Events" />
          <Scene key="CreateEvent" component={CreateEvent} title="CreateEvent" />
          <Scene key="EventDetail" component={EventDetail} title="EventDetail" />
        </Scene>

        <Scene key="Messages" icon={iconMessages} component={Messages} title="Messages"  />
      </Scene>
      
    </Scene>
  </Router>
  </Provider>
)

export default Kernel

@aksonov
Copy link
Owner

aksonov commented Jul 15, 2017 via email

@aksonov
Copy link
Owner

aksonov commented Jul 16, 2017

Sorry, I'm actively looking for Android contributor right now because I'm working on iOS app only.

@aksonov
Copy link
Owner

aksonov commented Jul 19, 2017

Closing because I didn't received forked Example to reproduce issue.

@aksonov aksonov closed this as completed Jul 19, 2017
@rgchua
Copy link

rgchua commented Aug 10, 2017

@Clowning Please add showIcon={true} to your tabBar. RNRF v4 is built on top of react-navigation, do check their docs for the props.

@waqas19921
Copy link

@rgchua your solution done the trick

@susegroj
Copy link

I have the same issue but the oposite, for me is not working on iOS :( Does anyone why? I tried showIcon={true} with no success. For Android is looking good.

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

5 participants