[GitHub] incubator-weex pull request #697: fix exec js exception on android7.1.1 plat...
Github user yuhun-alibaba closed the pull request at: https://github.com/apache/incubator-weex/pull/697 ---
[GitHub] incubator-weex pull request #697: fix exec js exception on android7.1.1 plat...
GitHub user yuhun-alibaba reopened a pull request: https://github.com/apache/incubator-weex/pull/697 fix exec js exception on android7.1.1 platform fix exec js exception (new Date("2018/12/12")) on android7.1.1 platform add crash log collect You can merge this pull request into a Git repository by running: $ git pull https://github.com/yuhun-alibaba/incubator-weex 0.16-dev-debug Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/697.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #697 commit 595ded47e5ffba84d0f9f3e74bd021d4859da758 Author: yuhun-alibabaDate: 2017-09-13T09:13:07Z fix exec js exception on android7.1.1 platform commit de67bd868673e52342a33605006a6a131d516edd Author: 御é Date: 2017-09-13T16:53:01Z do not let same crash page reload again on short time ---
[GitHub] incubator-weex issue #698: * [ios] support multi roles for accessibiliity
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/698 Warnings :warning: No Changelog changes! :warning: This PR should update related documents as well. Messages :book: According to the blame info, we recommended @boboning , @cxfeng1 to be the reviewers. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS ---
[GitHub] incubator-weex pull request #698: * [ios] support multi roles for accessibil...
GitHub user acton393 opened a pull request: https://github.com/apache/incubator-weex/pull/698 * [ios] support multi roles for accessibiliity You can merge this pull request into a Git repository by running: $ git pull https://github.com/acton393/incubator-weex ios-feature-accessibility Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/698.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #698 commit 16fb0d95645fc3e08cf5a0af66c6da75b4e28433 Author: acton393Date: 2017-09-12T15:48:08Z * [ios] support more role commit 70d421b95526fa6835dc0040860d0c815d11135c Author: acton393 Date: 2017-09-12T15:49:19Z * [ios] support multi roles commit 72e80f92b0d92169298278b0d8de16a1e996e191 Author: acton393 Date: 2017-09-12T15:54:24Z * [ios] update roles ---
[GitHub] incubator-weex pull request #696: * [ios] clear toast queue when instance di...
GitHub user acton393 reopened a pull request: https://github.com/apache/incubator-weex/pull/696 * [ios] clear toast queue when instance disappear @notdanger You can merge this pull request into a Git repository by running: $ git pull https://github.com/acton393/incubator-weex ios-feature-modal-toast Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/696.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #696 commit c8c73cd01fe94a2a0b5068808cc3776e6d6ecb00 Author: acton393Date: 2017-09-13T08:16:23Z * [ios] clear toast queue when instance disappear ---
[GitHub] incubator-weex pull request #696: * [ios] clear toast queue when instance di...
Github user acton393 closed the pull request at: https://github.com/apache/incubator-weex/pull/696 ---
[GitHub] incubator-weex pull request #696: * [ios] clear toast queue when instance di...
Github user acton393 commented on a diff in the pull request: https://github.com/apache/incubator-weex/pull/696#discussion_r138793696 --- Diff: ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m --- @@ -378,7 +379,8 @@ - (void)destroyInstance if(url.length > 0){ [WXPrerenderManager addGlobalTask:url callback:nil]; } - +NSMutableArray * toastQueue = [[WXToastManager sharedManager] valueForKey:@"toastQueue"]; --- End diff -- Singleton method for sharedManager will initialize toastQueue as a mutableArrayï¼ here I just removeAllObject. In other side , if toastQueue is nil, sending message to nil value will take no effect. ---
[GitHub] incubator-weex pull request #697: fix exec js exception on android7.1.1 plat...
GitHub user yuhun-alibaba reopened a pull request: https://github.com/apache/incubator-weex/pull/697 fix exec js exception on android7.1.1 platform fix exec js exception (new Date("2018/12/12")) on android7.1.1 platform add crash log collect You can merge this pull request into a Git repository by running: $ git pull https://github.com/yuhun-alibaba/incubator-weex 0.16-dev-debug Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/697.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #697 commit 595ded47e5ffba84d0f9f3e74bd021d4859da758 Author: yuhun-alibabaDate: 2017-09-13T09:13:07Z fix exec js exception on android7.1.1 platform ---
[GitHub] incubator-weex pull request #697: fix exec js exception on android7.1.1 plat...
Github user yuhun-alibaba closed the pull request at: https://github.com/apache/incubator-weex/pull/697 ---
[GitHub] incubator-weex pull request #697: fix exec js exception on android7.1.1 plat...
Github user yuhun-alibaba closed the pull request at: https://github.com/apache/incubator-weex/pull/697 ---
[GitHub] incubator-weex pull request #697: fix exec js exception on android7.1.1 plat...
GitHub user yuhun-alibaba reopened a pull request: https://github.com/apache/incubator-weex/pull/697 fix exec js exception on android7.1.1 platform fix exec js exception (new Date("2018/12/12")) on android7.1.1 platform add crash log collect You can merge this pull request into a Git repository by running: $ git pull https://github.com/yuhun-alibaba/incubator-weex 0.16-dev-debug Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/697.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #697 commit 595ded47e5ffba84d0f9f3e74bd021d4859da758 Author: yuhun-alibabaDate: 2017-09-13T09:13:07Z fix exec js exception on android7.1.1 platform ---
[1/3] incubator-weex git commit: fix jsc crash for new Date("XXX")
Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 20b0a434a -> ed0a8dc1a fix jsc crash for new Date("XXX") Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/32699073 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/32699073 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/32699073 Branch: refs/heads/0.16-dev Commit: 32699073025ec70aac4730895892f75962262cf7 Parents: 701c4b9 Author: 御éAuthored: Wed Sep 13 15:10:43 2017 +0800 Committer: 御é Committed: Wed Sep 13 16:51:19 2017 +0800 -- android/sdk/libs/armeabi/libweexjsc.so | Bin 325660 -> 325660 bytes android/sdk/libs/armeabi/libweexjss.so | Bin 6754012 -> 6754016 bytes 2 files changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/32699073/android/sdk/libs/armeabi/libweexjsc.so -- diff --git a/android/sdk/libs/armeabi/libweexjsc.so b/android/sdk/libs/armeabi/libweexjsc.so index d3fb7e7..b08a455 100755 Binary files a/android/sdk/libs/armeabi/libweexjsc.so and b/android/sdk/libs/armeabi/libweexjsc.so differ http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/32699073/android/sdk/libs/armeabi/libweexjss.so -- diff --git a/android/sdk/libs/armeabi/libweexjss.so b/android/sdk/libs/armeabi/libweexjss.so index c0236b6..13e5bc6 100755 Binary files a/android/sdk/libs/armeabi/libweexjss.so and b/android/sdk/libs/armeabi/libweexjss.so differ
[2/3] incubator-weex git commit: Merge branch '0.16-github-dev' into 0.16-dev
Merge branch '0.16-github-dev' into 0.16-dev * 0.16-github-dev: - [android] Remove useless method. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8ea57af1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8ea57af1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8ea57af1 Branch: refs/heads/0.16-dev Commit: 8ea57af15b869b8d899eecc856f9ea4cdf2d30b0 Parents: 3269907 96c52ae Author: atomtongAuthored: Wed Sep 13 17:40:53 2017 +0800 Committer: atomtong Committed: Wed Sep 13 17:40:53 2017 +0800 -- .../main/java/com/taobao/weex/dom/WXStyle.java | 17 - .../weex/ui/view/border/BorderCorner.java | 37 +++- .../taobao/weex/ui/view/border/BorderUtil.java | 26 -- .../weex/ui/view/border/BottomLeftCorner.java | 7 +--- .../weex/ui/view/border/BottomRightCorner.java | 7 +--- .../weex/ui/view/border/TopLeftCorner.java | 7 +--- .../weex/ui/view/border/TopRightCorner.java | 7 +--- .../com/taobao/weex/utils/FunctionParser.java | 6 8 files changed, 25 insertions(+), 89 deletions(-) --
[3/3] incubator-weex git commit: Merge branch '0.16-dev' into 0.16-dev-gitlab
Merge branch '0.16-dev' into 0.16-dev-gitlab Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ed0a8dc1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ed0a8dc1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ed0a8dc1 Branch: refs/heads/0.16-dev Commit: ed0a8dc1a1d6ccdafaa39ea29913df516265d227 Parents: 8ea57af 20b0a43 Author: YorkShenAuthored: Wed Sep 13 18:06:22 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 18:06:22 2017 +0800 -- .../alibaba/weex/benchmark/BenchmarkTest.java | 29 ++-- .../java/com/taobao/weex/WXSDKInstance.java | 75 ++ .../java/com/taobao/weex/common/Constants.java | 2 + .../com/taobao/weex/dom/ImmutableDomObject.java | 21 ++- .../taobao/weex/ui/component/WXComponent.java | 143 +- .../com/taobao/weex/ui/component/WXDiv.java | 74 +- .../com/taobao/weex/ui/component/WXSlider.java | 4 +- .../com/taobao/weex/ui/component/WXText.java| 65 + .../taobao/weex/ui/component/WXVContainer.java | 44 -- .../taobao/weex/ui/component/list/WXCell.java | 61 +++- .../weex/ui/component/list/WXListComponent.java | 53 --- .../com/taobao/weex/ui/flat/FlatComponent.java | 33 + .../com/taobao/weex/ui/flat/FlatGUIContext.java | 146 +++ .../taobao/weex/ui/flat/WidgetContainer.java| 93 .../weex/ui/flat/widget/AndroidViewWidget.java | 76 ++ .../taobao/weex/ui/flat/widget/BaseWidget.java | 130 + .../taobao/weex/ui/flat/widget/TextWidget.java | 49 +++ .../com/taobao/weex/ui/flat/widget/Widget.java | 51 +++ .../taobao/weex/ui/flat/widget/WidgetGroup.java | 54 +++ .../com/taobao/weex/ui/view/WXFrameLayout.java | 53 ++- .../java/com/taobao/weex/utils/WXViewUtils.java | 31 .../com/taobao/weex/ui/component/WXDivTest.java | 12 +- .../taobao/weex/ui/component/WXTextTest.java| 18 +-- 23 files changed, 1125 insertions(+), 192 deletions(-) --
[GitHub] incubator-weex issue #697: fix exec js exception on android7.1.1 platform
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/697 Warnings :warning: No Changelog changes! Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS ---
[GitHub] incubator-weex pull request #697: fix exec js exception on android7.1.1 plat...
GitHub user yuhun-alibaba opened a pull request: https://github.com/apache/incubator-weex/pull/697 fix exec js exception on android7.1.1 platform fix exec js exception (new Date("2018/12/12")) on android7.1.1 platform add crash log collect You can merge this pull request into a Git repository by running: $ git pull https://github.com/yuhun-alibaba/incubator-weex 0.16-dev-debug Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/697.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #697 commit 595ded47e5ffba84d0f9f3e74bd021d4859da758 Author: yuhun-alibabaDate: 2017-09-13T09:13:07Z fix exec js exception on android7.1.1 platform ---
[10/12] incubator-weex git commit: * [android] Clip widget according to their border-radius.
* [android] Clip widget according to their border-radius. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f9019f4a Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f9019f4a Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f9019f4a Branch: refs/heads/0.16-dev Commit: f9019f4a89d6594e8d9241125077a1686a9f6519 Parents: 942d032 Author: YorkShenAuthored: Wed Sep 13 16:59:52 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:59:52 2017 +0800 -- .../taobao/weex/ui/flat/widget/BaseWidget.java | 19 ++-- .../com/taobao/weex/ui/flat/widget/Widget.java | 5 .../taobao/weex/ui/flat/widget/WidgetGroup.java | 4 +++ .../java/com/taobao/weex/utils/WXViewUtils.java | 31 4 files changed, 56 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f9019f4a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/BaseWidget.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/BaseWidget.java b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/BaseWidget.java index 6e226be..02432dc 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/BaseWidget.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/BaseWidget.java @@ -24,11 +24,13 @@ import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.annotation.RestrictTo; import android.support.annotation.RestrictTo.Scope; import android.view.View; import com.taobao.weex.ui.flat.FlatGUIContext; import com.taobao.weex.ui.view.border.BorderDrawable; +import com.taobao.weex.utils.WXViewUtils; @RestrictTo(Scope.LIBRARY) abstract class BaseWidget implements Widget { @@ -79,15 +81,26 @@ abstract class BaseWidget implements Widget { @NonNull @Override - public Point getLocInFlatContainer() { + public final Point getLocInFlatContainer() { return offsetOfContainer; } + @Nullable + @Override + public final BorderDrawable getBackgroundAndBorder() { +return backgroundBorder; + } + + @NonNull + @Override + public final Rect getBorderBox() { +return borderBox; + } + @Override public final void draw(@NonNull Canvas canvas) { canvas.save(); -//TODO clip according to path, not borderBox -canvas.clipRect(borderBox); +WXViewUtils.clipCanvasWithinBorderBox(this, canvas); canvas.translate(borderBox.left, borderBox.top); if (backgroundBorder != null) { backgroundBorder.draw(canvas); http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f9019f4a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/Widget.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/Widget.java b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/Widget.java index 7de3990..761d3b0 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/Widget.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/Widget.java @@ -21,7 +21,9 @@ package com.taobao.weex.ui.flat.widget; import android.graphics.Canvas; import android.graphics.Point; +import android.graphics.Rect; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.annotation.RestrictTo; import android.support.annotation.RestrictTo.Scope; import com.taobao.weex.ui.view.border.BorderDrawable; @@ -43,4 +45,7 @@ public interface Widget { @NonNull Point getLocInFlatContainer(); + @Nullable BorderDrawable getBackgroundAndBorder(); + + @NonNull Rect getBorderBox(); } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f9019f4a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/WidgetGroup.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/WidgetGroup.java b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/WidgetGroup.java index de8ed56..42ca263 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/WidgetGroup.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/WidgetGroup.java @@ -41,6 +41,10 @@ public class WidgetGroup extends BaseWidget { invalidate(); } + public List getChildren() { +return mChildren; + } + @Override public void onDraw(@NonNull Canvas canvas) { for (Widget child : mChildren) {
[04/12] incubator-weex git commit: * [android] Remove useless method and TODOs, rename class.
* [android] Remove useless method and TODOs, rename class. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/60b6aad7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/60b6aad7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/60b6aad7 Branch: refs/heads/0.16-dev Commit: 60b6aad7ddda3d83f37c4d366dea00e6493d75b8 Parents: 58546e6 Author: YorkShenAuthored: Fri Sep 8 12:11:28 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:54:08 2017 +0800 -- .../adapter/PicassoBasedDrawableLoader.java | 112 .../java/com/alibaba/weex/WXApplication.java| 2 - .../java/com/taobao/weex/WXSDKInstance.java | 7 +- .../taobao/weex/adapter/DrawableStrategy.java | 5 - .../com/taobao/weex/common/WXImageStrategy.java | 8 +- .../taobao/weex/ui/component/WXComponent.java | 7 +- .../com/taobao/weex/ui/flat/FlatGUIContext.java | 130 ++ .../taobao/weex/ui/flat/FlatGUIIContext.java| 132 --- .../taobao/weex/ui/flat/WidgetContainer.java| 2 +- .../weex/ui/flat/widget/AndroidViewWidget.java | 4 +- .../taobao/weex/ui/flat/widget/BaseWidget.java | 45 +-- .../taobao/weex/ui/flat/widget/ImageWidget.java | 102 -- .../taobao/weex/ui/flat/widget/TextWidget.java | 4 +- .../com/taobao/weex/ui/flat/widget/Widget.java | 17 --- .../taobao/weex/ui/flat/widget/WidgetGroup.java | 4 +- .../com/taobao/weex/ui/view/WXFrameLayout.java | 2 - .../com/taobao/weex/ui/component/WXDivTest.java | 6 +- .../taobao/weex/ui/component/WXTextTest.java| 4 +- 18 files changed, 155 insertions(+), 438 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/60b6aad7/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java -- diff --git a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java deleted file mode 100644 index 0d03934..000 --- a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package com.alibaba.weex.commons.adapter; - -import android.content.Context; -import android.graphics.Bitmap; -import android.graphics.Canvas; -import android.graphics.ColorFilter; -import android.graphics.PixelFormat; -import android.graphics.drawable.BitmapDrawable; -import android.graphics.drawable.Drawable; -import android.view.Gravity; - -import com.squareup.picasso.Picasso; -import com.squareup.picasso.Target; -import com.taobao.weex.WXSDKManager; -import com.taobao.weex.adapter.DrawableStrategy; -import com.taobao.weex.adapter.IDrawableLoader; - - -public class PicassoBasedDrawableLoader implements IDrawableLoader { - - private Context mContext; - - public PicassoBasedDrawableLoader(Context context) { -mContext = context; - } - - @Override - public void setDrawable(final String url, - final DrawableTarget drawableTarget, - final DrawableStrategy drawableStrategy) { -WXSDKManager.getInstance().postOnUiThread(new Runnable() { - @Override - public void run() { -String temp = url; -if (url.startsWith("//")) { - temp = "http:" + url; -} - -/** This is a hack for picasso, as Picasso hold weakReference to Target. - * http://stackoverflow.com/questions/24180805/onbitmaploaded-of-target-object-not-called-on-first-load - */ -class PlaceHolderDrawableTarget extends Drawable implements Target { - - @Override - public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { -BitmapDrawable bitmapDrawable = new BitmapDrawable(mContext.getResources(), bitmap); -
[05/12] incubator-weex git commit: * [android] Invalidate AndroidViewWidget and its corresponding view.
* [android] Invalidate AndroidViewWidget and its corresponding view. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/67ea3988 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/67ea3988 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/67ea3988 Branch: refs/heads/0.16-dev Commit: 67ea39888a9299e05c5d2a145e950830f2134f53 Parents: 60b6aad Author: YorkShenAuthored: Tue Sep 12 11:38:34 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:54:08 2017 +0800 -- .../taobao/weex/ui/flat/widget/AndroidViewWidget.java| 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/67ea3988/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java index b7968af..3edba74 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/flat/widget/AndroidViewWidget.java @@ -35,7 +35,7 @@ public class AndroidViewWidget extends BaseWidget { super(context); } - public void setContentView(@NonNull View view){ + public void setContentView(@Nullable View view){ this.mView = view; } @@ -43,6 +43,7 @@ public class AndroidViewWidget extends BaseWidget { public void setContentBox(int leftOffset, int topOffset, int rightOffset, int bottomOffset) { if(mView!=null) { mView.setPadding(leftOffset, topOffset, rightOffset, bottomOffset); + invalidate(); } } @@ -53,6 +54,14 @@ public class AndroidViewWidget extends BaseWidget { } } + @Override + public void invalidate() { +super.invalidate(); +if (mView != null) { + mView.invalidate(); +} + } + public @Nullable View getView() { return mView; }
[09/12] incubator-weex git commit: * [android] Add try catch for FlatGUI
* [android] Add try catch for FlatGUI Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/942d0320 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/942d0320 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/942d0320 Branch: refs/heads/0.16-dev Commit: 942d03202500019d665e29401eb91ba345e8e871 Parents: 94b4d41 Author: YorkShenAuthored: Fri Sep 8 11:43:41 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:55:22 2017 +0800 -- .../com/taobao/weex/ui/view/WXFrameLayout.java | 23 1 file changed, 14 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/942d0320/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java index 4156de8..28c7cef 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXFrameLayout.java @@ -29,6 +29,7 @@ import com.taobao.weex.ui.component.WXDiv; import com.taobao.weex.ui.flat.widget.Widget; import com.taobao.weex.ui.view.gesture.WXGesture; import com.taobao.weex.ui.view.gesture.WXGestureObservable; +import com.taobao.weex.utils.WXLogUtils; import com.taobao.weex.utils.WXViewUtils; import java.lang.ref.WeakReference; import java.util.List; @@ -95,16 +96,20 @@ public class WXFrameLayout extends FrameLayout implements WXGestureObservable,IR @Override protected void dispatchDraw(Canvas canvas) { -if (mWidgets != null) { - canvas.save(); - canvas.translate(getPaddingLeft(), getPaddingTop()); - for (Widget widget : mWidgets) { -widget.draw(canvas); +try { + if (mWidgets != null) { +canvas.save(); +canvas.translate(getPaddingLeft(), getPaddingTop()); +for (Widget widget : mWidgets) { + widget.draw(canvas); +} +canvas.restore(); + } else { +WXViewUtils.clipCanvasWithinBorderBox(this, canvas); +super.dispatchDraw(canvas); } - canvas.restore(); -} else { - WXViewUtils.clipCanvasWithinBorderBox(this, canvas); - super.dispatchDraw(canvas); +}catch (Throwable e){ + WXLogUtils.e("FlatGUI Crashed when dispatchDraw", WXLogUtils.getStackTrace(e)); } } }
[GitHub] incubator-weex pull request #643: * [Android] Add the ability of FlatGUI
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex/pull/643 ---
[08/12] incubator-weex git commit: + [android] Add garbage collection for FlatGUI.
+ [android] Add garbage collection for FlatGUI. * [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(). Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/94b4d418 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/94b4d418 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/94b4d418 Branch: refs/heads/0.16-dev Commit: 94b4d41801b0388c58c82f2e2dd7e1b1a4fd5a6d Parents: 67ea398 Author: YorkShenAuthored: Fri Sep 8 11:42:33 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:55:19 2017 +0800 -- .../java/com/taobao/weex/WXSDKInstance.java | 68 +++- .../com/taobao/weex/ui/component/WXDiv.java | 4 +- .../taobao/weex/ui/component/list/WXCell.java | 4 +- .../com/taobao/weex/ui/flat/FlatGUIContext.java | 24 +-- .../weex/ui/flat/widget/AndroidViewWidget.java | 10 ++- 5 files changed, 71 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/94b4d418/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 93191a8..69fc649 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -18,6 +18,8 @@ */ package com.taobao.weex; +import static com.taobao.weex.http.WXHttpUtil.KEY_USER_AGENT; + import android.app.AlertDialog; import android.content.Context; import android.content.Intent; @@ -36,7 +38,6 @@ import android.view.Menu; import android.view.View; import android.view.ViewGroup; import android.widget.ScrollView; - import com.alibaba.fastjson.JSONObject; import com.taobao.weex.adapter.IDrawableLoader; import com.taobao.weex.adapter.IWXHttpAdapter; @@ -79,7 +80,6 @@ import com.taobao.weex.utils.WXJsonUtils; import com.taobao.weex.utils.WXLogUtils; import com.taobao.weex.utils.WXReflectionUtils; import com.taobao.weex.utils.WXViewUtils; - import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; @@ -88,8 +88,6 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import static com.taobao.weex.http.WXHttpUtil.KEY_USER_AGENT; - /** * Each instance of WXSDKInstance represents an running weex instance. * It can be a pure weex view, or mixed with native view @@ -121,8 +119,8 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. private boolean mNeedReLoad = false; private static volatile int mViewPortWidth = 750; private int mInstanceViewPortWidth = 750; - private final @NonNull - FlatGUIContext mUIImp =new FlatGUIContext(); + private @NonNull + FlatGUIContext mFlatGUIContext =new FlatGUIContext(); public long mRenderStartNanos; public int mExecJSTraceId = WXTracing.nextId(); @@ -203,9 +201,10 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. enableLayerType = enable; } + @RestrictTo(Scope.LIBRARY) public @NonNull FlatGUIContext getFlatUIContext(){ -return mUIImp; +return mFlatGUIContext; } public boolean isNeedValidate() { @@ -1258,36 +1257,41 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. } public synchronized void destroy() { -WXSDKManager.getInstance().destroyInstance(mInstanceId); -WXComponentFactory.removeComponentTypesByInstanceId(getInstanceId()); +if(!isDestroy()) { + WXSDKManager.getInstance().destroyInstance(mInstanceId); + WXComponentFactory.removeComponentTypesByInstanceId(getInstanceId()); -if(mGlobalEventReceiver!=null){ - getContext().unregisterReceiver(mGlobalEventReceiver); - mGlobalEventReceiver=null; -} -if(mRootComp != null ) { - mRootComp.destroy(); - destroyView(mRenderContainer); - mRootComp = null; -} + if (mGlobalEventReceiver != null) { +getContext().unregisterReceiver(mGlobalEventReceiver); +mGlobalEventReceiver = null; + } + if (mRootComp != null) { +mRootComp.destroy(); +destroyView(mRenderContainer); +mRootComp = null; + } -if(mGlobalEvents!=null){ - mGlobalEvents.clear(); -} + if (mGlobalEvents != null) { +
[02/12] incubator-weex git commit: * [android] Init commit for flatGUI
* [android] Init commit for flatGUI Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/bc6ea406 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/bc6ea406 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/bc6ea406 Branch: refs/heads/0.16-dev Commit: bc6ea406e05667712f7084b268bb16f81c2298fd Parents: 701c4b9 Author: YorkShenAuthored: Tue Aug 22 11:37:04 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:54:07 2017 +0800 -- .../adapter/PicassoBasedDrawableLoader.java | 112 ++ .../alibaba/weex/benchmark/BenchmarkTest.java | 29 ++-- .../java/com/alibaba/weex/WXApplication.java| 2 + .../java/com/taobao/weex/WXSDKInstance.java | 12 +- .../taobao/weex/adapter/DrawableStrategy.java | 5 + .../java/com/taobao/weex/common/Constants.java | 2 + .../com/taobao/weex/common/WXImageStrategy.java | 8 +- .../com/taobao/weex/dom/ImmutableDomObject.java | 21 ++- .../taobao/weex/ui/component/WXComponent.java | 127 +++- .../com/taobao/weex/ui/component/WXDiv.java | 70 - .../com/taobao/weex/ui/component/WXSlider.java | 4 +- .../com/taobao/weex/ui/component/WXText.java| 65 + .../taobao/weex/ui/component/WXVContainer.java | 44 -- .../taobao/weex/ui/component/list/WXCell.java | 38 - .../weex/ui/component/list/WXListComponent.java | 53 --- .../com/taobao/weex/ui/flat/FlatComponent.java | 33 + .../taobao/weex/ui/flat/FlatGUIIContext.java| 113 ++ .../taobao/weex/ui/flat/WidgetContainer.java| 92 .../weex/ui/flat/widget/AndroidViewWidget.java | 58 .../taobao/weex/ui/flat/widget/BaseWidget.java | 146 +++ .../taobao/weex/ui/flat/widget/ImageWidget.java | 102 + .../taobao/weex/ui/flat/widget/TextWidget.java | 49 +++ .../com/taobao/weex/ui/flat/widget/Widget.java | 63 .../taobao/weex/ui/flat/widget/WidgetGroup.java | 50 +++ .../com/taobao/weex/ui/view/WXFrameLayout.java | 50 ++- 25 files changed, 1202 insertions(+), 146 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bc6ea406/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java -- diff --git a/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java new file mode 100644 index 000..0d03934 --- /dev/null +++ b/android/commons/src/main/java/com/alibaba/weex/commons/adapter/PicassoBasedDrawableLoader.java @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package com.alibaba.weex.commons.adapter; + +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.ColorFilter; +import android.graphics.PixelFormat; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; +import android.view.Gravity; + +import com.squareup.picasso.Picasso; +import com.squareup.picasso.Target; +import com.taobao.weex.WXSDKManager; +import com.taobao.weex.adapter.DrawableStrategy; +import com.taobao.weex.adapter.IDrawableLoader; + + +public class PicassoBasedDrawableLoader implements IDrawableLoader { + + private Context mContext; + + public PicassoBasedDrawableLoader(Context context) { +mContext = context; + } + + @Override + public void setDrawable(final String url, + final DrawableTarget drawableTarget, + final DrawableStrategy drawableStrategy) { +WXSDKManager.getInstance().postOnUiThread(new Runnable() { + @Override + public void run() { +String temp = url; +if (url.startsWith("//")) { + temp = "http:" + url; +} + +/** This is a hack for picasso, as
[11/12] incubator-weex git commit: Merge branch '0.16-dev' into android-feature-flatGUI
Merge branch '0.16-dev' into android-feature-flatGUI Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d72c4b12 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d72c4b12 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d72c4b12 Branch: refs/heads/0.16-dev Commit: d72c4b124b136784a8fe86e6b81e05a01514c6f3 Parents: f9019f4 96c52ae Author: YorkShenAuthored: Wed Sep 13 17:40:15 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 17:40:15 2017 +0800 -- .../main/java/com/taobao/weex/dom/WXStyle.java | 17 - .../weex/ui/view/border/BorderCorner.java | 37 +++- .../taobao/weex/ui/view/border/BorderUtil.java | 26 -- .../weex/ui/view/border/BottomLeftCorner.java | 7 +--- .../weex/ui/view/border/BottomRightCorner.java | 7 +--- .../weex/ui/view/border/TopLeftCorner.java | 7 +--- .../weex/ui/view/border/TopRightCorner.java | 7 +--- .../com/taobao/weex/utils/FunctionParser.java | 6 8 files changed, 25 insertions(+), 89 deletions(-) --
[03/12] incubator-weex git commit: * [android] Update FlatGUI testcase
* [android] Update FlatGUI testcase Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/878c3a9e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/878c3a9e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/878c3a9e Branch: refs/heads/0.16-dev Commit: 878c3a9ea589cb77a87b9fd61d57aef8e089ddbe Parents: bc6ea40 Author: YorkShenAuthored: Fri Aug 25 16:40:26 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:54:07 2017 +0800 -- .../com/taobao/weex/ui/component/WXDivTest.java | 12 +--- .../com/taobao/weex/ui/component/WXTextTest.java | 18 +- 2 files changed, 14 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/878c3a9e/android/sdk/src/test/java/com/taobao/weex/ui/component/WXDivTest.java -- diff --git a/android/sdk/src/test/java/com/taobao/weex/ui/component/WXDivTest.java b/android/sdk/src/test/java/com/taobao/weex/ui/component/WXDivTest.java index 53b52c3..3aa9674 100644 --- a/android/sdk/src/test/java/com/taobao/weex/ui/component/WXDivTest.java +++ b/android/sdk/src/test/java/com/taobao/weex/ui/component/WXDivTest.java @@ -18,6 +18,8 @@ */ package com.taobao.weex.ui.component; +import static org.junit.Assert.assertEquals; + import com.taobao.weappplus_sdk.BuildConfig; import com.taobao.weex.WXSDKInstance; import com.taobao.weex.WXSDKInstanceTest; @@ -25,21 +27,15 @@ import com.taobao.weex.dom.TestDomObject; import com.taobao.weex.dom.WXDomObject; import com.taobao.weex.dom.WXEvent; import com.taobao.weex.dom.flex.Spacing; - +import com.taobao.weex.ui.flat.FlatGUIIContext; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; -import org.robolectric.RobolectricTestRunner; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; -import static org.junit.Assert.*; - /** * Created by gulin on 16/2/24. */ @@ -65,6 +61,7 @@ public class WXDivTest { public void setUp() throws Exception { WXSDKInstance instance = Mockito.mock(WXSDKInstance.class); Mockito.when(instance.getContext()).thenReturn(RuntimeEnvironment.application); +Mockito.when(instance.getFlatUIContext()).thenReturn(new FlatGUIIContext()); WXDomObject divDom = new WXDomObject(); WXDomObject spy = Mockito.spy(divDom); @@ -80,6 +77,7 @@ public class WXDivTest { public void testAddChild(){ WXSDKInstance instance = Mockito.mock(WXSDKInstance.class); Mockito.when(instance.getContext()).thenReturn(RuntimeEnvironment.application); +Mockito.when(instance.getFlatUIContext()).thenReturn(new FlatGUIIContext()); WXDomObject testDom = Mockito.mock(WXDomObject.class); Mockito.when(testDom.getPadding()).thenReturn(new Spacing()); http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/878c3a9e/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java -- diff --git a/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java b/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java index 0181457..a12095e 100644 --- a/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java +++ b/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java @@ -18,6 +18,11 @@ */ package com.taobao.weex.ui.component; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import com.taobao.weappplus_sdk.BuildConfig; import com.taobao.weex.WXEnvironment; import com.taobao.weex.WXSDKInstance; @@ -27,7 +32,9 @@ import com.taobao.weex.dom.WXDomObject; 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; +import java.util.HashMap; +import java.util.Map; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -36,14 +43,6 @@ import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; -import java.util.HashMap; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import
[07/12] incubator-weex git commit: * [android] Make BaseWidget depend on FlatContext, not views.
* [android] Make BaseWidget depend on FlatContext, not views. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e225aaa7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e225aaa7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e225aaa7 Branch: refs/heads/0.16-dev Commit: e225aaa76c36d885817bde72cb70259d864078e0 Parents: 23ca407 Author: YorkShenAuthored: Fri Sep 1 16:01:07 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:54:08 2017 +0800 -- .../com/taobao/weex/ui/component/WXDiv.java | 2 +- .../com/taobao/weex/ui/component/WXText.java| 2 +- .../taobao/weex/ui/flat/FlatGUIIContext.java| 24 .../taobao/weex/ui/flat/WidgetContainer.java| 3 ++- .../weex/ui/flat/widget/AndroidViewWidget.java | 5 ++-- .../taobao/weex/ui/flat/widget/BaseWidget.java | 22 ++ .../taobao/weex/ui/flat/widget/ImageWidget.java | 6 ++--- .../taobao/weex/ui/flat/widget/TextWidget.java | 6 ++--- .../taobao/weex/ui/flat/widget/WidgetGroup.java | 6 ++--- 9 files changed, 53 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e225aaa7/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java index f533989..3080bbc 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java @@ -78,7 +78,7 @@ public class WXDiv extends WidgetContainer implements FlatCompone @NonNull public WidgetGroup getOrCreateFlatWidget() { if (mWidgetGroup == null) { - mWidgetGroup = new WidgetGroup(getInstance().getFlatUIContext().getFlatComponentAncestor(this).getHostView()); + mWidgetGroup = new WidgetGroup(getInstance().getFlatUIContext()); for (int i = 0; i < getChildCount(); i++) { createChildViewAt(i); } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e225aaa7/android/sdk/src/main/java/com/taobao/weex/ui/component/WXText.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXText.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXText.java index e07a037..ea7b9ea 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXText.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXText.java @@ -66,7 +66,7 @@ public class WXText extends WXComponent implements FlatComponenthttp://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e225aaa7/android/sdk/src/main/java/com/taobao/weex/ui/flat/FlatGUIIContext.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/flat/FlatGUIIContext.java b/android/sdk/src/main/java/com/taobao/weex/ui/flat/FlatGUIIContext.java index 1026730..a5677b1 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/flat/FlatGUIIContext.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/flat/FlatGUIIContext.java @@ -25,6 +25,7 @@ import android.support.annotation.RestrictTo; import android.support.annotation.RestrictTo.Scope; import android.support.v4.util.ArrayMap; import android.text.TextUtils; +import android.view.View; import com.taobao.weex.common.Constants.Name; import com.taobao.weex.dom.ImmutableDomObject; import com.taobao.weex.dom.WXAttr; @@ -32,6 +33,7 @@ import com.taobao.weex.dom.WXDomObject; import com.taobao.weex.dom.WXStyle; import com.taobao.weex.ui.component.WXComponent; import com.taobao.weex.ui.flat.widget.AndroidViewWidget; +import com.taobao.weex.ui.flat.widget.Widget; import java.util.Map; //TODO when Weex instance is destroyed, there is a work of garbage collection. @@ -44,6 +46,7 @@ public class FlatGUIIContext { private boolean mFlatUIEnabled; private Map mWidgetRegistry = new ArrayMap<>(); private Map mViewWidgetRegistry = new ArrayMap<>(); + private Map widgetToComponent = new ArrayMap<>(); @RestrictTo(Scope.LIBRARY) public void setFlatUIEnabled(boolean flag){ @@ -65,6 +68,10 @@ public class FlatGUIIContext { mViewWidgetRegistry.put(component, viewWidget); } + public void register(@NonNull Widget widget, @NonNull WXComponent component){ +widgetToComponent.put(widget, component); + } + public @Nullable WidgetContainer getFlatComponentAncestor(@NonNull WXComponent flatWidget) { @@ -86,6
[12/12] incubator-weex git commit: Merge branch 'android-feature-flatGUI' into 0.16-dev
Merge branch 'android-feature-flatGUI' into 0.16-dev Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/20b0a434 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/20b0a434 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/20b0a434 Branch: refs/heads/0.16-dev Commit: 20b0a434a406fa66e19cbeaf2ad7139530b8995d Parents: 96c52ae d72c4b1 Author: YorkShenAuthored: Wed Sep 13 17:40:35 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 17:40:35 2017 +0800 -- .../alibaba/weex/benchmark/BenchmarkTest.java | 29 ++-- .../java/com/taobao/weex/WXSDKInstance.java | 75 ++ .../java/com/taobao/weex/common/Constants.java | 2 + .../com/taobao/weex/dom/ImmutableDomObject.java | 21 ++- .../taobao/weex/ui/component/WXComponent.java | 143 +- .../com/taobao/weex/ui/component/WXDiv.java | 74 +- .../com/taobao/weex/ui/component/WXSlider.java | 4 +- .../com/taobao/weex/ui/component/WXText.java| 65 + .../taobao/weex/ui/component/WXVContainer.java | 44 -- .../taobao/weex/ui/component/list/WXCell.java | 61 +++- .../weex/ui/component/list/WXListComponent.java | 53 --- .../com/taobao/weex/ui/flat/FlatComponent.java | 33 + .../com/taobao/weex/ui/flat/FlatGUIContext.java | 146 +++ .../taobao/weex/ui/flat/WidgetContainer.java| 93 .../weex/ui/flat/widget/AndroidViewWidget.java | 76 ++ .../taobao/weex/ui/flat/widget/BaseWidget.java | 130 + .../taobao/weex/ui/flat/widget/TextWidget.java | 49 +++ .../com/taobao/weex/ui/flat/widget/Widget.java | 51 +++ .../taobao/weex/ui/flat/widget/WidgetGroup.java | 54 +++ .../com/taobao/weex/ui/view/WXFrameLayout.java | 53 ++- .../java/com/taobao/weex/utils/WXViewUtils.java | 31 .../com/taobao/weex/ui/component/WXDivTest.java | 12 +- .../taobao/weex/ui/component/WXTextTest.java| 18 +-- 23 files changed, 1125 insertions(+), 192 deletions(-) --
[01/12] incubator-weex git commit: * [android] Fix the problem of NPE and AndroidViewWidget's layout
Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 96c52aec5 -> 20b0a434a * [android] Fix the problem of NPE and AndroidViewWidget's layout Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/23ca407a Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/23ca407a Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/23ca407a Branch: refs/heads/0.16-dev Commit: 23ca407a5e3acd010240e24c0911bfd732041ea8 Parents: 878c3a9 Author: YorkShenAuthored: Mon Aug 28 15:11:17 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:54:07 2017 +0800 -- .../java/com/taobao/weex/ui/component/WXComponent.java | 12 ++-- .../main/java/com/taobao/weex/ui/component/WXDiv.java | 4 +++- .../java/com/taobao/weex/ui/component/list/WXCell.java | 4 +++- 3 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/23ca407a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java index d183544..6f20d1d 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java @@ -494,11 +494,19 @@ public abstract class WXComponent implements IWXObject, IWXActi private void setWidgetParams(Widget widget, FlatGUIIContext UIImp, Point rawoffset, int width, int height, int left, int right, int top, int bottom) { -Point childOffset = new Point(rawoffset.x, rawoffset.y); +Point childOffset = new Point(); if (mParent != null) { if (mParent instanceof FlatComponent && UIImp.getFlatComponentAncestor(mParent) != null && UIImp.getAndroidViewWidget(mParent) == null) { +childOffset.set(rawoffset.x, rawoffset.y); + } else { +childOffset.set(left, top); + } + + if (mParent instanceof FlatComponent && + UIImp.getFlatComponentAncestor(mParent) != null && + UIImp.getAndroidViewWidget(mParent) == null) { Point parentLayoutOffset = ((FlatComponent) mParent).getOrCreateFlatWidget().getLocInFlatContainer(); childOffset.offset(parentLayoutOffset.x, parentLayoutOffset.y); } @@ -515,7 +523,7 @@ public abstract class WXComponent implements IWXObject, IWXActi } widget.setLayout(width, height, left, right, top, bottom, childOffset); -if (widget instanceof AndroidViewWidget) { +if (widget instanceof AndroidViewWidget && ((AndroidViewWidget) widget).getView()!=null) { //TODO generic method if ever possible setHostLayoutParams((T) ((AndroidViewWidget) widget).getView(), width, height, childOffset.x, right, childOffset.y, bottom); http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/23ca407a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java index 18c734e..f533989 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java @@ -90,7 +90,9 @@ public class WXDiv extends WidgetContainer implements FlatCompone @Override protected void mountFlatGUI() { if (promoteToView(true)) { - getHostView().mountFlatGUI(widgets); + if(getHostView()!=null) { +getHostView().mountFlatGUI(widgets); + } } else { mWidgetGroup.replaceAll(widgets); } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/23ca407a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java index cac3048..7981701 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java @@ -144,7 +144,9 @@ public class WXCell extends WidgetContainer { @Override protected void mountFlatGUI() { + if(getHostView()!=null) { getHostView().mountFlatGUI(widgets); + } } @Override @@ -155,6 +157,6 @@ public class WXCell extends WidgetContainer { @Override public boolean
[06/12] incubator-weex git commit: * [android] Make flat flag like lazy flag and enable it only if it's Android 4.4 or below. * [android] Fix LayoutParams in Nested Widget/Views.
* [android] Make flat flag like lazy flag and enable it only if it's Android 4.4 or below. * [android] Fix LayoutParams in Nested Widget/Views. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/58546e6d Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/58546e6d Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/58546e6d Branch: refs/heads/0.16-dev Commit: 58546e6d66dac82f5f8d7c3aefcaca5a682d7701 Parents: e225aaa Author: YorkShenAuthored: Mon Sep 4 14:47:50 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:54:08 2017 +0800 -- .../taobao/weex/ui/component/WXComponent.java | 13 +- .../com/taobao/weex/ui/component/WXDiv.java | 2 +- .../taobao/weex/ui/component/list/WXCell.java | 47 +--- .../taobao/weex/ui/flat/FlatGUIIContext.java| 17 +++ 4 files changed, 50 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/58546e6d/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java index 6f20d1d..c2313b2 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java @@ -35,6 +35,8 @@ import android.support.annotation.CheckResult; import android.support.annotation.IntDef; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.annotation.RestrictTo; +import android.support.annotation.RestrictTo.Scope; import android.support.v4.view.ViewCompat; import android.text.TextUtils; import android.view.Menu; @@ -68,8 +70,8 @@ import com.taobao.weex.ui.component.pesudo.OnActivePseudoListner; import com.taobao.weex.ui.component.pesudo.PesudoStatus; import com.taobao.weex.ui.component.pesudo.TouchActivePseudoListener; import com.taobao.weex.ui.flat.FlatComponent; -import com.taobao.weex.ui.flat.WidgetContainer; import com.taobao.weex.ui.flat.FlatGUIIContext; +import com.taobao.weex.ui.flat.WidgetContainer; import com.taobao.weex.ui.flat.widget.AndroidViewWidget; import com.taobao.weex.ui.flat.widget.Widget; import com.taobao.weex.ui.view.border.BorderDrawable; @@ -147,6 +149,12 @@ public abstract class WXComponent implements IWXObject, IWXActi this.mAnimationHolder = holder; } + //This method will be removed once flatGUI is completed. + @RestrictTo(Scope.LIBRARY) + public boolean isFlatUIEnabled(){ +return mParent != null && mParent.isFlatUIEnabled(); + } + private OnClickListener mClickEventListener = new OnClickListener() { @Override public void onHostViewClick() { @@ -500,7 +508,8 @@ public abstract class WXComponent implements IWXObject, IWXActi UIImp.getFlatComponentAncestor(mParent) != null && UIImp.getAndroidViewWidget(mParent) == null) { childOffset.set(rawoffset.x, rawoffset.y); - } else { + } + else{ childOffset.set(left, top); } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/58546e6d/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java index 3080bbc..bdc9891 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXDiv.java @@ -105,7 +105,7 @@ public class WXDiv extends WidgetContainer implements FlatCompone @Override public boolean intendToBeFlatContainer() { -return getInstance().getFlatUIContext().isFlatUIEnabled() && WXDiv.class.equals(getClass()); +return getInstance().getFlatUIContext().isFlatUIEnabled(this) && WXDiv.class.equals(getClass()); } @Override http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/58546e6d/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java index 7981701..bf575b5 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java @@ -19,18 +19,23 @@ package com.taobao.weex.ui.component.list;
[1/2] incubator-weex git commit: - [android] Remove useless method.
Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 701c4b972 -> 96c52aec5 - [android] Remove useless method. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/04180c9e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/04180c9e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/04180c9e Branch: refs/heads/0.16-dev Commit: 04180c9e8ca01be0c35e3ab50bb3d673e8fc7fd6 Parents: d82509d Author: YorkShenAuthored: Mon Sep 11 11:33:16 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:05:20 2017 +0800 -- .../main/java/com/taobao/weex/dom/WXStyle.java | 17 - .../weex/ui/view/border/BorderCorner.java | 37 +++- .../taobao/weex/ui/view/border/BorderUtil.java | 26 -- .../weex/ui/view/border/BottomLeftCorner.java | 7 +--- .../weex/ui/view/border/BottomRightCorner.java | 7 +--- .../weex/ui/view/border/TopLeftCorner.java | 7 +--- .../weex/ui/view/border/TopRightCorner.java | 7 +--- .../com/taobao/weex/utils/FunctionParser.java | 6 8 files changed, 25 insertions(+), 89 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/04180c9e/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java b/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java index 01c25d2..6dc444a 100644 --- a/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java +++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java @@ -346,23 +346,6 @@ public class WXStyle implements Map ,Cloneable { return WXUtils.getFloatByViewport(get(Constants.Name.BORDER_WIDTH), viewport); } - public float getBorderRightWidth() { -return getBorderWidth(Constants.Name.BORDER_RIGHT_WIDTH); - } - - public float getBorderTopWidth() { -return getBorderWidth(Constants.Name.BORDER_TOP_WIDTH); - } - - public float getBorderBottomWidth() { -return getBorderWidth(Constants.Name.BORDER_BOTTOM_WIDTH); - } - - public float getBorderLeftWidth() { -return getBorderWidth(Constants.Name.BORDER_LEFT_WIDTH); - } - - public float getBorderRightWidth(int viewport) { return getBorderWidth(Constants.Name.BORDER_RIGHT_WIDTH, viewport); } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/04180c9e/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java index a396063..07ff38f 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/border/BorderCorner.java @@ -31,13 +31,15 @@ abstract class BorderCorner { private final float mPreBorderWidth; private final float mPostBorderWidth; private final RectF mBorderBox; + protected final float mAngleBisector; - BorderCorner(float cornerRadius, float preBorderWidth, float postBorderWidth, @NonNull RectF - borderBox) { + BorderCorner(float cornerRadius, float preBorderWidth, float postBorderWidth, + @NonNull RectF borderBox, float angleBisector) { mCornerRadius = cornerRadius; mPreBorderWidth = preBorderWidth; mPostBorderWidth = postBorderWidth; mBorderBox = borderBox; +mAngleBisector = angleBisector; } /** @@ -61,18 +63,26 @@ abstract class BorderCorner { return getOuterCornerRadius() > 0 && !FloatUtil.floatsEqual(0, getOuterCornerRadius()); } - protected float getPreBorderWidth() { + protected final float getPreBorderWidth() { return mPreBorderWidth; } - protected float getPostBorderWidth() { + protected final float getPostBorderWidth() { return mPostBorderWidth; } - protected float getOuterCornerRadius() { + protected final float getOuterCornerRadius() { return mCornerRadius; } + protected final float getAngleBisectorDegree(){ +return mAngleBisector; + } + + protected final RectF getBorderBox() { +return mBorderBox; + } + /** * Get the staring point of the corner. * @return the starting point of the corner. @@ -88,12 +98,6 @@ abstract class BorderCorner { return lineStart; } - @NonNull - abstract protected PointF getRoundCornerStart(); - - @NonNull - abstract protected PointF getSharpCornerVertex(); - /** * Get the ending point of the corner. * @return the ending point of the corner. @@ -110,9 +114,13 @@ abstract class BorderCorner {
[GitHub] incubator-weex pull request #695: Remove useless method in Android
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex/pull/695 ---
[2/2] incubator-weex git commit: Merge branch '0.16-dev-remove-method' into 0.16-dev
Merge branch '0.16-dev-remove-method' into 0.16-dev Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/96c52aec Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/96c52aec Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/96c52aec Branch: refs/heads/0.16-dev Commit: 96c52aec532ee6597b1522057ba4d9dc3293c83a Parents: 701c4b9 04180c9 Author: YorkShenAuthored: Wed Sep 13 17:36:34 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 17:36:34 2017 +0800 -- .../main/java/com/taobao/weex/dom/WXStyle.java | 17 - .../weex/ui/view/border/BorderCorner.java | 37 +++- .../taobao/weex/ui/view/border/BorderUtil.java | 26 -- .../weex/ui/view/border/BottomLeftCorner.java | 7 +--- .../weex/ui/view/border/BottomRightCorner.java | 7 +--- .../weex/ui/view/border/TopLeftCorner.java | 7 +--- .../weex/ui/view/border/TopRightCorner.java | 7 +--- .../com/taobao/weex/utils/FunctionParser.java | 6 8 files changed, 25 insertions(+), 89 deletions(-) --
[2/4] incubator-weex git commit: * [android] rendercontainer set to null when instance invoke destroy
* [android] rendercontainer set to null when instance invoke destroy Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3d3291ad Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3d3291ad Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3d3291ad Branch: refs/heads/0.16-dev Commit: 3d3291ad1a0cbce649329141acfdfea94ced7963 Parents: d76c4bd Author: atomtongAuthored: Mon Sep 11 17:22:30 2017 +0800 Committer: atomtong Committed: Mon Sep 11 17:22:30 2017 +0800 -- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3d3291ad/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 35c81e2..a1d8499 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -1259,7 +1259,6 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. if(mRootComp != null ) { mRootComp.destroy(); destroyView(mRenderContainer); - mRenderContainer = null; mRootComp = null; } @@ -1275,7 +1274,9 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. mWXScrollListeners = null; } -mNestedInstanceInterceptor = null; + mRenderContainer = null; + + mNestedInstanceInterceptor = null; mUserTrackAdapter = null; mScrollView = null; mContext = null;
[1/4] incubator-weex git commit: * [android] fix wxparallax component memoryleak cause registered scrollerlisteners
Repository: incubator-weex Updated Branches: refs/heads/0.16-dev d82509d81 -> 701c4b972 * [android] fix wxparallax component memoryleak cause registered scrollerlisteners Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d76c4bd5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d76c4bd5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d76c4bd5 Branch: refs/heads/0.16-dev Commit: d76c4bd504ec52dec25560a7ccc66d7ad568434b Parents: c95944b Author: atomtongAuthored: Mon Sep 11 16:45:36 2017 +0800 Committer: atomtong Committed: Mon Sep 11 16:45:36 2017 +0800 -- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d76c4bd5/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index 7e0da86..35c81e2 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -1271,6 +1271,10 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. mComponentObserver = null; } +if(mWXScrollListeners != null){ + mWXScrollListeners = null; + } + mNestedInstanceInterceptor = null; mUserTrackAdapter = null; mScrollView = null;
[GitHub] incubator-weex pull request #692: 0.16 dev bugfix wx parallax scrollerlisten...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex/pull/692 ---
[4/4] incubator-weex git commit: Merge branch '0.16-dev-bugfix-WXParallax-scrollerlistener-memoryleak' of https://github.com/atomtong/incubator-weex into 0.16-dev
Merge branch '0.16-dev-bugfix-WXParallax-scrollerlistener-memoryleak' of https://github.com/atomtong/incubator-weex into 0.16-dev Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/701c4b97 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/701c4b97 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/701c4b97 Branch: refs/heads/0.16-dev Commit: 701c4b97213a02aedc5160105cda89a6ee31727c Parents: d82509d f144082 Author: YorkShenAuthored: Wed Sep 13 16:44:47 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 16:44:47 2017 +0800 -- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) --
[3/4] incubator-weex git commit: * [android] private filed set to in destroy null opt
* [android] private filed set to in destroy null opt Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f1440821 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f1440821 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f1440821 Branch: refs/heads/0.16-dev Commit: f1440821809446a15fd522f2fee91b7d631180bd Parents: 3d3291a Author: atomtongAuthored: Tue Sep 12 10:35:08 2017 +0800 Committer: atomtong Committed: Tue Sep 12 10:35:08 2017 +0800 -- android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f1440821/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java index a1d8499..d1bbd52 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -1269,13 +1269,9 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. if(mComponentObserver != null){ mComponentObserver = null; } - -if(mWXScrollListeners != null){ - mWXScrollListeners = null; - } - + + mWXScrollListeners = null; mRenderContainer = null; - mNestedInstanceInterceptor = null; mUserTrackAdapter = null; mScrollView = null;
[GitHub] incubator-weex pull request #696: * [ios] clear toast queue when instance di...
Github user kfeagle commented on a diff in the pull request: https://github.com/apache/incubator-weex/pull/696#discussion_r138554778 --- Diff: ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m --- @@ -378,7 +379,8 @@ - (void)destroyInstance if(url.length > 0){ [WXPrerenderManager addGlobalTask:url callback:nil]; } - +NSMutableArray * toastQueue = [[WXToastManager sharedManager] valueForKey:@"toastQueue"]; --- End diff -- toastQueue ä¼ä¸ä¼æ¯ç©ºå¼ï¼ ---
[GitHub] incubator-weex issue #696: * [ios] clear toast queue when instance disappear...
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/696 Warnings :warning: No Changelog changes! :warning: This PR modify SDK code without add/modify testcases. :warning: This PR should update related documents as well. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS ---
[GitHub] incubator-weex issue #695: Remove useless method in Android
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/695 Warnings :warning: No Changelog changes! :warning: This PR should update related documents as well. :warning: Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java without metion it in commit message. You'd better add '@notdanger' in your commit log. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS ---
[GitHub] incubator-weex pull request #695: Remove useless method in Android
GitHub user YorkShen opened a pull request: https://github.com/apache/incubator-weex/pull/695 Remove useless method in Android @nodanger You can merge this pull request into a Git repository by running: $ git pull https://github.com/YorkShen/incubator-weex 0.16-dev-remove-method Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/695.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #695 commit 04180c9e8ca01be0c35e3ab50bb3d673e8fc7fd6 Author: YorkShenDate: 2017-09-11T03:33:16Z - [android] Remove useless method. ---
[1/2] incubator-weex git commit: * [android] add the right proguard config of extend-to-android
Repository: incubator-weex Updated Branches: refs/heads/dev 5b3ecd5cc -> d16ba8d88 * [android] add the right proguard config of extend-to-android Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/72184b43 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/72184b43 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/72184b43 Branch: refs/heads/dev Commit: 72184b43d04548acd0354934c6f84e22579bc9a9 Parents: 3ae4e89 Author: zshshrAuthored: Wed Sep 13 14:38:37 2017 +0800 Committer: zshshr Committed: Wed Sep 13 14:38:37 2017 +0800 -- .../cn/references/advanced/extend-to-android.md | 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/72184b43/doc/source/cn/references/advanced/extend-to-android.md -- diff --git a/doc/source/cn/references/advanced/extend-to-android.md b/doc/source/cn/references/advanced/extend-to-android.md index 61a5bbf..0dcfa14 100644 --- a/doc/source/cn/references/advanced/extend-to-android.md +++ b/doc/source/cn/references/advanced/extend-to-android.md @@ -193,9 +193,26 @@ public class ImageAdapter implements IWXImgLoaderAdapter { ```java -keep class com.taobao.weex.WXDebugTool{*;} -keep class com.taobao.weex.devtools.common.LogUtil{*;} --keep public class * extends com.taobao.weex.ui.component.WXComponent{*;} --keep public class * extends com.taobao.weex.common.WXModule{*;} -keepclassmembers class ** { @com.taobao.weex.ui.component.WXComponentProp public *; } +-keep class com.taobao.weex.bridge.**{*;} +-keep class com.taobao.weex.dom.**{*;} +-keep class com.taobao.weex.adapter.**{*;} +-keep class com.taobao.weex.common.**{*;} +-keep class * implements com.taobao.weex.IWXObject{*;} +-keep class com.taobao.weex.ui.**{*;} +-keep class com.taobao.weex.ui.component.**{*;} +-keep class com.taobao.weex.utils.**{ +public ; +public ; +} +-keep class com.taobao.weex.view.**{*;} +-keep class com.taobao.weex.module.**{*;} +-keep public class * extends com.taobao.weex.common.WXModule{*;} +-keep public class * extends com.taobao.weex.ui.component.WXComponent{*;} +-keep public class com.taobao.taolive.ui.weex.**{*;} +-keep class * implements com.taobao.weex.ui.IExternalComponentGetter{*;} +-keep class com.alibaba.aliweex.hc.HCConfig{*;} +-keep class com.alibaba.dynamic.**{*;} ``` \ No newline at end of file
[2/2] incubator-weex git commit: Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into dev
Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into dev Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d16ba8d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d16ba8d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d16ba8d8 Branch: refs/heads/dev Commit: d16ba8d888e07d285e3f523ed4010c934b1a4c48 Parents: 72184b4 5b3ecd5 Author: zshshrAuthored: Wed Sep 13 15:21:10 2017 +0800 Committer: zshshr Committed: Wed Sep 13 15:21:10 2017 +0800 -- doc/source/cn/references/common-style.md | 3 +++ doc/source/cn/references/modules/animation.md | 2 ++ doc/source/references/common-style.md | 3 +++ doc/source/references/modules/animation.md| 3 ++- 4 files changed, 10 insertions(+), 1 deletion(-) --
[GitHub] incubator-weex pull request #694: * [android] add the right proguard config ...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex/pull/694 ---
incubator-weex git commit: * [doc] Update doc for animation.
Repository: incubator-weex Updated Branches: refs/heads/dev 3ae4e89e8 -> 5b3ecd5cc * [doc] Update doc for animation. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5b3ecd5c Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5b3ecd5c Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5b3ecd5c Branch: refs/heads/dev Commit: 5b3ecd5ccf88a6247c9327ebb48220d9993ff74c Parents: 3ae4e89 Author: YorkShenAuthored: Wed Sep 13 15:08:04 2017 +0800 Committer: YorkShen Committed: Wed Sep 13 15:08:04 2017 +0800 -- doc/source/cn/references/common-style.md | 3 +++ doc/source/cn/references/modules/animation.md | 2 ++ doc/source/references/common-style.md | 3 +++ doc/source/references/modules/animation.md| 3 ++- 4 files changed, 10 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/cn/references/common-style.md -- diff --git a/doc/source/cn/references/common-style.md b/doc/source/cn/references/common-style.md index 0d40e69..937e8de 100644 --- a/doc/source/cn/references/common-style.md +++ b/doc/source/cn/references/common-style.md @@ -314,6 +314,9 @@ transform å±æ§åå ç´ åºç¨ 2D 转æ¢ã该å±æ§å 许æ们对å ç´ è¿è¡ - scaleX( ) - scaleY( ) - rotate( ) +- rotateX( ) v0.14+ +- rotateY( ) v0.14+ +- perspective( ) Android 4.1å以ä¸çæ¬æ¯æ v0.16+ - transform-origin: number/percentage/keyword(top/left/right/bottom) ### ç¤ºä¾ http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/cn/references/modules/animation.md -- diff --git a/doc/source/cn/references/modules/animation.md b/doc/source/cn/references/modules/animation.md index f50bea3..8d188fc 100644 --- a/doc/source/cn/references/modules/animation.md +++ b/doc/source/cn/references/modules/animation.md @@ -47,6 +47,8 @@ version: 2.1 | `translate`/`translateX`/`translateY` | æå®å ç´ è¦ç§»å¨å°çä½ç½® | åç´ å¼æç¾åæ¯ | æ | | `rotate` | æå®å ç´ å°è¢«æ转çè§åº¦ï¼åä½æ¯åº¦ | number | æ | | `scale`/`scaleX`/`scaleY` | ææ¯ä¾æ¾å¤§æ缩å°å ç´ | number | æ | +| `rotate`/`rotateX` v0.14+ /`rotateY` v0.14+ | æå®å ç´ å°è¢«æ转çè§åº¦ï¼åä½æ¯åº¦ | number | æ | +| `perspective` v0.16+ | è§å¯è è·ç¦»z=0å¹³é¢çè·ç¦»ï¼å¨Android 4.1å以ä¸ææ | number | æ£æ ç©· * `callback {Function}`ï¼å¨ç»æ§è¡å®æ¯ä¹åçåè° * `needLayoutï¼booleanï¼`ï¼èç¹å¨ç»æ§è¡æ¶æ¯å¦äº§çå¸å±å¨ç»å³LayoutAnimation http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/references/common-style.md -- diff --git a/doc/source/references/common-style.md b/doc/source/references/common-style.md index c0bd084..9c1251f 100644 --- a/doc/source/references/common-style.md +++ b/doc/source/references/common-style.md @@ -203,6 +203,9 @@ Currently supported format: * scaleX( ) * scaleY( ) * rotate( ) +- rotateX( ) v0.14+ +- rotateY( ) v0.14+ +- perspective( ), supported for Android 4.1 and above. v0.16+ * transform-origin: number/percentage/keyword(top/left/right/bottom) ### Example http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b3ecd5c/doc/source/references/modules/animation.md -- diff --git a/doc/source/references/modules/animation.md b/doc/source/references/modules/animation.md index 6ea5cbd..a2f5175 100644 --- a/doc/source/references/modules/animation.md +++ b/doc/source/references/modules/animation.md @@ -52,7 +52,8 @@ properties of `transform`: | name| description | value type | default value | | :-- | :--- | :--- | : | | translate/translateX/translateY | Specifies the location of which the element will be translated to. | pixel or percent | none | -| rotate | Specifies the angle of which the element will be rotated, the unit is degree. | number | none | +| rotate/rotateX v0.14+ /rotateY v0.14+ |Specifies the angle of which the element will be rotated, the unit is degree.|number|none| +| perspective v0.16+ | The distance between the z=0 plane and the user in order to give to the 3D-positioned element some perspective. Supported for Android 4.1 and above. | number | positive infinity |
[GitHub] incubator-weex issue #694: * [android] add the right proguard config of exte...
Github user weex-bot commented on the issue: https://github.com/apache/incubator-weex/pull/694 Warnings :warning: No Changelog changes! Messages :book: According to the blame info, we recommended @misakuo to be the reviewers. Generated by :no_entry_sign: http://github.com/danger/danger-js/;>dangerJS ---