【发布时间】:2016-08-08 17:09:30
【问题描述】:
我正在尝试在左侧创建一个带有时间的日视图,以及顶部的人员标题。目前我可以让左侧或顶部的标题保持不变,但不能同时保持两者。
如何获得 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>
【问题讨论】:
-
你有没有得到这个工作@chapinkapa?希望看到完整的样本。 :)