native-material-dropdown`,我想在下图中创建此下拉列表:
< Dropdown
renderAccessory={() => (
<Image resizeMode="contain" source={combo_arrow_icon} style={{ marginTop: 5, justifyContent: 'center', }}/>
)}
inputContainerStyle={{ borderBottomColor: 'transparent' }}
onChangeText={(value) => props.newHandelChange(value)}
dropdownMargins={{ min: 15, max: 15 }}
dropdownOffset={{ top: 10, left: 0 }}
dropdownPosition={- 5}
style={{ marginTop: 5, fontWeight: 'bold', fontFamily: 'IRANSansMobile', fontSize: 16, textAlign: 'right', }}
itemTextStyle={{ textAlign: 'center', fontFamily: 'IRANSansMobile' }}
absoluteRTLLayout={false}
containerStyle={{ backgroundColor: '#59c5b8', borderWidth: 0.5, borderRadius: 1, marginLeft: 16, marginRight: 16, marginBottom: 8, fontSize: 18, fontFamily: 'IRANSansMobile' }}
data={props.data ? props.data : dataGroup}
placeholder="(پیش فرض گروه فعال)..."
placeholderTextColor='#000'
placeholderStyle={{ fontWeight: '200', fontFamily: 'IRANSansMobile', }}
/>
答案 0 :(得分:2)
您有两种选择可以处理该问题,
1。您需要对应用程序RTL进行布局,以便所有内容都会自动处理。有关更多信息= >>
--- https://reactnative.dev/blog/2016/08/19/right-to-left-support-for-react-native-apps