Commit eacf793b authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Use default FlutterActivity in non-plugin examples (#9770)

Brings hello_world and flutter_gallery Android code in line with the
corresponding iOS code.
parent 126cf49d
......@@ -65,7 +65,7 @@ TaskFunction createGalleryBackButtonMemoryTest() {
return new AndroidBackButtonMemoryTest(
'${flutterDirectory.path}/examples/flutter_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
FlutterApplication and put your custom class here. -->
<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:theme="@android:style/Theme.Light.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
......
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
FlutterApplication and put your custom class here. -->
<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:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
......
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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment