Browse Source

화면 세로 사이즈 560을 기준으로 플레이어 위치 조절

goodboy 6 years ago
parent
commit
5e74c520d3
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/pages/PlayerGesture.js

+ 7 - 3
src/pages/PlayerGesture.js

@@ -18,12 +18,16 @@ import { getStatusBarHeight } from '../utils/StatusBarHeight';
 import C from 'rn-class';
 import PlayerControls from '../components/PlayerControls';
 import PlayerContents from '../components/PlayerContents';
+import { getInset } from 'react-native-safe-area-view';
 
 const { width, height } = Dimensions.get('window');
 const statusBarHeight = getStatusBarHeight();
-const minHeight = height*0.1;
-const midBound = height - height/2.5;
-const upperBound = midBound + minHeight;
+const minHeight = height * 0.1;
+const midBound = height - height / 2.5;
+const upperBound = 
+  height > 600
+    ?height * 0.75 - getInset('bottom')
+    :height * 0.70;
 
 const {
   Value,