Code Monkey home page Code Monkey logo

tabber's Introduction

Example of tab navigator customization.

tabber's People

Contributors

alex-melnyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tabber's Issues

Draggable tab

First of all, THANKS for an amazing example!

Can you assist me in making a draggable tab? So that on dragging to certain x,y it opens another screen?
I'm trying to use react-native-interactable inside <AddButton /> screen (Medium post v1), but my button remains static.

Here is the code of <AddButton /> page:

import React, { Component } from "react";
import { Animated, TouchableHighlight, View, StyleSheet } from "react-native";
import Interactable from "react-native-interactable";

class AddButton extends Component {
  render() {
    return (
      <Animated.View style={styles.container}>
        <Interactable.View
          snapPoints={[{ x: 0, y: 72 }, { x: 0, y: 250 }]}
          initialPosition={{ x: 0, y: 250 }}
        >
          <Animated.View
            style={{
              position: "absolute",
              width: 96,
              height: 96,
              backgroundColor: "#EE2C38",
              borderRadius: 48
            }}
          />
        </Interactable.View>
      </Animated.View>
    );
  }
}
const styles = StyleSheet.create({
  container: {
    position: "absolute",
    alignItems: "center",
    backgroundColor: "red",
    width: 96,
    height: 96,
    borderRadius: 48
  }
});

export { AddButton };

Desired behaviour:
screenshot 2019-03-01 at 8 54 55 pm
screenshot 2019-03-01 at 8 55 56 pm

Height of bottom bar SafeAreaView

Hi,

Working on TabBar. Tried your example and faced issue with iPhone X.

There is explicit state in MultiBar.js that we cannot change height of background.
<View style={{ height: 49 }}/>

However, it appears to corrupt UI on iPhone X. Can you advise?

Screen Shot 2019-09-12 at 12 25 07 PM

Button truncate on android

Hello,

I have tested on android, but this is what i have.

image

The button is tunked,

Do you have any idea why ?

Any support is welcome.

ViewOverflow

ViewOverflow problem android

Error: Native component for "RNViewOverflow" does not exist

Tab bar not rendering completely for iPhone X

I have set up this tweaked it a bit to get it to work with my app, yet its not rendering completely correct as shown in some of the previous examples. I have my attached code and screenshot.

const {height, width} = Dimensions.get("window");

const AuthStack = FluidNavigator({
	Login: { screen: Login },
	Register: { screen: Register }

const PredictiveStack = FluidNavigator({
	Matrix: { screen: PredictiveMatrix}
})

const BottomTab = createBottomTabNavigator({
	Home: {
		screen: Home,
		navigationOptions: () => ({
			tabBarIcon: ({ tintColor }) => (
				<IconButton
					icon="home"
					color={tintColor}
					size={24}
				/>
			)
		})
	},
	Chat: {
		screen: Chat,
		navigationOptions: () => ({
			tabBarIcon: ({ tintColor }) => (
				<IconButton
					icon="chat"
					color={tintColor}
					size={24}
				/>
			)
		})
	},
	MultiBar: {
		screen: () => Chat,
		navigationOptions: ({ navigation }) => ({
			tabBarIcon: () => (
				<MultiBarToggle
					toggleColor='#893168'
					navigation={navigation}
					actionSize={30}
					routes={[
						{
							routeName: 'PredictiveStack',
							color: '#FF8360',
							icon: (
								<IconButton
									icon="home"
									color="#333333"
									size={15}
								/>
							)
						},
						{
							routeName: 'Chat',
							color: '#E8E288',
							icon: (
								<IconButton
									icon="chat"
									color="#333333"
									size={15}
								/>
							)
						},
						{
							routeName: 'ProfileStack',
							color: '#7DCE82',
							icon: (
								<IconButton
									icon="person"
									color="#333333"
									size={15}
								/>
							)
						},
					]}
					icon={(
						<IconButton
							icon={require('./assets/icons/baseline_keyboard_voice_white_48dp.png')}
							color="#FFFFFF"
							size={60}
						/>
					)}
				/>
			)
		}),
		params: {
			navigationDisabled: true
		}
	},
	Photo: {
		screen: Photo,
		navigationOptions: () => ({
			tabBarIcon: ({ tintColor }) => (
				<IconButton
					icon="room"
					color={tintColor}
					size={24}
				/>
			)
		})
	},
	Profile: {
		screen: ProfileStack,
		navigationOptions: () => ({
			tabBarIcon: ({ tintColor }) => (
				<IconButton
					icon="redeem"
					color={tintColor}
					size={24}
				/>
			)
		})
	}
}, {
	tabBarComponent: MultiBar,
	tabBarOptions: {
		adaptive: true,
		showLabel: false,
		inactiveTintColor: '#e4e2e9',
		activeTintColor: '#FFFFFF',
		style:{
		 backgroundColor: '#310E31'
			}
		}
});


const styles = MediaQueryStyleSheet.create({
  // was trying to fix it with this but it doesn't work
	 style: {
		 height: hp('8%'),
		 width: wp('100%'),
		 backgroundColor: '#310E31'
	 }
 },
 //Media Queries styles:
 {
 "@media (max-device-height: 1920)": {
 	style: {
 		height: hp('8%'),
 		width: wp('100%'),
 		backgroundColor: '#310E31'
 	}
},
 	"@media (max-device-height: 2800)": {
 		style: {
 			height: hp('10%'),
 			width: wp('100%'),
 			backgroundColor: '#310E31'
 			}
 		}
 }
);

const Nav = createAppContainer(FluidNavigator(
  {
		AuthLoading: AuthLoading,
		App: BottomTab,
		Auth: AuthStack
  },
  {
		initialRouteName: 'AuthLoading'
  }
));

class Navigation extends Component {
	render() {
		return (
			<Nav/>
		);
	}
}

export default Navigation;`

image

Icons on customized plus

Great repo. Loved the article on Medium. Question - can't seem to find where you state the three icons above the "Plus" button. I am getting simple circles (which I can change the color of!). Any help appreciated. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.