Estoy tratando de centrar los elementos de la lista plana usando alignItems pero ninguno de allowContent, alignItems está trabajando en esto
<View style={styles.citiesContainer}> <FlatList data={cities} renderItem={renderItem} keyExtractor={item => item} horizontal={true} /> </View> // styling part const styles = StyleSheet.create({ citiesContainer: { height: 110, justifyContent: 'center', alignItems: 'center', width: '100%', backgroundColor: 'red' } }Marque esos círculos negros en el cuadro rojo de la imagen, quiero centrar verticalmente esos círculos (elementos)
prueba https://reactnative.dev/docs/flatlist#columnwrapperstyle
<FlatList columnWrapperStyle={styles.citiesContainer}} data={cities} renderItem={renderItem} keyExtractor={item => item} horizontal={true} />cambiar la dirección de flexión será suficiente, pruebe flexDirection : 'row'
const styles = StyleSheet.create({ citiesContainer: { height: 110, justifyContent: 'center', alignItems: 'center', width: '100%', flexDirection : 'row', //this right here!! :) backgroundColor: 'red' } }