Skip to content

Commit

Permalink
Hide statusbar when camera is open
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlac committed Jul 25, 2023
1 parent c4ac4a0 commit 79fb48e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions example/src/BarcodeScreenExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import {
View,
TouchableOpacity,
Image,
Dimensions,
Platform,
SafeAreaView,
StatusBar,
useWindowDimensions,
Vibration,
} from 'react-native';
import Camera from '../../src/Camera';
import { CameraApi, CameraType, CaptureData } from '../../src/types';
import { CameraApi, CameraType } from '../../src/types';
import { Orientation } from '../../src';

const flashImages = {
Expand Down Expand Up @@ -91,6 +90,7 @@ const BarcodeExample = ({ onBack }: { onBack: () => void }) => {

return (
<View style={styles.screen}>
<StatusBar hidden />
<SafeAreaView style={styles.topButtons}>
{flashData.image && (
<TouchableOpacity style={styles.topButton} onPress={onSetFlash}>
Expand Down
3 changes: 2 additions & 1 deletion example/src/CameraExample.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useRef } from 'react';
import { StyleSheet, Text, View, TouchableOpacity, Image, SafeAreaView, Animated } from 'react-native';
import { StyleSheet, Text, View, TouchableOpacity, Image, SafeAreaView, Animated, StatusBar } from 'react-native';
import Camera from '../../src/Camera';
import { CameraApi, CameraType, CaptureData } from '../../src/types';
import { Orientation } from '../../src';
Expand Down Expand Up @@ -124,6 +124,7 @@ const CameraExample = ({ onBack }: { onBack: () => void }) => {

return (
<View style={styles.screen}>
<StatusBar hidden />
<SafeAreaView style={styles.topButtons}>
{flashData.image && (
<TouchableOpacity style={styles.topButton} onPress={onSetFlash}>
Expand Down

0 comments on commit 79fb48e

Please sign in to comment.