React Native使用flex:1;的時(shí)候并不是等分布局,<View style={{height: 100, flexDirection: 'row'}}> <Text style={{backgroundColor: 'red', flex: 1, flexGrow: 1}}>的撒打算</Text> <Text style={{backgroundColor: 'green', flex: 1, flexGrow: 1}}>撒打算的撒打算打算的撒打算</Text> <Text style={{backgroundColor: 'blue', flex: 1, flexGrow: 1}}>的撒打算</Text></View>如下圖所示:并沒有平分布局,感覺是平分了剩余空間。我使用了react-navigation的TabNavigator路由組件,如果不使用這個(gè)組件,顯示是正常的,請(qǐng)問這是什么問題?
React Native flex布局問題
BIG陽
2018-11-20 17:15:57