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

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

Open
dhammikab opened this issue Mar 7, 2017 · 0 comments
Open

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

dhammikab opened this issue Mar 7, 2017 · 0 comments

Comments

@dhammikab
Copy link

dhammikab commented Mar 7, 2017

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

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