-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (23 loc) · 753 Bytes
/
Copy pathindex.js
File metadata and controls
29 lines (23 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React, {Component} from 'react';
import {NativeModules, View, Keyboard, Platform, TouchableWithoutFeedback} from 'react-native';
const KioskMode = NativeModules.KioskMode
export default KioskMode;
import _ from 'lodash';
export class Immersive extends Component {
constructor(props, context) {
super(props, context)
this.autoKioskMode = _.debounce(KioskMode.autoKioskMode, 200);
}
componentWillMount() {
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
}
_keyboardDidHide() {
KioskMode.autoKioskMode();
}
autoKioskMode() {
KioskMode.autoKioskMode();
}
render() {
return (this.autoKioskMode() || null);
}
}