Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gmalpha_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile
gmalpha_flutter
Commits
7860b744
Commit
7860b744
authored
Oct 08, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix flutter
parent
1c7dfad4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
6 deletions
+39
-6
AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+1
-0
MainActivity.kt
...c/main/kotlin/com/example/gmalpha_flutter/MainActivity.kt
+8
-0
Temp.kt
...d/app/src/main/kotlin/com/example/gmalpha_flutter/Temp.kt
+17
-0
activity_cent.xml
android/app/src/main/res/layout/activity_cent.xml
+13
-6
No files found.
android/app/src/main/AndroidManifest.xml
View file @
7860b744
...
...
@@ -20,5 +20,6 @@
android:name=
"io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value=
"true"
/>
</activity>
<activity
android:name=
".Temp"
/>
</application>
</manifest>
android/app/src/main/kotlin/com/example/gmalpha_flutter/MainActivity.kt
View file @
7860b744
...
...
@@ -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
));
}
}
}
}
android/app/src/main/kotlin/com/example/gmalpha_flutter/Temp.kt
0 → 100644
View file @
7860b744
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
android/app/src/main/res/layout/activity_cent.xml
View file @
7860b744
<?xml version="1.0" encoding="utf-8"?>
<
android.support.constraint.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Frame
Layout
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment