Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 2d7e4a6

Browse files
committed
Small screens UI fix
1 parent 3cbced4 commit 2d7e4a6

File tree

8 files changed

+20
-19
lines changed

8 files changed

+20
-19
lines changed

app/components/PageView/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ function PageView({
4040

4141
const child = (
4242
<>
43-
<SafeAreaView {...baseProps} style={[styles.base].concat([baseStyle])}>
43+
<SafeAreaView
44+
{...baseProps}
45+
style={[styles.base].concat([baseStyle])}
46+
forceInset={{ top: type !== 'scroll' ? 'always' : 'never' }}
47+
>
4448
{afterRender}
4549
{header ? <Header {...header} /> : null}
4650
<Comp

app/screens/AboutApp/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ import { links } from './data';
1313
function AboutAppScreen({ navigation }) {
1414
const styles = useDynamicStyleSheet(rawStyles);
1515
return (
16-
<PageView navigation={navigation} style={styles.container} baseStyle={styles.screen}>
16+
<PageView
17+
type="scroll"
18+
navigation={navigation}
19+
style={styles.container}
20+
baseStyle={styles.screen}
21+
>
1722
<Text style={styles.title}>About App</Text>
1823
<Text style={styles.description}>React Native Loop is just a fun experimint of mine.</Text>
1924
<Text style={styles.description2}>

app/screens/AboutDeveloper/index.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,7 @@ import styles from './styles';
1616

1717
function AboutDeveloperScreen({ navigation }) {
1818
return (
19-
<PageView
20-
disableMaxContainer
21-
type="scroll"
22-
navigation={navigation}
23-
baseStyle={styles.page}
24-
baseProps={{
25-
forceInset: { bottom: false },
26-
}}
27-
>
19+
<PageView type="scroll" disableMaxContainer navigation={navigation} baseStyle={styles.page}>
2820
<View style={styles.header}>
2921
<TouchNative style={styles.backButtonBase} onPress={() => navigation.pop()}>
3022
<Icon name="chevron-left" style={styles.backButtonIcon} />

app/screens/AboutDeveloper/styles.js

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ const AVATAR_TOP_OFFSET = RED_SECTION_HEIGHT - AVATAR_BORDER_WIDTH - AVATAR_SIZE
1111
const AVATAR_LEFT_OFFSET = dimensions.width / 2 - AVATAR_SIZE / 2;
1212

1313
const styles = StyleSheet.create({
14-
background: {
15-
flex: 1,
16-
backgroundColor: colors.primary,
17-
},
1814
page: {
1915
backgroundColor: colors.primary,
2016
},

app/screens/Level/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useRef, useContext, useEffect } from 'react';
22
import { View, StatusBar, Animated } from 'react-native';
33
import PropTypes from 'prop-types';
4-
import { useDarkMode } from 'react-native-dark-mode';
54
import { TouchNative } from 'rn-hgl';
65

76
import { SettingsContext } from 'contexts/Settings';

app/screens/Levels/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import rawStyles from './styles';
1313
function HomeScreen({ navigation }) {
1414
const styles = useDynamicStyleSheet(rawStyles);
1515
return (
16-
<PageView navigation={navigation} baseStyle={styles.screen}>
16+
<PageView type="scroll" navigation={navigation} baseStyle={styles.screen}>
1717
<Text style={styles.title}>Levels</Text>
1818
<View style={styles.levelsHolder}>
1919
{Object.keys(levels).map((level) => (

app/screens/Settings/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ function SettingsScreen({ navigation }) {
3030
}, [volume]);
3131

3232
return (
33-
<PageView navigation={navigation} style={styles.container} baseStyle={styles.screen}>
33+
<PageView
34+
type="scroll"
35+
navigation={navigation}
36+
style={styles.container}
37+
baseStyle={styles.screen}
38+
>
3439
<Text style={styles.title}>Settings</Text>
3540
<Text style={styles.heading}>Volume: {parseInt(volume * 100, 10)}</Text>
3641
<View>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"redux-immutable": "4.0.0",
7272
"redux-saga": "1.1.3",
7373
"reselect": "4.0.0",
74-
"rn-hgl": "0.6.4"
74+
"rn-hgl": "0.6.5"
7575
},
7676
"devDependencies": {
7777
"@babel/cli": "7.7.5",

0 commit comments

Comments
 (0)