Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Thick black edge/border around a React Native app on Android

Some time back I put together an Android app with React Native. We tested it on a number of devices and haven't had any issues of the sort I'm asking about here.

What I'm asking for here is suggestions about what might be causing this. I'm the developer of the app, but in this case I don't know where to begin.

Recently, someone installed it on an HTC One m7, and there's now this thick black border all the way around the screen where the app should be. There's an image at the end.

You can see the app is still extending the full size it should, but that the edges are blacked out.

This is the first time I've seen this, and after some searching can't seem to find anyone else complaining about this sort of thing. This is the only time I've seen it on any of the devices we've run this on.

Any ideas what might be the cause?

enter image description here

like image 260
Yhilan Avatar asked Apr 19 '17 01:04

Yhilan


2 Answers

In my case, I just remove this line:

<item name="android:windowBackground">@drawable/launch_screen_bitmap</item>

On res/values/styles.xml:

And it works fine.

like image 51
danielfeelfine Avatar answered Nov 10 '22 20:11

danielfeelfine


Removing the <item name="android:windowBackground">@drawable/launch_screen_bitmap</item> solve the issue but you will lost the splash screen. To get the splash screen with background to fill the screen add the bitmap item as follow.

<item>
    <bitmap
        android:gravity="fill_horizontal|fill_vertical"
        android:src="@drawable/background"/>
</item>
like image 36
Filipe Andrade Avatar answered Nov 10 '22 21:11

Filipe Andrade