4

Just got the new S8 and I'm trying to update my android (react-native) apps because there is a black bar on top of the screen because of the app scaling of the ratio 37:18 / 18.5:9. Adding fixed height and width to the app doesn't work I still get that black bar in top. Removing the statusbar seems like removing a bit on top and at the bottom.

As an example I created a new react-native app but a native Android has the same problems.

enter image description here

1 Answer 1

4

Got it! Jeej.

Found out via a post of Nato Marin you can just add <meta-data android:name="android.max_aspect" android:value="2.1" /> in the <application> element in your AndroidManifest.xml.

Result: Black bar gone :)

enter image description here

2
  • Hi,I am android developer and I got problem on Samsung s8 and s8+ with image my image display nice in all other device but in s8 and s8 image cut from left and right why this happened i don't know. Please help me ? Jun 14, 2017 at 10:37
  • With the new feature to hide the virtual home and back buttons on the s8 i notice the window dimensions dont update to full reolution causing problems with the layout Jul 7, 2017 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.