diff --git a/App.js b/App.js
index 517b252..8476c7c 100644
--- a/App.js
+++ b/App.js
@@ -1,8 +1,8 @@
import React, { useState } from "react";
+import Color from "color";
import PropTypes from "prop-types";
import {
Appbar,
- BottomNavigation,
Text,
Card,
Dialog,
@@ -10,11 +10,14 @@ import {
Button,
Provider,
RadioButton,
- TouchableRipple
+ TouchableRipple,
+ overlay,
} from "react-native-paper";
-import { View, StatusBar, StyleSheet } from "react-native";
+import { View, StatusBar, StyleSheet, Text as RNText } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
+import { TabView, SceneMap, TabBar } from "react-native-tab-view";
+import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import SubjectsContainer from "./containers/SubjectsContainer";
import TimetableContainer from "./containers/TimetableContainer";
@@ -59,6 +62,27 @@ ThemePicker.propTypes = {
};
const App = ({ theme, setTheme }) => {
+
+ function renderLabel({ route, focused, color }) {
+ return {route.title};
+ }
+
+ renderLabel.propTypes = {
+ route: PropTypes.object,
+ focused: PropTypes.bool,
+ color: PropTypes.string,
+ };
+
+ function renderIcon({ route, color }) {
+ return (
+
+
+
+ );
+ }
+
+ renderIcon.propTypes = renderLabel.propTypes;
+
const [ pane, setPane ] = useState({
index: 0,
routes: [
@@ -72,13 +96,19 @@ const App = ({ theme, setTheme }) => {
const [ newTheme, setNewTheme ] = useState(themes.findIndex(
i => JSON.stringify(i.theme) === JSON.stringify(theme)
));
- const renderScene = BottomNavigation.SceneMap({
+ const renderScene = SceneMap({
add: Dummy,
statistics: Dummy,
timetable: TimetableContainer,
subjects: SubjectsContainer,
});
+ const backgroundColor = theme.dark && theme.mode === "adaptive" ?
+ overlay(4, theme.colors.surface):
+ theme.colors.primary;
+
+ const activeColor = Color(backgroundColor).isLight() ? "#000" : "#FFF";
+ const inactiveColor = Color(backgroundColor).isLight() ? "#222" : "#AAA";
function dialogSelection(theme, idx) {
setNewTheme(idx);
setTheme(theme.theme);
@@ -86,11 +116,7 @@ const App = ({ theme, setTheme }) => {
return (
@@ -102,7 +128,7 @@ const App = ({ theme, setTheme }) => {
onPress={() => setShowDialog(true)}
/>
- setPane({
index,
@@ -110,6 +136,23 @@ const App = ({ theme, setTheme }) => {
})}
renderScene={renderScene}
shifting={true}
+ tabBarPosition="bottom"
+ renderTabBar={props => (
+ null}
+ />)
+ }
+ sceneContainerStyle={{
+ backgroundColor: theme.colors.background
+ }}
/>