alinz / react-native-tabbar

Tab bar with more freedom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to place tabbar in top of page?

susylPearl opened this issue · comments

i have made tabbar at the bottom of screen but i need it at top of the screen. Will it be possible?

yes

How can you suggest me ?

you will have to make changes in libs/bar/dynamic.js
so change
//
show(enable, duration) {
const { size } = this.props;
// change size from -size to +size
const toValue = !!enable? 0 : +size;
this._sizeLimit.reset(!!enable? size : 0);
Animated.timing(this.value, {
duration: duration,
toValue
}).start();
}
//in render() change
from
// its styled absolute so change bottom to top
Rawbar style={[style, { height: size, bottom: this.value }]}
to
Rawbar style={[style, { height: size, top: this.value }]}

keep me posted :)

Thanks a lot. 👍

closing this ticket.