You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-12 22:57:38 +02:00
Android: Fixes #2694: Remove gap on top of window when there is a notch
This commit is contained in:
@ -1,12 +1,18 @@
|
||||
const React = require('react');
|
||||
import { View, Platform, SafeAreaView, StyleSheet, StatusBar } from 'react-native';
|
||||
import DeviceInfo from 'react-native-device-info';
|
||||
import { View, Platform, SafeAreaView, StyleSheet /* , StatusBar */ } from 'react-native';
|
||||
// import DeviceInfo from 'react-native-device-info';
|
||||
|
||||
// Untested! This should check if the device has a notch and, if it does, apply
|
||||
// an extra padding on top of the screen.
|
||||
const styles = StyleSheet.create({
|
||||
AndroidSafeArea: {
|
||||
paddingTop: Platform.OS === 'android' && DeviceInfo.hasNotch() ? StatusBar.currentHeight : 0,
|
||||
// Disabled for now because it seems that even when there's a notch the system status bar
|
||||
// covers it, and thus we should add our own gap.
|
||||
// Can only test on emulator though
|
||||
// Fixes: https://github.com/laurent22/joplin/issues/2694
|
||||
|
||||
// paddingTop: Platform.OS === 'android' && DeviceInfo.hasNotch() ? StatusBar.currentHeight : 0,
|
||||
paddingTop: 0,
|
||||
},
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user