Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6214

rows with overlapping text/icons in Android

$
0
0

I have a screen where I map some icons and text as rows. It works perfectly fine in iOS but everything overlaps in Android. I have already tried using lineHeight as suggested by some other answers but it doesn't work. How can I fix this?

The list is rendered in the FilterCriteriaList component.

  return (<View style={styles.container}><View style={styles.horizontalLine} />      {criteriaList.map((item: CriteriaList, index: number) => (<View key={index}><View style={styles.criteriaRow}><Icon              name={item.checked ? 'dot-circle-o' : 'circle-thin'}              color="#31C283"              size={moderateScale(20)}/><Text style={styles.text}>{item.title}</Text></View><View style={styles.horizontalLine} /></View>      ))}</View>  );};const styles = StyleSheet.create({  container: {    flex: 1,  },  criteriaRow: {    flexDirection: 'row',    paddingLeft: moderateScale(25),    alignItems: 'center',  },  horizontalLine: {    width: '100%',    height: moderateScale(1),    backgroundColor: '#f0f0f0',  },  text: {    paddingLeft: moderateScale(15),    paddingBottom: moderateScale(15),    marginBottom: moderateScale(15),    paddingTop: moderateScale(15),  },});
<View style={styles.filterCriteriaContainer}><Text style={styles.greyHeadingText}>Weitere Filter</Text><FilterCriteriaList/></View>  filterCriteriaContainer: {    paddingTop: moderateScale(35),    zIndex: 1,  },

Android:enter image description here

iOS:enter image description here


Viewing all articles
Browse latest Browse all 6214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>