-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMusicSystem.js
More file actions
53 lines (52 loc) · 2.18 KB
/
MusicSystem.js
File metadata and controls
53 lines (52 loc) · 2.18 KB
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
import React, { Component } from 'react'
import { Image, Text, View } from 'react-native'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import { NavigationContainer } from '@react-navigation/native'
import Home from './Music/Home'
import LikeMusic from './Music/LikeMusic'
import Music from './Music/Music'
import Team from './Music/Team'
import Login from './Music/login'
import Logo from './Music/Logo'
import AntDesign from "react-native-vector-icons/AntDesign"
let Tab=createBottomTabNavigator()
export default class MusicSystem extends Component {
_screen=({route})=>{
let iconName
return {
tabBarIcon:({color})=>{
switch (route.name) {
case "Home":
iconName="home"
break;
case "Music":
iconName="customerservice"
break;
case "LikeMusic":
iconName="heart"
break;
case "Team":
iconName="team"
break;
case "Login":
iconName="github"
break;
}
return <AntDesign name={iconName} size={30} color={color}/>
}
}
}
render() {
return (
<NavigationContainer>
<Tab.Navigator initialRouteName="Home" sceneContainerStyle={{paddingTop:8}} screenOptions={this._screen} tabBarOptions={{activeTintColor:'#7056A6',labelStyle:{fontSize:12},style:{height:60,top:0}}}>
<Tab.Screen name="Home" component={Home} options={{title:"音乐馆"}}/>
<Tab.Screen name="Music" component={Music} options={{title:"正在播"}}/>
<Tab.Screen name="LikeMusic" component={LikeMusic} options={{title:"我喜欢"}}/>
<Tab.Screen name="Team" component={Team} options={{title:"制作团队"}}/>
<Tab.Screen name="Login" component={Login} options={{title:"我的"}}/>
</Tab.Navigator>
</NavigationContainer>
)
}
}