我有一个呈现两个列表的导航器,它可以工作,如果我添加scrollEnabled,否则不起作用,如果我尝试指定制表符宽度,它也不会呈现列表。
这是有效的代码,但是它显示了这样的导航器:
第一个列表|第二个清单|空格
import { createMaterialTopTabNavigator } from "react-navigation";
import ReadList from "../components/ReadList";
import ReadingList from "../components/ReadingList";
import { primaryColor } from "../styles/colors";
export default createMaterialTopTabNavigator(
{
Read: ReadList,
Reading: ReadingList
},
{
tabBarOptions: {
scrollEnabled: true,
labelStyle: {
fontSize: 12,
color: primaryColor,
fontFamily: "Raleway SemiBold"
},
style: {
backgroundColor: "#fff"
},
indicatorStyle: {
backgroundColor: primaryColor
}
}
}
);