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
652c012f
Commit
652c012f
authored
Oct 22, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复闪一下问题
parent
f7287a70
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
59 deletions
+8
-59
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
...src/main/java/com/idlefish/flutterboost/XFlutterView.java
+1
-1
android/src/main/java/com/idlefish/flutterboost/containers/FlutterActivityAndFragmentDelegate.java
...rboost/containers/FlutterActivityAndFragmentDelegate.java
+1
-17
android/src/main/java/com/idlefish/flutterboost/containers/FlutterSplashView.java
...m/idlefish/flutterboost/containers/FlutterSplashView.java
+6
-1
android/src/main/java/com/idlefish/flutterboost/containers/NewBoostFlutterActivity.java
...fish/flutterboost/containers/NewBoostFlutterActivity.java
+0
-8
android/src/main/java/com/idlefish/flutterboost/containers/NewFlutterFragment.java
.../idlefish/flutterboost/containers/NewFlutterFragment.java
+0
-32
No files found.
android/src/main/java/com/idlefish/flutterboost/XFlutterView.java
View file @
652c012f
...
@@ -686,7 +686,7 @@ public class XFlutterView extends FrameLayout {
...
@@ -686,7 +686,7 @@ public class XFlutterView extends FrameLayout {
resolveMemoryLeaks
();
resolveMemoryLeaks
();
// Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface.
// Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface.
FlutterRenderer
flutterRenderer
=
flutterEngine
.
getRenderer
();
FlutterRenderer
flutterRenderer
=
flutterEngine
.
getRenderer
();
didRenderFirstFrame
=
false
;
//
didRenderFirstFrame = false;
flutterRenderer
.
removeOnFirstFrameRenderedListener
(
onFirstFrameRenderedListener
);
flutterRenderer
.
removeOnFirstFrameRenderedListener
(
onFirstFrameRenderedListener
);
flutterRenderer
.
detachFromRenderSurface
();
flutterRenderer
.
detachFromRenderSurface
();
flutterEngine
=
null
;
flutterEngine
=
null
;
...
...
android/src/main/java/com/idlefish/flutterboost/containers/FlutterActivityAndFragmentDelegate.java
View file @
652c012f
...
@@ -28,7 +28,6 @@ import io.flutter.app.FlutterActivity;
...
@@ -28,7 +28,6 @@ import io.flutter.app.FlutterActivity;
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
;
import
io.flutter.embedding.engine.renderer.OnFirstFrameRenderedListener
;
import
io.flutter.plugin.platform.PlatformPlugin
;
import
io.flutter.plugin.platform.PlatformPlugin
;
import
io.flutter.view.FlutterMain
;
import
io.flutter.view.FlutterMain
;
...
@@ -56,15 +55,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
...
@@ -56,15 +55,7 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
protected
IOperateSyncer
mSyncer
;
protected
IOperateSyncer
mSyncer
;
@NonNull
private
final
OnFirstFrameRenderedListener
onFirstFrameRenderedListener
=
new
OnFirstFrameRenderedListener
()
{
@Override
public
void
onFirstFrameRendered
()
{
if
(
host
!=
null
){
host
.
onFirstFrameRendered
();
}
}
};
FlutterActivityAndFragmentDelegate
(
@NonNull
Host
host
)
{
FlutterActivityAndFragmentDelegate
(
@NonNull
Host
host
)
{
this
.
host
=
host
;
this
.
host
=
host
;
...
@@ -171,7 +162,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
...
@@ -171,7 +162,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
ensureAlive
();
ensureAlive
();
flutterView
=
new
XFlutterView
(
host
.
getActivity
(),
NewFlutterBoost
.
instance
().
platform
().
renderMode
(),
host
.
getTransparencyMode
());
flutterView
=
new
XFlutterView
(
host
.
getActivity
(),
NewFlutterBoost
.
instance
().
platform
().
renderMode
(),
host
.
getTransparencyMode
());
flutterView
.
addOnFirstFrameRenderedListener
(
onFirstFrameRenderedListener
);
flutterSplashView
=
new
FlutterSplashView
(
host
.
getContext
());
flutterSplashView
=
new
FlutterSplashView
(
host
.
getContext
());
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
JELLY_BEAN_MR1
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
JELLY_BEAN_MR1
)
{
...
@@ -247,7 +237,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
...
@@ -247,7 +237,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
mSyncer
.
onDestroy
();
mSyncer
.
onDestroy
();
ensureAlive
();
ensureAlive
();
flutterView
.
removeOnFirstFrameRenderedListener
(
onFirstFrameRenderedListener
);
}
}
...
@@ -512,11 +501,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
...
@@ -512,11 +501,6 @@ public class FlutterActivityAndFragmentDelegate implements IFlutterViewContaine
*/
*/
boolean
shouldAttachEngineToActivity
();
boolean
shouldAttachEngineToActivity
();
/**
* Invoked by this delegate when its {@link FlutterView} has rendered its first Flutter
* frame.
*/
void
onFirstFrameRendered
();
void
finishContainer
(
Map
<
String
,
Object
>
result
)
;
void
finishContainer
(
Map
<
String
,
Object
>
result
)
;
...
...
android/src/main/java/com/idlefish/flutterboost/containers/FlutterSplashView.java
View file @
652c012f
...
@@ -39,6 +39,8 @@ public class FlutterSplashView extends FrameLayout {
...
@@ -39,6 +39,8 @@ public class FlutterSplashView extends FrameLayout {
@Nullable
@Nullable
private
String
previousCompletedSplashIsolate
;
private
String
previousCompletedSplashIsolate
;
private
boolean
hasRendered
=
false
;
@NonNull
@NonNull
private
final
FlutterView
.
FlutterEngineAttachmentListener
flutterEngineAttachmentListener
=
new
FlutterView
.
FlutterEngineAttachmentListener
()
{
private
final
FlutterView
.
FlutterEngineAttachmentListener
flutterEngineAttachmentListener
=
new
FlutterView
.
FlutterEngineAttachmentListener
()
{
@Override
@Override
...
@@ -57,8 +59,11 @@ public class FlutterSplashView extends FrameLayout {
...
@@ -57,8 +59,11 @@ public class FlutterSplashView extends FrameLayout {
private
final
OnFirstFrameRenderedListener
onFirstFrameRenderedListener
=
new
OnFirstFrameRenderedListener
()
{
private
final
OnFirstFrameRenderedListener
onFirstFrameRenderedListener
=
new
OnFirstFrameRenderedListener
()
{
@Override
@Override
public
void
onFirstFrameRendered
()
{
public
void
onFirstFrameRendered
()
{
if
(
splashScreen
!=
null
)
{
if
(
splashScreen
!=
null
&&!
hasRendered
)
{
transitionToFlutter
();
transitionToFlutter
();
hasRendered
=
true
;
Log
.
i
(
"xxxxxx22222"
,
this
.
hashCode
()+
""
);
}
}
}
}
};
};
...
...
android/src/main/java/com/idlefish/flutterboost/containers/NewBoostFlutterActivity.java
View file @
652c012f
...
@@ -466,14 +466,6 @@ public class NewBoostFlutterActivity extends Activity
...
@@ -466,14 +466,6 @@ public class NewBoostFlutterActivity extends Activity
return
true
;
return
true
;
}
}
@Override
public
void
onFirstFrameRendered
()
{
}
...
...
android/src/main/java/com/idlefish/flutterboost/containers/NewFlutterFragment.java
View file @
652c012f
...
@@ -232,20 +232,6 @@ public class NewFlutterFragment extends Fragment implements FlutterActivityAndFr
...
@@ -232,20 +232,6 @@ public class NewFlutterFragment extends Fragment implements FlutterActivityAndFr
// implementation for details about why it exists.
// implementation for details about why it exists.
private
FlutterActivityAndFragmentDelegate
delegate
;
private
FlutterActivityAndFragmentDelegate
delegate
;
private
final
OnFirstFrameRenderedListener
onFirstFrameRenderedListener
=
new
OnFirstFrameRenderedListener
()
{
@Override
public
void
onFirstFrameRendered
()
{
// Notify our subclasses that the first frame has been rendered.
NewFlutterFragment
.
this
.
onFirstFrameRendered
();
// Notify our owning Activity that the first frame has been rendered.
FragmentActivity
fragmentActivity
=
getActivity
();
if
(
fragmentActivity
instanceof
OnFirstFrameRenderedListener
)
{
OnFirstFrameRenderedListener
activityAsListener
=
(
OnFirstFrameRenderedListener
)
fragmentActivity
;
activityAsListener
.
onFirstFrameRendered
();
}
}
};
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
...
@@ -502,24 +488,6 @@ public class NewFlutterFragment extends Fragment implements FlutterActivityAndFr
...
@@ -502,24 +488,6 @@ public class NewFlutterFragment extends Fragment implements FlutterActivityAndFr
return
getArguments
().
getBoolean
(
ARG_SHOULD_ATTACH_ENGINE_TO_ACTIVITY
);
return
getArguments
().
getBoolean
(
ARG_SHOULD_ATTACH_ENGINE_TO_ACTIVITY
);
}
}
/**
* Invoked after the {@link FlutterView} within this {@code NewFlutterFragment} renders its first
* frame.
* <p>
* This method forwards {@code onFirstFrameRendered()} to its attached {@code Activity}, if
* the attached {@code Activity} implements {@link OnFirstFrameRenderedListener}.
* <p>
* Subclasses that override this method must call through to the {@code super} method.
* <p>
* Used by this {@code NewFlutterFragment}'s {@link FlutterActivityAndFragmentDelegate.Host}
*/
@Override
public
void
onFirstFrameRendered
()
{
FragmentActivity
attachedActivity
=
getActivity
();
if
(
attachedActivity
instanceof
OnFirstFrameRenderedListener
)
{
((
OnFirstFrameRenderedListener
)
attachedActivity
).
onFirstFrameRendered
();
}
}
@Override
@Override
public
void
finishContainer
(
Map
<
String
,
Object
>
result
)
{
public
void
finishContainer
(
Map
<
String
,
Object
>
result
)
{
...
...
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