【问题标题】:React Native Nativebase how to float Picker to the rightReact Native Nativebase如何将Picker浮动到右侧
【发布时间】:2020-04-19 06:48:18
【问题描述】:

我有想要浮动右侧的向下箭头按钮。

<Form>
                    <Item inlineLabel>
                        <Label>Name *</Label>
                        <Input
                            autoFocus
                            type="text"
                            onChangeText={text => this.setState({ name: text })}
                            value={this._replaceSpace(this.state.name)}
                            placeholderTextColor="#BFC6EA"
                            placeholder='Grilled Chicken'
                            style={{ textAlign: 'right', marginRight: 10 }}
                        />
                    </Item>
                    <Item inlineLabel>
                        <Label>Serving Per Container *</Label>
                        
                            <Picker
                                mode="dropdown"
                                iosHeader="Select your SIM"
                                iosIcon={<Icon name="arrow-down" style={{}} />}
                                style={{ width: undefined }}
                                selectedValue={this.state.selected}
                                onValueChange={this.onValueChange.bind(this)}
                            >
                                <Picker.Item label="Wallet" value="key0" />
                                <Picker.Item label="ATM Card" value="key1" />
                                <Picker.Item label="Debit Card" value="key2" />
                                <Picker.Item label="Credit Card" value="key3" />
                                <Picker.Item label="Net Banking" value="key4" />
                            </Picker>
                        
                    </Item>
                </Form>

【问题讨论】:

  • 您有任何我可以尝试的展览链接吗?
  • 对于选择器:flex: 1

标签: css react-native flexbox native-base


【解决方案1】:

如果有人遇到这个问题。 flex: 1 到标签组件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-11-26
    • 1970-01-01
    • 1970-01-01
    • 2016-08-11
    • 1970-01-01
    • 2018-02-11
    • 1970-01-01
    • 2018-02-04
    相关资源
    最近更新 更多