我正在努力创建一个日视图,时间在左边,和顶部的人头。目前,我可以得到左或顶部的标题坚持,但不是两者。
如何获得2个粘性标题?

我的渲染方式如下:
<ScrollView style={{height: 600}}>
<ScrollView horizontal={true}>
<View style={styles.column}>
<View style={{ flex: 1, flexDirection: 'row', width}}>
{header}
</View>
<View style={styles.row}>
<View style={[styles.container, { width, marginLeft: 40 }]}>
{this.generateRows()}
</View>
</View>
</View>
</ScrollView>
<View style={{backgroundColor: 'white', position: 'absolute', top: 0, bottom: 0, left: 0, }}>
<View style={{ flex: 1, flexDirection: 'row'}}>
<View style={styles.row}>
<Text></Text>
</View>
</View>
<View style={{height: 1000, width: 40 }}>
{this.generateRowLabels()}
</View>
</View>
</ScrollView>发布于 2016-04-24 14:38:43
您能否尝试将顶层ScrollView更改为“flexDirection”作为“列”查看/FlexBox?这将导致内部ScrollViews符合窗口的大小。
https://stackoverflow.com/questions/36668973
复制相似问题