How to use the react-native-orientation-locker.unlockAllOrientations function in react-native-orientation-locker

To help you get started, we’ve selected a few react-native-orientation-locker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RocketChat / Rocket.Chat.ReactNative / app / views / RoomsListView / index.js View on Github external
componentDidMount() {
		this.getSubscriptions();
		const { navigation, closeServerDropdown } = this.props;
		navigation.setParams({
			onPressItem: this._onPressItem,
			initSearchingAndroid: this.initSearchingAndroid,
			cancelSearchingAndroid: this.cancelSearchingAndroid
		});
		if (isTablet) {
			EventEmitter.addEventListener(KEY_COMMAND, this.handleCommands);
		}
		Dimensions.addEventListener('change', this.onDimensionsChange);
		Orientation.unlockAllOrientations();
		this.willFocusListener = navigation.addListener('willFocus', () => {
			// Check if there were changes while not focused (it's set on sCU)
			if (this.shouldUpdate) {
				// animateNextTransition();
				this.forceUpdate();
				this.shouldUpdate = false;
			}
		});
		this.didFocusListener = navigation.addListener('didFocus', () => {
			this.backHandler = BackHandler.addEventListener('hardwareBackPress', this.handleBackPress);
		});
		this.willBlurListener = navigation.addListener('willBlur', () => {
			closeServerDropdown();
			if (this.backHandler && this.backHandler.remove) {
				this.backHandler.remove();
			}
github experiment322 / controlloid-client / js / AppRoot.jsx View on Github external
componentDidMount() {
    KeepAwake.deactivate();
    StatusBar.setHidden(false);
    Orientation.unlockAllOrientations();
    setTimeout(SplashScreen.hide);
  }
github RocketChat / Rocket.Chat.ReactNative / app / views / RoomsListView / index.js View on Github external
this.data = [];
		this.state = {
			searching: false,
			search: [],
			loading: true,
			chats: [],
			unread: [],
			favorites: [],
			discussions: [],
			channels: [],
			privateGroup: [],
			direct: [],
			livechat: [],
			width
		};
		Orientation.unlockAllOrientations();
		this.didFocusListener = props.navigation.addListener('didFocus', () => BackHandler.addEventListener('hardwareBackPress', this.handleBackPress));
		this.willBlurListener = props.navigation.addListener('willBlur', () => BackHandler.addEventListener('hardwareBackPress', this.handleBackPress));
	}
github experiment322 / controlloid-client / js / interface / screens / EditorScreen.jsx View on Github external
componentWillUnmount() {
    const { layout } = this.state;
    const { createLayout, navigation } = this.props;
    createLayout(navigation.getParam("editedLayout"), layout);
    Orientation.unlockAllOrientations();
    StatusBar.setHidden(false);
    KeepAwake.deactivate();
  }
github experiment322 / controlloid-client / js / interface / screens / ControllerScreen.jsx View on Github external
componentWillUnmount() {
    const { navigation } = this.props;
    navigation.getParam("socketClose")();
    Orientation.unlockAllOrientations();
    StatusBar.setHidden(false);
    KeepAwake.deactivate();
  }

react-native-orientation-locker

A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.

MIT
Latest version published 6 months ago

Package Health Score

73 / 100
Full package analysis