Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
flutter_boost_1.22.4
Commits
675bbce4
Commit
675bbce4
authored
Oct 28, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add getflutterview
parent
77af051a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
android/src/main/java/com/idlefish/flutterboost/containers/FlutterActivityAndFragmentDelegate.java
...rboost/containers/FlutterActivityAndFragmentDelegate.java
+3
-1
android/src/main/java/com/idlefish/flutterboost/containers/NewBoostFlutterActivity.java
...fish/flutterboost/containers/NewBoostFlutterActivity.java
+4
-0
android/src/main/java/com/idlefish/flutterboost/containers/NewFlutterFragment.java
.../idlefish/flutterboost/containers/NewFlutterFragment.java
+5
-0
No files found.
android/src/main/java/com/idlefish/flutterboost/containers/FlutterActivityAndFragmentDelegate.java
View file @
675bbce4
...
@@ -75,13 +75,15 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
...
@@ -75,13 +75,15 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
return
flutterEngine
;
return
flutterEngine
;
}
}
XFlutterView
getFlutterView
(){
return
flutterView
;
}
void
onAttach
(
@NonNull
Context
context
)
{
void
onAttach
(
@NonNull
Context
context
)
{
ensureAlive
();
ensureAlive
();
if
(
NewFlutterBoost
.
instance
().
platform
().
whenEngineStart
()
==
NewFlutterBoost
.
ConfigBuilder
.
FLUTTER_ACTIVITY_CREATED
)
{
if
(
NewFlutterBoost
.
instance
().
platform
().
whenEngineStart
()
==
NewFlutterBoost
.
ConfigBuilder
.
FLUTTER_ACTIVITY_CREATED
)
{
NewFlutterBoost
.
instance
().
doInitialFlutter
();
NewFlutterBoost
.
instance
().
doInitialFlutter
();
}
}
// When "retain instance" is true, the FlutterEngine will survive configuration
// When "retain instance" is true, the FlutterEngine will survive configuration
// changes. Therefore, we create a new one only if one does not already exist.
// changes. Therefore, we create a new one only if one does not already exist.
if
(
flutterEngine
==
null
)
{
if
(
flutterEngine
==
null
)
{
...
...
android/src/main/java/com/idlefish/flutterboost/containers/NewBoostFlutterActivity.java
View file @
675bbce4
...
@@ -21,6 +21,7 @@ import android.view.*;
...
@@ -21,6 +21,7 @@ import android.view.*;
import
android.widget.*
;
import
android.widget.*
;
import
com.idlefish.flutterboost.NewFlutterBoost
;
import
com.idlefish.flutterboost.NewFlutterBoost
;
import
com.idlefish.flutterboost.Utils
;
import
com.idlefish.flutterboost.Utils
;
import
com.idlefish.flutterboost.XFlutterView
;
import
io.flutter.Log
;
import
io.flutter.Log
;
import
io.flutter.embedding.android.DrawableSplashScreen
;
import
io.flutter.embedding.android.DrawableSplashScreen
;
import
io.flutter.embedding.android.FlutterView
;
import
io.flutter.embedding.android.FlutterView
;
...
@@ -243,7 +244,10 @@ public class NewBoostFlutterActivity extends Activity
...
@@ -243,7 +244,10 @@ public class NewBoostFlutterActivity extends Activity
}
}
}
protected
XFlutterView
getFlutterView
(){
return
delegate
.
getFlutterView
();
}
}
@Override
@Override
...
...
android/src/main/java/com/idlefish/flutterboost/containers/NewFlutterFragment.java
View file @
675bbce4
...
@@ -15,6 +15,7 @@ import android.view.View;
...
@@ -15,6 +15,7 @@ import android.view.View;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
com.idlefish.flutterboost.NewFlutterBoost
;
import
com.idlefish.flutterboost.NewFlutterBoost
;
import
com.idlefish.flutterboost.XFlutterView
;
import
io.flutter.embedding.android.*
;
import
io.flutter.embedding.android.*
;
import
io.flutter.embedding.engine.FlutterEngine
;
import
io.flutter.embedding.engine.FlutterEngine
;
import
io.flutter.embedding.engine.FlutterShellArgs
;
import
io.flutter.embedding.engine.FlutterShellArgs
;
...
@@ -233,6 +234,10 @@ public class NewFlutterFragment extends Fragment implements FlutterActivityAndFr
...
@@ -233,6 +234,10 @@ public class NewFlutterFragment extends Fragment implements FlutterActivityAndFr
private
FlutterActivityAndFragmentDelegate
delegate
;
private
FlutterActivityAndFragmentDelegate
delegate
;
protected
XFlutterView
getFlutterView
(){
return
delegate
.
getFlutterView
();
}
public
NewFlutterFragment
()
{
public
NewFlutterFragment
()
{
// Ensure that we at least have an empty Bundle of arguments so that we don't
// Ensure that we at least have an empty Bundle of arguments so that we don't
// need to continually check for null arguments before grabbing one.
// need to continually check for null arguments before grabbing one.
...
...
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