We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pageMargin not working on android but work on IOS,
code:
`import React from 'react'; import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'; import ViewPagerAdapter from 'react-native-tab-view-viewpager-adapter'; import { useTheme } from 'react-native-paper'; import { TabIndicator, Subheading } from '../components';
import HomePage from '../pages/HomePage'; import HistoryPage from '../pages/HistoryPage';
const Tab = createMaterialTopTabNavigator();
const TabStack = () => { const theme = useTheme(); return ( <Tab.Navigator initialRouteName="Home" backBehavior='initialRoute' sceneContainerStyle={{ flex: 1 }} pager={(props) => <ViewPagerAdapter pageMargin={16} {...props} />} tabBarOptions={{ renderIndicator: (props) => (<TabIndicator {...props} />), style: { backgroundColor: theme.colors.primary, borderWidth: 0, elevation: 0, shadowColor: 'transparent', shadowOpacity: 0, shadowRadius: 0, shadowOffset: { height: 0, width: 0, }, }, activeTintColor: theme.colors.white, inactiveTintColor: theme.colors.white, }} > <Tab.Screen name="HomePage" component={HomePage} options={{ tabBarLabel: () => Home, }} /> <Tab.Screen name="HistoryPage" component={HistoryPage} options={{ tabBarLabel: () => Riwayat, }} /> </Tab.Navigator> ) }
export default TabStack;`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
pageMargin not working on android but work on IOS,
code:
`import React from 'react';
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
import ViewPagerAdapter from 'react-native-tab-view-viewpager-adapter';
import { useTheme } from 'react-native-paper';
import { TabIndicator, Subheading } from '../components';
import HomePage from '../pages/HomePage';
import HistoryPage from '../pages/HistoryPage';
const Tab = createMaterialTopTabNavigator();
const TabStack = () => {
const theme = useTheme();
return (
<Tab.Navigator
initialRouteName="Home"
backBehavior='initialRoute'
sceneContainerStyle={{ flex: 1 }}
pager={(props) => <ViewPagerAdapter pageMargin={16} {...props} />}
tabBarOptions={{
renderIndicator: (props) => (<TabIndicator {...props} />),
style: {
backgroundColor: theme.colors.primary,
borderWidth: 0,
elevation: 0,
shadowColor: 'transparent',
shadowOpacity: 0,
shadowRadius: 0,
shadowOffset: {
height: 0,
width: 0,
},
},
activeTintColor: theme.colors.white,
inactiveTintColor: theme.colors.white,
}}
>
<Tab.Screen
name="HomePage"
component={HomePage}
options={{
tabBarLabel: () => Home,
}}
/>
<Tab.Screen
name="HistoryPage"
component={HistoryPage}
options={{
tabBarLabel: () => Riwayat,
}}
/>
</Tab.Navigator>
)
}
export default TabStack;`
The text was updated successfully, but these errors were encountered: