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
0
Merge Requests
0
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
2c898736
Commit
2c898736
authored
Apr 30, 2019
by
Yacumima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面切换闪烁优化
parent
3c4a70e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
android/src/main/java/com/taobao/idlefish/flutterboost/ContainerRecord.java
...ava/com/taobao/idlefish/flutterboost/ContainerRecord.java
+9
-1
android/src/main/java/com/taobao/idlefish/flutterboost/containers/FlutterViewStub.java
...bao/idlefish/flutterboost/containers/FlutterViewStub.java
+3
-3
No files found.
android/src/main/java/com/taobao/idlefish/flutterboost/ContainerRecord.java
View file @
2c898736
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
*/
*/
package
com.taobao.idlefish.flutterboost
;
package
com.taobao.idlefish.flutterboost
;
import
android.os.Handler
;
import
com.taobao.idlefish.flutterboost.NavigationService.NavigationService
;
import
com.taobao.idlefish.flutterboost.NavigationService.NavigationService
;
import
com.taobao.idlefish.flutterboost.interfaces.IContainerManager
;
import
com.taobao.idlefish.flutterboost.interfaces.IContainerManager
;
import
com.taobao.idlefish.flutterboost.interfaces.IContainerRecord
;
import
com.taobao.idlefish.flutterboost.interfaces.IContainerRecord
;
...
@@ -36,6 +38,7 @@ public class ContainerRecord implements IContainerRecord {
...
@@ -36,6 +38,7 @@ public class ContainerRecord implements IContainerRecord {
private
final
IContainerManager
mManager
;
private
final
IContainerManager
mManager
;
private
final
IFlutterViewContainer
mContainer
;
private
final
IFlutterViewContainer
mContainer
;
private
final
String
mUniqueId
;
private
final
String
mUniqueId
;
private
final
Handler
mHandler
=
new
Handler
();
private
int
mState
=
STATE_UNKNOW
;
private
int
mState
=
STATE_UNKNOW
;
private
MethodChannelProxy
mProxy
=
new
MethodChannelProxy
();
private
MethodChannelProxy
mProxy
=
new
MethodChannelProxy
();
...
@@ -85,8 +88,13 @@ public class ContainerRecord implements IContainerRecord {
...
@@ -85,8 +88,13 @@ public class ContainerRecord implements IContainerRecord {
* If current container is finishing, we should call destroy flutter page early.
* If current container is finishing, we should call destroy flutter page early.
*/
*/
if
(
mContainer
.
isFinishing
())
{
if
(
mContainer
.
isFinishing
())
{
mHandler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mProxy
.
destroy
();
mProxy
.
destroy
();
}
}
});
}
}
}
@Override
@Override
...
...
android/src/main/java/com/taobao/idlefish/flutterboost/containers/FlutterViewStub.java
View file @
2c898736
...
@@ -144,12 +144,11 @@ abstract public class FlutterViewStub extends FrameLayout {
...
@@ -144,12 +144,11 @@ abstract public class FlutterViewStub extends FrameLayout {
if
(
flutterView
==
null
)
return
;
if
(
flutterView
==
null
)
return
;
Debuger
.
log
(
"detachFlutterView"
);
if
(
mSnapshot
.
getParent
()
==
null
)
{
if
(
mSnapshot
.
getParent
()
==
null
)
{
mBitmap
=
flutterView
.
getBitmap
();
mBitmap
=
flutterView
.
getBitmap
();
if
(
mBitmap
!=
null
&&
!
mBitmap
.
isRecycled
())
{
if
(
mBitmap
!=
null
&&
!
mBitmap
.
isRecycled
())
{
mSnapshot
.
setImageBitmap
(
mBitmap
);
mSnapshot
.
setImageBitmap
(
mBitmap
);
Debuger
.
log
(
"snapshot view"
);
addView
(
mSnapshot
);
addView
(
mSnapshot
);
}
}
}
}
...
@@ -160,11 +159,12 @@ abstract public class FlutterViewStub extends FrameLayout {
...
@@ -160,11 +159,12 @@ abstract public class FlutterViewStub extends FrameLayout {
@Override
@Override
public
void
run
()
{
public
void
run
()
{
if
(
flutterView
.
getParent
()
!=
null
&&
flutterView
.
getParent
()
==
mStub
)
{
if
(
flutterView
.
getParent
()
!=
null
&&
flutterView
.
getParent
()
==
mStub
)
{
Debuger
.
log
(
"detachFlutterView"
);
mStub
.
removeView
(
flutterView
);
mStub
.
removeView
(
flutterView
);
}
}
}
}
};
};
sHandler
.
sendMessage
(
msg
);
sHandler
.
sendMessage
Delayed
(
msg
,
18
);
}
}
public
void
destroy
()
{
public
void
destroy
()
{
...
...
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