Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: React Native - Make the current page active in react native custom bottom navigation bar

FortuneCookie:

I made a custom bottom navbar in React Native. The code is given below. I want to navigate through the pages in the navbar and when on a particular page the image(.png) which is the icon in the navbar should be active to indicate the current page. Help me to make the page active visible on the bottom navbar.


import React from 'react';
import {
Dimensions,
View,
Image,
TouchableOpacity,
Text,
Platform,
} from 'react-native';
const { width, height } = Dimensions.get("window");
import images from '../../images';
import NormalizeSize from '../../styles/NormalizeSize'
import common from '../../css/common'
import NavigatorService from '../../lib/NavigatorService';
const {normalize}=NormalizeSize;
const Bottom=(props)=>{
const {navigate, state}=props.navigation;

const {isDrawer,isRightButton,isNotificationButton,title,navigation, isFilterButton, isDummyButton}=props;
return(



onPress={() => { NavigatorService.navigate('ExcerciseList') }}
hitSlop= style={common.bottomNavBlock}>
resizeMode='contain'
style=
source={images.excercise_icon} />


...........



)
}

export default Bottom;



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: React Native - Make the current page active in react native custom bottom navigation bar

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×