Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

react-native landscape mode breaking layout

$
0
0
  • when I change my orintation from protrait to landscape my layout not working
  • I used align items stretch also but both views are not expnading in landscape mode.
  • can you tell me what could be the issue.
  • I researched and tried with this approach, React-Native + Flex not responding to orientation change
  • but still not working
  • providing my styles and html structure below.
<View   onLayout={this.onLayout}                            style={{                                display: 'flex',                                flexDirection: 'row',                                backgroundColor: 'yellow',                            }}><View                                style={{                                    backgroundColor: '#EFEFEF',                                }}><Text                                    style={{                                        fontSize: 16                                    }}>  {item.item.name}</Text><View                                    style={{                                        backgroundColor: 'brown',                                    }}><Text style={{                                        fontSize: 12,                                        paddingTop: 5,                                    }}> tiger: 99999 </Text><Text style={{                                        fontSize: 12,                                        paddingTop: 5,                                    }}> cat: 6 </Text><Text style={{                                        fontSize: 12,                                        paddingTop: 5,                                    }}>                                        Tote lion: 0000345698223418500928342186</Text></View></View><View                                style={{                                    backgroundColor: '#EFEFEF',                                }}><Text                                    style={{                                        fontSize: 16                                    }}>  Honor</Text><View                                    style={{                                        backgroundColor: 'green',                                        width: this.state.width,                                    }}><Text> mouse: 12</Text><Text> rhino: 10</Text><Text> wolf: 3</Text></View></View></View>

Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>