react native - Fix children container width truble -


my children views may different width, not bigger parent view. how can fix it?

this screenshot of how looks now:

enter image description here

you can give parent view width device window width this:

var {height, width} = dimensions.get('window'); 

implement height , width required in parent view:

<view style={{height:height, width:width}}></view> 

after constructing parent view, can give child view width , height own interest :

style={{height:40, width:250}} 

also should have knowledge on react-native flex construct others layout can view here


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -