Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
[MV-418] Fix buttons overlap on Android (#98)
Browse files Browse the repository at this point in the history
* [MV-418] Fix buttons overlap on Android

* Fix
  • Loading branch information
graszka22 authored Apr 27, 2023
1 parent 9c39713 commit be0f804
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions example/src/components/CallControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import { useNavigation } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';
import React, { useCallback } from 'react';
import { StyleSheet, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { useVideoroomState } from 'src/VideoroomContext';

const BOTTOM_MARGIN = 34;

export const CallControls = () => {
const {
isCameraOn,
Expand All @@ -19,8 +16,6 @@ export const CallControls = () => {
toggleScreencastAndUpdateMetadata,
disconnect,
} = useVideoroomState();
const bottomOffset = useSafeAreaInsets().bottom;

const navigation = useNavigation<StackNavigationProp<RootStack, 'Room'>>();

const onDisconnectPress = useCallback(async () => {
Expand All @@ -29,12 +24,7 @@ export const CallControls = () => {
}, [disconnect]);

return (
<View
style={[
styles.iconsContainer,
{ marginBottom: BOTTOM_MARGIN - bottomOffset },
]}
>
<View style={styles.iconsContainer}>
<View style={styles.iconInRow}>
<InCallButton
iconName={!isCameraOn ? 'Cam-disabled' : 'Cam'}
Expand Down Expand Up @@ -68,6 +58,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
justifyContent: 'center',
marginTop: 8,
marginBottom: 16,
},
iconInRow: {
marginRight: 16,
Expand Down

0 comments on commit be0f804

Please sign in to comment.