false

New Samsung S8 and S8+ have an 18.5:9 screen. And that means Android apps that aren’t designed for these displays might show black bars at the top and bottom. To fix this we need to add additional line to AndroidManifest that will tell os what maximum aspect ratio can our app use:

<meta-data android:name="android.max_aspect" android:value="3.0" />

This should be placed inside aplication tag:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.my.awesome.app" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.INTERNET" /> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" /> <application android:name=".MainApplication" android:allowBackup="true" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:theme="@style/AppTheme"> <meta-data android:name="android.max_aspect" android:value="3.0" /> <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:windowSoftInputMode="adjustResize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

Comments