This repository has been archived by the owner on Jun 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
* [Android] Add the ability of FlatGUI #643
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7663f2b
to
efb0e72
Compare
Generated by 🚫 dangerJS |
efb0e72
to
98cd6b3
Compare
d0d3594
to
20856c6
Compare
24c0ea0
to
e6096d5
Compare
kfeagle
reviewed
Sep 5, 2017
@@ -27,7 +32,9 @@ | |||
import com.taobao.weex.dom.WXTextDomObject; | |||
import com.taobao.weex.dom.flex.Spacing; | |||
import com.taobao.weex.ui.SimpleComponentHolder; | |||
|
|||
import com.taobao.weex.ui.flat.FlatGUIIContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is FlatGUIIContext write more character 'I'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, thank you for figuring out.
78d8e94
to
5b207c9
Compare
…Android 4.4 or below. * [android] Fix LayoutParams in Nested Widget/Views.
* [android] Fix the problem of WXSDKInstance.destroy() invoked twice if WXEmbed present. WXSDKInstance.destroy() will be called by WXSDKInstance.onActivityDestroy()->WXEmbed.onActivityDestroy() ->WXSDKInstance.onActivityDestroy() -> WXSDKInstance.destroy() and WXSDKInstance.onActivityDestroy() -> WXSDKInstance.destroy() -> WXEmbed.destroy() -> WXSDKInstance.destroy().
5b207c9
to
942d032
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As it is known to all that the view hierarchy in android should be reduce as much as possible. The deeper the view hierarchy is, the worse the android app performance . But the front-end engineer is often unaware of the view hierarchy in weex until he/she asked android developer for help.
The main problem of deep view hierarchy is that the implementation of view is expensive and costs lost of CPU/Memory. The cost of a view is basically linear to the length of view hierarchy. It is also unnecessary to create view for some components, like and
as they mostly draw nothing but the objects Weex framework provides. There is no reason we waste limited mobile resource to create view in such scenario.
Suppose the following component structure is given, the view hierarchy will be the same to the component hierarchy, where there is at least 10 views(if there is no children in slider and no wrapper view for slider) and the height of the tree is 5.
With Flatten mechanism enable, the view hierarchy will looks like below with 2 views and the height of view tree is 3. Note, only rounded-rect is marked as view, oval will be marked as a custom drawCommand.
For now, FlatGUI is disabled by default and only support the usage in wxcell.
Ref https://issues.apache.org/jira/browse/WEEX-66
@notdanger