我很难为GooglePlacesAutocomplete的列表结果区域设置样式。谁能帮我把结果行的样式与结果容器的底色和边框半径结合起来呢?

我想要没有这个边框的背景色的行。
这是我的代码:
<GooglePlacesAutocomplete
placeholder={'MY PLACEHOLDER'}
onPress={(data, details = null) => {
myOnPressCode
}}
query={{
myQuery
}}
textInputProps={{
placeholderTextColor: colors.searchModalPlaceHolderColor,
}}
fetchDetails={true}
enablePoweredByContainer={false}
styles={{
container: {
alignSelf: 'stretch',
borderRadius: 16,
},
textInput: {
height: 46,
color: colors.text,
borderRadius: 16,
borderWidth: 1,
borderColor: colors.primary,
backgroundColor: colors.searchModalInputBackground,
fontSize: 18,
paddingHorizontal: 15,
},
}}
renderRow={(rowData) => {
const title = rowData.structured_formatting.main_text;
const address = rowData.structured_formatting.secondary_text;
return (
<View
style={{
backgroundColor: 'red',
flex: 1,
height: '100%',
}}>
<Text style={{fontSize: 14}}>{title}</Text>
<Text style={{fontSize: 14}}>{address}</Text>
</View>
);
}}
/>发布于 2022-01-12 12:12:41
行背景颜色:
row: {
backgroundColor: 'transparent',
paddingVertical: 0,
paddingHorizontal: 0,
},
containerResultRow: {
flex: 1,
height: 55,
justifyContent: 'center',
paddingHorizontal: 15,
backgroundColor:
rowIndex && (rowIndex + 1) % 2 === 0
? 'blue'
: 'gray',
},对于listView borderRadius:
https://github.com/FaridSafi/react-native-google-places-autocomplete/issues/792
https://stackoverflow.com/questions/70649883
复制相似问题