将本机文本水平切割,需要在一行中显示全文吗?

问题描述 投票:0回答:1

本机版本:“ 0.62.0”,我尝试了此代码ui像这样来:enter image description here反应本机

          </View>
          <View style={{flex:8}}>
            <View style={{padding: 20, height: 200, backgroundColor: 'red'}}>
              <Text style={fonts.bold}>View 1</Text>
            </View>

            <View style={{padding: 20, height: 200, backgroundColor: 'red'}}>
              <Text style={fonts.bold}>View 1</Text>
            </View>
            <View style={{padding: 20, height: 200, backgroundColor: 'yellow'}}>
              <Text>View 1</Text>
            </View>

            <View style={{padding: 20, height: 200, backgroundColor: 'green'}}>
              <Text>View 1</Text>
            </View>
          </View>

        </View>

如何做?

react-native react-native-android
1个回答
0
投票

给出的文本宽度大于具有一些填充的字符所占用的空间

© www.soinside.com 2019 - 2024. All rights reserved.