在React-native中是否可以使用Image下拉菜单?

问题描述

我使用react-native-material-dropdown-v2进行了下拉 当我单击时使用此列表:

enter image description here

enter image description here

我想在单击该图标的图标(图像)上转换此行,这可能吗? 非常感谢!

我现在使用的代码

    <View style={styles.centeredView}>
              <MaterialDropdown
                label={i18n.t("mytrips.date.date")}
                data={data_dropdown}
                baseColor="#212121"
                labelFontSize={17}
                textColor="#212121"
                itemColor="#212121"
                selectedItemColor="#000"
                backgroundColor="transparent"
                pickerStyle={styles.dropdownPickerStyle}
                affixTextStyle={{ fontFamily: "FunctionLH" }}
                itemTextStyle={{ fontFamily: "FunctionLH" }}
                labelTextStyle={{ fontFamily: "FunctionLH" }}
                containerStyle={styles.dropdownContainerStyle}
                itemCount={10}
                dropdownPosition={-4.5}
                labelExtractor={({ label }) => label}
                valueExtractor={({ value }) => value}
                propsExtractor={({ props },index) => props}
                onChangeText={(value) => this.choiceAction(value)}
                useNativeDriver={true}            
              />
 </View>

我看到我可以使用:

renderAccessory={()=>
              <View style={{width:50,borderWidth:1}}>
                <Image source={require("../../assets/images/icon_rotation.png")} 
                style={{ width: 30,height: 30,resizeMode: 'contain'}} />
              </View>}

但是当我添加内容时,什么都没有改变...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)