mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Use default FlutterActivity in non-plugin examples (#9770)
Brings hello_world and flutter_gallery Android code in line with the corresponding iOS code.
This commit is contained in:
parent
126cf49d26
commit
eacf793b35
@ -65,7 +65,7 @@ TaskFunction createGalleryBackButtonMemoryTest() {
|
|||||||
return new AndroidBackButtonMemoryTest(
|
return new AndroidBackButtonMemoryTest(
|
||||||
'${flutterDirectory.path}/examples/flutter_gallery',
|
'${flutterDirectory.path}/examples/flutter_gallery',
|
||||||
'io.flutter.examples.gallery',
|
'io.flutter.examples.gallery',
|
||||||
'io.flutter.examples.gallery.MainActivity',
|
'io.flutter.app.FlutterActivity',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
additional functionality it is fine to subclass or reimplement
|
additional functionality it is fine to subclass or reimplement
|
||||||
FlutterApplication and put your custom class here. -->
|
FlutterApplication and put your custom class here. -->
|
||||||
<application android:name="io.flutter.app.FlutterApplication" android:label="Gallery" android:icon="@mipmap/ic_launcher">
|
<application android:name="io.flutter.app.FlutterApplication" android:label="Gallery" android:icon="@mipmap/ic_launcher">
|
||||||
<activity android:name=".MainActivity"
|
<activity android:name="io.flutter.app.FlutterActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:theme="@android:style/Theme.Light.NoTitleBar"
|
android:theme="@android:style/Theme.Light.NoTitleBar"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package io.flutter.examples.gallery;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import io.flutter.app.FlutterActivity;
|
|
||||||
import io.flutter.plugins.PluginRegistry;
|
|
||||||
|
|
||||||
public class MainActivity extends FlutterActivity {
|
|
||||||
PluginRegistry pluginRegistry;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
pluginRegistry = new PluginRegistry();
|
|
||||||
pluginRegistry.registerAll(this);
|
|
||||||
}
|
|
||||||
}
|
|
@ -22,7 +22,7 @@
|
|||||||
additional functionality it is fine to subclass or reimplement
|
additional functionality it is fine to subclass or reimplement
|
||||||
FlutterApplication and put your custom class here. -->
|
FlutterApplication and put your custom class here. -->
|
||||||
<application android:name="io.flutter.app.FlutterApplication" android:label="hello_world" android:icon="@mipmap/ic_launcher">
|
<application android:name="io.flutter.app.FlutterApplication" android:label="hello_world" android:icon="@mipmap/ic_launcher">
|
||||||
<activity android:name=".MainActivity"
|
<activity android:name="io.flutter.app.FlutterActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:theme="@android:style/Theme.Black.NoTitleBar"
|
android:theme="@android:style/Theme.Black.NoTitleBar"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package io.flutter.examples.hello_world;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import io.flutter.app.FlutterActivity;
|
|
||||||
import io.flutter.plugins.PluginRegistry;
|
|
||||||
|
|
||||||
public class MainActivity extends FlutterActivity {
|
|
||||||
PluginRegistry pluginRegistry;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
pluginRegistry = new PluginRegistry();
|
|
||||||
pluginRegistry.registerAll(this);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user