diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index bed531f4..f6f8d3a7 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -12,10 +12,9 @@ In most cases you can leave this as-is, but you if you want to provide additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> - <application - android:name="io.flutter.app.FlutterApplication" - android:label="dicee" - android:icon="@mipmap/ic_launcher"> + <application><meta-data + android:name="flutterEmbedding" + android:value="2" /> <activity android:name=".MainActivity" android:launchMode="singleTop" @@ -23,13 +22,19 @@ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> - <!-- This keeps the window background of the activity showing - until Flutter renders its first frame. It can be removed if - there is no splash screen (such as the default splash screen - defined in @style/LaunchTheme). --> + <!-- Specify that the launch screen should continue being displayed --> + <!-- until Flutter renders its first frame. --> <meta-data - android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" - android:value="true" /> + android:name="io.flutter.embedding.android.SplashScreenDrawable" + android:resource="@drawable/launch_background" /> + + <!-- Theme to apply as soon as Flutter begins rendering frames --> + <meta-data + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> diff --git a/android/app/src/main/java/co/appbrewery/dicee/MainActivity.java b/android/app/src/main/java/co/appbrewery/dicee/MainActivity.java index 0c8f4efe..6e8909a0 100644 --- a/android/app/src/main/java/co/appbrewery/dicee/MainActivity.java +++ b/android/app/src/main/java/co/appbrewery/dicee/MainActivity.java @@ -1,13 +1,7 @@ package co.appbrewery.dicee; -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; +import io.flutter.embedding.android.FlutterActivity; public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } + } diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 00fa4417..c745a5ef 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -5,4 +5,7 @@ Flutter draws its first frame --> <item name="android:windowBackground">@drawable/launch_background</item> </style> + <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> + <item name="android:windowBackground">@drawable/launch_background</item> + </style> </resources>