Hide Notch grey background when launching splash screen - react-native

For react-native app on Android For the devices with Notch -
I am able to use full screen mode on all screens except Splash screen by this code : This code basically uses full screen even behind the notch.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
layoutParams.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
getWindow().setAttributes(layoutParams);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
I need to use full screen mode on Splash screen as well. It shows grey / default bg color as shown below.

Related

How to use an horizontal scrollView while using createMaterialTopTabNavigator with swiping enabled, REACT NATIVE

i'm using createMaterialTopTabNavigator with a swipeEnabled set to True to navigate between screens, I have a Screen which contains an horizontal scrollView, the problems is that the scrollView isn't working, since whenever i try to scroll it horizontally the screen just changes to the next one.
I'd like to be able to disable the swipeEnabled when i swipe in the scrollView.
PS: i tried doing it dynamically by passing a variable to the Screen and a method that sets it to false using onTouchStart, but it's slower than the swiping event of the screen so it end up swiping to the next screen before onTouchStart event start.

Swipeable area in react-native-swiper

Is there any way we can set the swipe able area in react-native-swiper? For example, from the mock screen, I would like the screen to be swiped only when the user swipe on the area marked by black border.
PS: The default behaviour is to let the screen swipe from any where in the swiper component.
Mock Screen

How to place createMaterialTopTabNavigator, underneath to the drawer navigator and page title

I am trying to create a mobile app using react native. I am using react navigation 4. I wanted to create a top bar navigation in a screen. That's why i used createMaterialTopTabNavigator. the top bas has two tab Ongoing and Finished. Now the top bar tab placed to the top of the app. But I want to place it underneath the left drawer navigator and the screen title. Please see this image. https://sarderitworld.com/demo/toptab.png
I am not getting any option for do this.
const deleveriesBottomTabWIthTopTabs = createMaterialTopTabNavigator({
OnGoing : DeleveriesOnGoingStackNavigator,
Finished : DeleveriesFinishedStackNavigator
})
const boottomTabNavigator = createBottomTabNavigator({
Deleveries : deleveriesBottomTabWIthTopTabs,
Request: RequestAsSenderStackNavigator
})
I want to place the top tab bar underneath after the left drawer menu and screen title.

Image orientation issue in android react native

i'm using CameraRoll.getPhotos for get photos from gallery.
import {
CameraRoll,
} from 'react-native';
CameraRoll.getPhotos(fetchParams).then((data) => {
});
I have a problem with the orientation of the images on some android phones. I have been able to detect what happens in most SAMSUNGs.
It has an orientation depending on the way you take the picture.
portrait with home button in bottom position: 90º
landscape with home button left position: 180º
portrait with home button in top position: 270º
landscape with home button right position: 0º
Related with this issue
Base on CameraRoll Documentation the orientation value is not returned by getPhotos.
I'm try with:
transform: [{ rotateX: '0deg' }, { rotateY: '0deg' }] or rotate: '0deg'
Using react-native-media-meta for get metadata info (not works)
Use another image component instead native Image
but notting works. :(
The problem is that the images appear rotated in my application, but in the native gallery ignores the degree of rotation they have and shows them correctly with 0º.
Example:
In this case the image appear with 90º and it's showed perfectly by native gallery but bad in my app.
- Is there any way to detect the current rotation of the image?
- Can the <Image> component be forced in some way to place the orientation at 0º?
UPDATE:
i found a library this module and its possible get the orientation of image and with that can fix this problem. But this process is very delayed and affect considerably the perfomance.

How to show full screen button in uwp win10

In win8 metro app, a button that can make app full screen in status bar when click it the status bar will hidden, how can show this button in Win10 uwp?
ApplicationView view = ApplicationView.GetForCurrentView();
bool isInFullScreenMode = view.IsFullScreenMode;
view.TryEnterFullScreenMode();