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
925e30e8
Commit
925e30e8
authored
Oct 31, 2019
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
onRestoreInstanceState 问题修复
parent
978ca55c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
android/src/main/java/com/idlefish/flutterboost/containers/FlutterSplashView.java
...m/idlefish/flutterboost/containers/FlutterSplashView.java
+15
-20
No files found.
android/src/main/java/com/idlefish/flutterboost/containers/FlutterSplashView.java
View file @
925e30e8
...
...
@@ -92,23 +92,22 @@ public class FlutterSplashView extends FrameLayout {
}
@Nullable
@Override
protected
Parcelable
onSaveInstanceState
()
{
Parcelable
superState
=
super
.
onSaveInstanceState
();
SavedState
savedState
=
new
SavedState
(
superState
);
savedState
.
previousCompletedSplashIsolate
=
previousCompletedSplashIsolate
;
savedState
.
splashScreenState
=
splashScreen
!=
null
?
splashScreen
.
saveSplashScreenState
()
:
null
;
FlutterSplashView
.
SavedState
savedState
=
new
FlutterSplashView
.
SavedState
(
superState
);
savedState
.
previousCompletedSplashIsolate
=
this
.
previousCompletedSplashIsolate
;
savedState
.
splashScreenState
=
this
.
splashScreen
!=
null
?
this
.
splashScreen
.
saveSplashScreenState
()
:
null
;
return
savedState
;
}
@Override
protected
void
onRestoreInstanceState
(
Parcelable
state
)
{
SavedState
savedState
=
(
SavedState
)
state
;
FlutterSplashView
.
SavedState
savedState
=
(
FlutterSplashView
.
SavedState
)
state
;
super
.
onRestoreInstanceState
(
savedState
.
getSuperState
());
previousCompletedSplashIsolate
=
savedState
.
previousCompletedSplashIsolate
;
splashScreenState
=
savedState
.
splashScreenState
;
this
.
previousCompletedSplashIsolate
=
savedState
.
previousCompletedSplashIsolate
;
this
.
splashScreenState
=
savedState
.
splashScreenState
;
}
/**
* Displays the given {@code splashScreen} on top of the given {@code flutterView} until
* Flutter has rendered its first frame, then the {@code splashScreen} is transitioned away.
...
...
@@ -259,17 +258,14 @@ public class FlutterSplashView extends FrameLayout {
public
static
class
SavedState
extends
BaseSavedState
{
public
static
Creator
CREATOR
=
new
Creator
()
{
@Override
public
SavedState
createFromParcel
(
Parcel
source
)
{
return
new
SavedState
(
source
);
public
FlutterSplashView
.
SavedState
createFromParcel
(
Parcel
source
)
{
return
new
FlutterSplashView
.
SavedState
(
source
);
}
@Override
public
SavedState
[]
newArray
(
int
size
)
{
return
new
SavedState
[
size
];
public
FlutterSplashView
.
SavedState
[]
newArray
(
int
size
)
{
return
new
FlutterSplashView
.
SavedState
[
size
];
}
};
private
String
previousCompletedSplashIsolate
;
private
Bundle
splashScreenState
;
...
...
@@ -279,15 +275,14 @@ public class FlutterSplashView extends FrameLayout {
SavedState
(
Parcel
source
)
{
super
(
source
);
previousCompletedSplashIsolate
=
source
.
readString
();
splashScreenState
=
source
.
readBundle
(
getClass
().
getClassLoader
());
this
.
previousCompletedSplashIsolate
=
source
.
readString
();
this
.
splashScreenState
=
source
.
readBundle
(
this
.
getClass
().
getClassLoader
());
}
@Override
public
void
writeToParcel
(
Parcel
out
,
int
flags
)
{
super
.
writeToParcel
(
out
,
flags
);
out
.
writeString
(
previousCompletedSplashIsolate
);
out
.
writeBundle
(
splashScreenState
);
out
.
writeString
(
this
.
previousCompletedSplashIsolate
);
out
.
writeBundle
(
this
.
splashScreenState
);
}
}
...
...
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