|
@@ -12,6 +12,7 @@ import {connect} from 'react-redux';
|
12
|
12
|
import * as counterActions from '../reducers/counter/actions';
|
13
|
13
|
|
14
|
14
|
const leftButtons = ['back', 'cancel', 'accept', 'sideMenu'];
|
|
15
|
+let bottomTabsVisible = true;
|
15
|
16
|
|
16
|
17
|
// this is a traditional React component connected to the redux store
|
17
|
18
|
class PushedScreen extends Component {
|
|
@@ -53,7 +54,6 @@ class PushedScreen extends Component {
|
53
|
54
|
}
|
54
|
55
|
|
55
|
56
|
onNavigatorEvent(event) {
|
56
|
|
- console.log('onNavigatorEvent ' + event.id);
|
57
|
57
|
switch (event.id) {
|
58
|
58
|
case 'cancel':
|
59
|
59
|
Alert.alert('NavBar', 'Cancel button pressed');
|
|
@@ -109,6 +109,10 @@ class PushedScreen extends Component {
|
109
|
109
|
<Text style={styles.button}>Change Left Button</Text>
|
110
|
110
|
</TouchableOpacity>
|
111
|
111
|
|
|
112
|
+ <TouchableOpacity onPress={ this.onToggleBottomTabsPress.bind(this) }>
|
|
113
|
+ <Text style={styles.button}>Toggle BottomTabs</Text>
|
|
114
|
+ </TouchableOpacity>
|
|
115
|
+
|
112
|
116
|
<TextInput style={{height: 40, borderColor: 'gray', borderWidth: 1}}/>
|
113
|
117
|
|
114
|
118
|
<Text style={{fontWeight: '500'}}>String prop: {this.props.str}</Text>
|
|
@@ -206,6 +210,14 @@ class PushedScreen extends Component {
|
206
|
210
|
this.currentBackButton += 1;
|
207
|
211
|
this.currentBackButton = this.currentBackButton % 4;
|
208
|
212
|
}
|
|
213
|
+
|
|
214
|
+ onToggleBottomTabsPress() {
|
|
215
|
+ this.props.navigator.toggleTabs({
|
|
216
|
+ to: bottomTabsVisible ? 'shown' : 'hidden',
|
|
217
|
+ animated: true
|
|
218
|
+ });
|
|
219
|
+ bottomTabsVisible = !bottomTabsVisible;
|
|
220
|
+ }
|
209
|
221
|
}
|
210
|
222
|
|
211
|
223
|
const styles = StyleSheet.create({
|