[更改语言时修复图标方向

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

i使用本机基本组件。通过输入在项目区域中使用图标时,更改语言系统图标方向时更改。有固定图标方向的方法吗?

    <View style={LoginStyle.MainViewS}>
        <View style={LoginStyle.DataView}>
            <Item style={LoginStyle.ItemS}  >
                <Input placeholder="username" style={LoginStyle.InputS} />
            </Item >
            <Item style={LoginStyle.ItemS}  >
                <Icon name='checkmark-circle' style={{ color: 'green', }} />
                <Input placeholder="password" style={LoginStyle.InputS} />
            </Item>

            <TouchableOpacity style={LoginStyle.TouchableS} onPress={() => Actions.register()} >
                <Text style={LoginStyle.TouchableTS} >register</Text>
            </TouchableOpacity>
            <TouchableOpacity style={LoginStyle.TouchableS} onPress={() => Actions.forgetpass()} >
                <Text style={LoginStyle.TouchableTS}>forgetpass</Text>
            </TouchableOpacity>

            <TouchableOpacity style={LoginStyle.TouchableBS} onPress={() => Actions.index()}>
                <Text style={LoginStyle.ToucableBTS}>login</Text>
            </TouchableOpacity>
        </View>
    </View>

example

javascript reactjs react-native native-base
1个回答
0
投票

LoginStyle.InputS和LoginStyle.ItemS的样式是什么?

尝试添加:

{ position: 'absolute', top: 0, right: 0 }

到LoginStyle.InputS

<Item style={LoginStyle.ItemS}  >
            <Icon name='checkmark-circle' style={{ color: 'green', }} />
            <Input placeholder="password" style={{...LoginStyle.InputS, position:'absolute', top:0, right:0}} />
        </Item>
© www.soinside.com 2019 - 2024. All rights reserved.