Skip to content

Changing Tabs width, not the content inside #2003

@rsokz

Description

@rsokz

I want to customize the Tabs width, but not the width of the content of each tab.

simulator screen shot - iphone x - 2018-06-12 at 13 30 34

I want the width of the Tabs header to not affect the width of the content inside each Tab.

This is my code. Currently I'm adding a style to Tabs

<Tabs
	style={{
		width: PixelRatio.getPixelSizeForLayoutSize(101),
	}}
	initialPage={0}
	tabBarUnderlineStyle={ styles.tabBarUnderlineStyle }
	>
        <Tab
	        heading="Phone"
	        tabStyle={ styles.tabStyle }
	        activeTabStyle={ styles.tabStyle }
	        textStyle={ styles.tabBarText }
	        activeTextStyle={ styles.tabBarText }
	        >
	        <Content>
		       
	        </Content>
	</Tab>
	<Tab
		heading="Email"
		tabStyle={ styles.tabStyle }
		activeTabStyle={ styles.tabStyle }
		textStyle={ styles.tabBarText }
		activeTextStyle={ styles.tabBarText }
		>
	        {/* <Tab2 /> */}
	</Tab>
</Tabs>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions