Advertisement
enkf

Untitled

Dec 27th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import { Button, Image, StyleSheet, ScrollView, View, Text, TouchableOpacity } from 'react-native';
  3. import {
  4. createAppContainer,
  5. } from 'react-navigation';
  6. import { createBottomTabNavigator } from 'react-navigation-tabs';
  7. import HomeScreen from './Screens/HomeScreen';
  8. // import b from '../routes/B';
  9. // import C from '../routes/C';
  10. // import D from '../routes/D';
  11.  
  12. const App = createBottomTabNavigator(
  13. {
  14. Home: { screen: HomeScreen},
  15. },
  16. {
  17. defaultNavigationOptions: ({ navigation }) => ({
  18.  
  19. tabBarIcon: ({ focused, horizontal, tintColor }) => {
  20. const { routeName } = navigation.state;
  21. if (routeName === 'Home') {
  22. return (
  23. <Image
  24. source={
  25. focused
  26. ? require('./images/home.png')
  27. : require('./images/vzuu.jpg')
  28. }
  29.  
  30. style={{
  31. width: 20,
  32. height: 20,
  33. }}
  34. />
  35. );
  36. }
  37. },
  38.  
  39.  
  40. }),
  41.  
  42. tabBarOptions: {
  43. activeTintColor: '#52c5d8',
  44. inactiveTintColor: 'gray',
  45. style: {
  46. height: 80,
  47. borderTopLeftRadius: 15,
  48. borderTopRightRadius: 15,
  49. },
  50.  
  51. },
  52.  
  53. }
  54. );
  55. export default createAppContainer(App);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement