react-native-vector-icons/Ionicons 自定义tabbar ---1

/**

import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TabBarIOS,
} from 'react-native';
import ScrollabelTabView,{DefaultTabBar,ScrollableTabBar} from 'react-native-scrollable-tab-view';
import ZFTabBar from './RNCompont/ViewCompont/ZFTabBar.js'
import Account from './RNCompont/PageCompont/Accout/Account.js';
import Edit from './RNCompont/PageCompont/Edit/Edit.js';
import List from './RNCompont/PageCompont/List/List.js';
import Picture from './RNCompont/PageCompont/Picture/Picture.js';

export default class index extends Component {

constructor(props)
{
super(props);
this.state={
tabNames:['视频','录制','图片','我的'],
tabIconNames:['lf_tabbar_cart','lf_tabbar_home','lf_tabbar_order','lf_tabbar_home'],
tabIconNamesClick:['lf_tabbar_order_selected','lf_tabbar_home_selected','lf_tabbar_order_selected','lf_tabbar_home_selected'],
}

}

render() {
let tabNames = this.state.tabNames;
let tabIconNames = this.state.tabIconNames;
let tabIconNamesClick= this.state.tabIconNamesClick;
return (
<ScrollabelTabView
renderTabBar ={()=>
<ZFTabBar
tabNames={tabNames}
tabIconNames ={tabIconNames}
tabIconNamesClick ={tabIconNamesClick}
/>}
tabBarPosition="bottom"
scrollWithoutAnimation={true}
locked={true}
>
<Account tabLabel="首页" ></Account>
<Edit tabLabel="编辑页" ></Edit>
<List tabLabel="List" ></List>
<Picture tabLabel ="Picture" ></Picture>
</ScrollabelTabView>
)}

}

const styles = StyleSheet.create({

});

AppRegistry.registerComponent('RNProjectFrist', () => index);

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容