Skip to content

Commit 876b2ec

Browse files
Merge branch '127-android-example-migration' into main
2 parents abc9efb + 0f8f2c3 commit 876b2ec

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

example/flutter/objectbox_demo/android/app/src/main/AndroidManifest.xml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.example.objectbox_demo">
3-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4-
calls FlutterMain.startInitialization(this); in its onCreate method.
5-
In most cases you can leave this as-is, but you if you want to provide
6-
additional functionality it is fine to subclass or reimplement
7-
FlutterApplication and put your custom class here. -->
83
<application
9-
android:name="io.flutter.app.FlutterApplication"
104
android:label="objectbox_demo"
115
android:icon="@mipmap/ic_launcher">
6+
7+
<meta-data
8+
android:name="flutterEmbedding"
9+
android:value="2" />
10+
1211
<activity
1312
android:name=".MainActivity"
1413
android:launchMode="singleTop"
1514
android:theme="@style/LaunchTheme"
1615
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1716
android:hardwareAccelerated="true"
1817
android:windowSoftInputMode="adjustResize">
19-
<!-- This keeps the window background of the activity showing
20-
until Flutter renders its first frame. It can be removed if
21-
there is no splash screen (such as the default splash screen
22-
defined in @style/LaunchTheme). -->
18+
<!-- Specify that the launch screen should continue being displayed -->
19+
<!-- until Flutter renders its first frame. -->
2320
<meta-data
24-
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
25-
android:value="true" />
21+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
22+
android:resource="@drawable/launch_background" />
23+
24+
<!-- Theme to apply as soon as Flutter begins rendering frames -->
25+
<meta-data
26+
android:name="io.flutter.embedding.android.NormalTheme"
27+
android:resource="@style/NormalTheme" />
2628
<intent-filter>
2729
<action android:name="android.intent.action.MAIN"/>
2830
<category android:name="android.intent.category.LAUNCHER"/>
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
package com.example.objectbox_demo
22

3-
import android.os.Bundle
4-
import io.flutter.app.FlutterActivity
5-
import io.flutter.plugins.GeneratedPluginRegistrant
3+
import io.flutter.embedding.android.FlutterActivity
64

75
class MainActivity: FlutterActivity() {
8-
override fun onCreate(savedInstanceState: Bundle?) {
9-
super.onCreate(savedInstanceState)
10-
GeneratedPluginRegistrant.registerWith(this)
11-
}
126
}

example/flutter/objectbox_demo/android/app/src/main/res/values/styles.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55
Flutter draws its first frame -->
66
<item name="android:windowBackground">@drawable/launch_background</item>
77
</style>
8+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
9+
<item name="android:windowBackground">@drawable/launch_background</item>
10+
</style>
811
</resources>

0 commit comments

Comments
 (0)