forked from Jerga99/react-music
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLecture_data.txt
88 lines (82 loc) · 2.01 KB
/
Lecture_data.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
renderTracks() {
const {tracks} = this.state;
if (tracks && tracks.length > 0) {
return tracks.map((track, index) => {
return (
<ListItem key={index}
title={track.title}
leftIcon={{name: 'play-arrow'}}
onPress={() => {}}
rightIcon={
<Icon raised
name='star'
type='font-awesome'
color='#f50'
onPress={() => {}}
/>
}
/>
)
})
}
}
render() {
const album = this.props.navigation.getParam('album', {});
const artist = this.props.navigation.getParam('artist', '');
if (album.id) {
return (
<ScrollView style={styles.container}>
<View>
<Avatar xlarge rounded source={{uri: album.cover_medium}}> </Avatar>
<View>
<Text h4> {album.title} </Text>
<Text h4> {artist} </Text>
<Icon raised
name='play'
type='font-awesome'
color='#f50'
size={30}
onPress={() => {}} />
</View>
</View>
<Divider style={{backgroundColor: 'black'}}/>
<List>
{ this.renderTracks() }
</List>
</ScrollView>
);
} else {
<View> <Text> Loading... </Text> </View>
}
}
const styles = StyleSheet.create({
container: {
flex: 1
},
header: {
flex: 1,
justifyContent: 'center',
flexDirection: 'row',
backgroundColor: '#fff',
padding: 20
},
avatar: {
flex: 1,
marginRight: 20
},
headerRight: {
flex: 1,
flexWrap: 'wrap',
justifyContent: 'flex-end',
flexDirection: 'column'
},
mainText: {
fontWeight: 'bold',
color: '#3a3a3a',
fontSize: 17
},
subText: {
color: '#3a3a3a',
fontSize: 17
}
});