junedomingo / movieapp

Discover Movies and TV shows - React Native
MIT License
1.82k stars 473 forks source link

Adding Tabs to Android App - Freezes the app in release mode #9

Open dhammikab opened 7 years ago

dhammikab commented 7 years ago

Thanks for the lovely app.

I have tried to make a small change to your app by adding tabs for Andorid and noticed that while the app works perfectly in DEV mode, the app freezes when built and run on a device in release mode.

I am not sure where the defect is. i.e. The code that I added or the react-native-navigation library that was used for the tabs etc. So I thought I will start with this project and then make a request to react-native-navigation in case you feel the issue is not related to this project.

Here is what I have done to reproduce the issue:

  1. Clone MovieApp project
  2. Comment out startSingleScreenApp and Add code to start as tabs app: (as Follows)

/ Navigation.startSingleScreenApp({ screen: { screen: 'movieapp.Movies', title: 'Movies', navigatorStyle }, drawer: { left: { screen: 'movieapp.Drawer' } } }); /

const createTabs = () => { let tabs = [ { label: 'Movies', screen: 'movieapp.Movies', icon: require('./img/movies.png'), title: 'Movies' }, { label: 'TV Shows', screen: 'movieapp.Movies', icon: require('./img/tvshow.png'), title: 'TV Shows',

}

];

return tabs; }; // this will start our app Navigation.startTabBasedApp({ tabs: createTabs(), appStyle: { tabBarBackgroundColor: '#0f2362', tabBarButtonColor: '#ffffff', tabBarSelectedButtonColor: '#63d7cc' }

  1. Build in release mode and deploy to device.

Whats strange is that if you build in dev and run it on the simulator, I dont experience an issue.

note: in case you need to see what I have done, I have forked your project and made the changes here: https://github.com/dhammikab/movieapp