Commit 7860b744 authored by 林生雨's avatar 林生雨

fix flutter

parent 1c7dfad4
......@@ -20,5 +20,6 @@
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
</activity>
<activity android:name=".Temp"/>
</application>
</manifest>
......@@ -10,6 +10,7 @@ import com.taobao.idlefish.flutterboost.FlutterBoostPlugin
import com.taobao.idlefish.flutterboost.containers.BoostFlutterActivity
import io.flutter.app.FlutterActivity
import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.PluginRegistry
......@@ -29,5 +30,12 @@ class MainActivity : FlutterActivity() {
// startActivity(intent)
//
// }
MethodChannel(flutterView, "flutter_bury_channel").setMethodCallHandler { methodCall, result ->
if (methodCall.method.equals("FLUTTER_TO_H5")) {
Log.e("lsy"," WQEWQEWQEQW")
startActivity(Intent(this, Temp::class.java));
}
}
}
}
package com.example.gmalpha_flutter
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
/**
* @author lsy
* @date 2019-10-08
*/
class Temp :AppCompatActivity(){
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_cent);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/home"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/home"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="TEMP 页面"
android:textSize="26sp" />
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
</FrameLayout>
\ No newline at end of file
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