Skip to content

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

@dhammikab

Description

@dhammikab

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions