每个列表项都有 2 个按钮:
按钮不在 listView 内时有效。但是,当在列表视图内的列表项中时,它们不会突出显示,是否有我遗漏的东西?
列表显示:
return (
<ListView
enableEmptySections={true}
dataSource={this.props.scheduledTasks}
renderRow={(scheduledTask) => (
<ScheduledTaskCellMobile
imageSource={scheduledTask.imageSrc}
title={scheduledTask.title}
subtitle={moment(scheduledTask.date).format("HH:mm")}/>
)
}
/>
);
项目清单:
return (
<View style={this.styles.cell}>
<View className="leftContainer" style={this.styles.alignedLeftContainer} >
<Image source={imageSource} style={this.styles.image} />
<View style={this.styles.textsContainer}>
<TextTitleCellMobile>
{title}
</TextTitleCellMobile>
<TextSubtitleCellMobile>
{subtitle}
</TextSubtitleCellMobile>
</View>
</View>
<View style={this.styles.alignedRightContainer}>
<RoundButton style={this.styles.roundButtons} />
<RoundButton style={this.styles.roundButtons} />
</View>
</View>
)
圆形按钮:
return (
<View style={this.props.style}>
<TouchableHighlight onPress={this.props.onPress} style={{borderRadius: 4}}>
<View style={this.style.view}>
<Image style={this.style.image} source={soundImage}/>
</View>
</TouchableHighlight>
</View>
)