[GitHub] incubator-weex pull request #923: [WEEX-154][iOS] record if bundlejs downloa...
GitHub user gurisxie opened a pull request: https://github.com/apache/incubator-weex/pull/923 [WEEX-154][iOS] record if bundlejs download failed 1. when download statecode not equal to 200 2. when download data is null WXErrorCode and WXRenderErrorCode is the specific class to define those errors.and we can call WXExceptionUtils's commit method to track those errors immediately to some RT userlog analyzing platform. More Info See: https://issues.apache.org/jira/browse/WEEX-154 You can merge this pull request into a Git repository by running: $ git pull https://github.com/gurisxie/incubator-weex ios-feature-error-upload1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/923.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 #923 commit d9e726b929eefd981054b41fc8c411823481f902 Author: gurisxie <279483...@qq.com> Date: 2017-11-30T08:21:37Z [WEEX-154][iOS] record if bundlejs download failed 1. when download statecode not equal to 200 2. when download data is null More Info See: https://issues.apache.org/jira/browse/WEEX-154 ---
[GitHub] incubator-weex pull request #922: [WEEX-154][iOS] record if bundlejs downloa...
Github user gurisxie closed the pull request at: https://github.com/apache/incubator-weex/pull/922 ---
[GitHub] incubator-weex pull request #922: [WEEX-154][iOS] record if bundlejs downloa...
GitHub user gurisxie opened a pull request: https://github.com/apache/incubator-weex/pull/922 [WEEX-154][iOS] record if bundlejs download failed * [ios] record if bundlejs download failed * when download failed * when data is null You can merge this pull request into a Git repository by running: $ git pull https://github.com/gurisxie/incubator-weex ios-feature-error-upload1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/922.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 #922 commit f6beaf13cf0f41865cad16aee3823a557fc0a90c Author: gurisxie <279483...@qq.com> Date: 2017-11-30T02:43:00Z * [ios] record if bundlejs download failed ---
[GitHub] incubator-weex issue #915: [WEEX-148][Android] box-shadow support multi shad...
Github user gurisxie commented on the issue: https://github.com/apache/incubator-weex/pull/915 please check whether it's ok. If yes, you need to change the base png for diff. ![image](https://user-images.githubusercontent.com/7436932/33300663-85d13d9a-d42c-11e7-9d1a-1b9845e57129.png) ---
incubator-weex git commit: * [doc] publish 0.17.0 release note
Repository: incubator-weex Updated Branches: refs/heads/master 850f6f47e -> b2a28229e * [doc] publish 0.17.0 release note Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b2a28229 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b2a28229 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b2a28229 Branch: refs/heads/master Commit: b2a28229e529431cb749d2fcd6bf0419c68db321 Parents: 850f6f4 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 22 19:52:45 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 19:52:45 2017 +0800 -- doc/source/cn/releasenote.md | 29 + doc/source/releasenote.md| 30 ++ 2 files changed, 59 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b2a28229/doc/source/cn/releasenote.md -- diff --git a/doc/source/cn/releasenote.md b/doc/source/cn/releasenote.md index d237fec..02aa8c8 100644 --- a/doc/source/cn/releasenote.md +++ b/doc/source/cn/releasenote.md @@ -6,6 +6,35 @@ layout: post # Release Note +## v0.17 +- + +* `feature` `Android/iOS` Support `writing direction style:direction=rtl`([#782](https://github.com/apache/incubator-weex/pull/782)[#886](https://github.com/apache/incubator-weex/pull/886)) +* `feature` `Android/iOS` Support scroll start and scroll end event on scroller and list ([#858](https://github.com/apache/incubator-weex/pull/858)[856](https://github.com/apache/incubator-weex/pull/856)) +* `feature` `iOS` support text max-width ï¼[#834](https://github.com/apache/incubator-weex/pull/834)ï¼ +* `feature` `Android` CSS Transiton Animation Supported component ([#851](https://github.com/apache/incubator-weex/pull/851)) +* `feature` `Android` New `local` module ([#781](https://github.com/apache/incubator-weex/pull/781)) +* `feature` `Android` Support ripple background on Android 5.0 and higher ([#792](https://github.com/apache/incubator-weex/pull/792)) +* `feature` `Android` Support multi language on dialog ([#831](https://github.com/apache/incubator-weex/pull/831)) +* `feature` `H5` Support lazyload and appear watcher when body height set to 100% ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `H5` Add try catch for storage accessing incase user disabled the related function in a browser ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `H5` image support css sprite (sprite-src, sprite-position, sprite-width) ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `JSFM` Support batch update styles and attributes in Vue.js ([#819](https://github.com/apache/incubator-weex/pull/819) [#7046](https://github.com/vuejs/vue/pull/7046)) +* `feature` `JSFM` Stop trimming CSS units in richtext component. ([#6927](https://github.com/vuejs/vue/pull/6927)) +* `feature` `JSFM` Stop rethrow the captured error on Weex platform. ([#7024](https://github.com/vuejs/vue/pull/7024)) +* `feature` `JSFM` Upgrade weex-vue-framework to 2.5.3 ([release nodes](https://github.com/vuejs/vue/releases/tag/v2.5.3)) +* `feature` `JSFM` Adjust the behavior of `nextTick` to improve compatibility. +* `bugfix` `iOS` bugfix boxshadow render abnormal ï¼[#791](https://github.com/apache/incubator-weex/pull/791)ï¼ +* `bugfix` `iOS` bugfix timer exposed on JSContxt ï¼[#839](https://github.com/apache/incubator-weex/pull/839)ï¼ +* `bugfix` `iOS` fix iOS8 scrollviewâs assign delegate crash ï¼[#838](https://github.com/apache/incubator-weex/pull/838)ï¼ +* `bugfix` `iOS` fix setViewportï¼sometimes doesnât workï¼[#843](https://github.com/apache/incubator-weex/pull/843)ï¼ +* `bugfix` `iOS` fix addEvent lead to generate a new view while it as been recycled ï¼[#837](https://github.com/apache/incubator-weex/pull/837)ï¼ +* `bugfix` `iOS` fix about setting nan frame crash ï¼[#853](https://github.com/apache/incubator-weex/pull/853)ï¼ +* `bugfix` `iOS` disable tableview estimation row or section height which make list component behavior abnormal ï¼[#867](https://github.com/apache/incubator-weex/pull/867)ï¼ +* `bugfix` `Android` Fix that moveElement doesnât work when parent is not a list ([#805](https://github.com/apache/incubator-weex/pull/805)) +* `bugfix` `Android` Fix flicker caused by coexistence of box-shadow and border-radius (#[780](https://github.com/apache/incubator-weex/pull/780)) +* `bugfix` `Android` Fix android new Date() cannot get accuracy time ([#753](https://github.com/apache/incubator-weex/pull/753)) +* `bugfix` `H5` Fix scroll event listenning and scrollToElement on chrome for the latest version ([#827](https://github.com/apache/incubato
[incubator-weex] Git Push Summary [forced push!] [Forced Update!]
Repository: incubator-weex Updated Branches: refs/heads/master 31507d1b4 -> 850f6f47e (forced update)
incubator-weex git commit: * [doc] update publish info from repo
Repository: incubator-weex Updated Branches: refs/heads/master 63aeb64ef -> 31507d1b4 * [doc] update publish info from repo Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/31507d1b Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/31507d1b Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/31507d1b Branch: refs/heads/master Commit: 31507d1b45183dd874a497fb556c5868ff582c32 Parents: 63aeb64 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 22 19:28:39 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 19:28:39 2017 +0800 -- doc/_config_cn.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/31507d1b/doc/_config_cn.yml -- diff --git a/doc/_config_cn.yml b/doc/_config_cn.yml index 93eff7d..014d5e4 100644 --- a/doc/_config_cn.yml +++ b/doc/_config_cn.yml @@ -54,7 +54,7 @@ jsonContent: ## Docs: https://hexo.io/docs/deployment.html deploy: type: git - repo: g...@github.com:weexteam/incubator-weex.git + repo: g...@github.com:apache/incubator-weex.git branch: [gh-pages] # URL
incubator-weex git commit: * [doc] publish release note for 0.17.0
Repository: incubator-weex Updated Branches: refs/heads/master 9976c1f56 -> 63aeb64ef * [doc] publish release note for 0.17.0 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/63aeb64e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/63aeb64e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/63aeb64e Branch: refs/heads/master Commit: 63aeb64ef8237660eb120a5ea981fd6077882d02 Parents: 9976c1f Author: gurisxie <279483...@qq.com> Authored: Wed Nov 22 19:13:59 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 19:13:59 2017 +0800 -- doc/source/cn/releasenote.md | 412 ++ doc/source/releasenote.md| 5 +- 2 files changed, 242 insertions(+), 175 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/63aeb64e/doc/source/cn/releasenote.md -- diff --git a/doc/source/cn/releasenote.md b/doc/source/cn/releasenote.md index d237fec..bac1016 100644 --- a/doc/source/cn/releasenote.md +++ b/doc/source/cn/releasenote.md @@ -1,29 +1,64 @@ + --- -title: Release Note -type: releasenote + + +## title: Release Note +type: releasenote layout: post # Release Note +## v0.17 +--- + +* `feature` `Android/iOS` Support `writing direction style:direction=rtl`([#782](https://github.com/apache/incubator-weex/pull/782)[#886](https://github.com/apache/incubator-weex/pull/886)) +* `feature` `Android/iOS`Support scroll start and scroll end event on scroller and list ([#858](https://github.com/apache/incubator-weex/pull/858)[856](https://github.com/apache/incubator-weex/pull/856)) +* `feature` `iOS`support text max-width ï¼[#834](https://github.com/apache/incubator-weex/pull/834)ï¼ +* `feature` `Android` CSS Transiton Animation Supported` component ([#851](https://github.com/apache/incubator-weex/pull/851)) +* `feature` `Android`Improve performance for `list` component ([#775](https://github.com/apache/incubator-weex/pull/775)) +* `feature` `Android`New `local` module ([#781](https://github.com/apache/incubator-weex/pull/781)) +* `feature` `Android`Support ripple background on Android 5.0 and higher ([#792](https://github.com/apache/incubator-weex/pull/792)) +* `feature` `Android`Support multi language on dialog ([#831](https://github.com/apache/incubator-weex/pull/831)) +* `feature` `H5`Support lazyload and appear watcher when body height set to 100% ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `H5`Add try catch for storage accessing incase user disabled the related function in a browser ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `H5`image support css sprite (sprite-src, sprite-position, sprite-width) ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `JSFM`Support batch update styles and attributes in Vue.js ([#819](https://github.com/apache/incubator-weex/pull/819) [#7046](https://github.com/vuejs/vue/pull/7046)) +* `feature` `JSFM`Stop trimming CSS units in richtext component. ([#6927](https://github.com/vuejs/vue/pull/6927)) +* `feature` `JSFM`Stop rethrow the captured error on Weex platform. ([#7024](https://github.com/vuejs/vue/pull/7024)) +* `feature` `JSFM`Upgrade weex-vue-framework to 2.5.3 ([release nodes](https://github.com/vuejs/vue/releases/tag/v2.5.3)) +* `feature` `JSFM`Adjust the behavior of `nextTick` to improve compatibility. +* `bugfix` `iOS`bugfix boxshadow render abnormal ï¼[#791](https://github.com/apache/incubator-weex/pull/791)ï¼ +* `bugfix` `iOS`bugfix timer exposed on JSContxt ï¼[#839](https://github.com/apache/incubator-weex/pull/839)ï¼ +* `bugfix` `iOS`fix iOS8 scrollviewâs assign delegate crash ï¼[#838](https://github.com/apache/incubator-weex/pull/838)ï¼ +* `bugfix` `iOS`fix setViewportï¼sometimes doesnât workï¼[#843](https://github.com/apache/incubator-weex/pull/843)ï¼ +* `bugfix` `iOS`fix addEvent lead to generate a new view while it as been recycled ï¼[#837](https://github.com/apache/incubator-weex/pull/837)ï¼ +* `bugfix` `iOS`fix about setting nan frame crash ï¼[#853](https://github.com/apache/incubator-weex/pull/853)ï¼ +* `bugfix` `iOS`disable tableview estimation row or section height which make list component behavior abnormal ï¼[#867](https://github.com/apache/incubator-weex/pull/867)ï¼ +* `bugfix` `Android`Fix that moveElement doesnât work when parent is not a list ([#805](https://github.com/apache/incubator-weex/pull/805)) +* `bugfix` `Android`Fix flicker caused by coexistence of box-shadow and border-radius (#[780](https://github.com/apache/incubator-weex/pull/780)) +* `bugfix` `Android`Fix android new Date() cannot get accuracy time
[incubator-weex] Git Push Summary
Repository: incubator-weex Updated Tags: refs/tags/0.17.0 [created] d40edcd6b
incubator-weex git commit: * [doc] update 0.17-releasenote
Repository: incubator-weex Updated Branches: refs/heads/master 850f6f47e -> 9976c1f56 * [doc] update 0.17-releasenote Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/9976c1f5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9976c1f5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9976c1f5 Branch: refs/heads/master Commit: 9976c1f563c486b639a85291f047b029db97007e Parents: 850f6f4 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 22 19:05:05 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 19:05:05 2017 +0800 -- doc/source/releasenote.md | 413 - 1 file changed, 241 insertions(+), 172 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9976c1f5/doc/source/releasenote.md -- diff --git a/doc/source/releasenote.md b/doc/source/releasenote.md index fbfe14d..bc3c009 100644 --- a/doc/source/releasenote.md +++ b/doc/source/releasenote.md @@ -1,28 +1,65 @@ + --- -title: Release Note -type: releasenote + + +## title: Release Note +type: releasenote layout: post # Release Note +## v0.17 +--- + + +* `feature` `iOS`support text max-width ï¼[#834](https://github.com/apache/incubator-weex/pull/834)ï¼ +* `feature` `Android` CSS Transiton Animation Supported` component ([#851](https://github.com/apache/incubator-weex/pull/851)) +* `feature` `Android`Improve performance for `list` component ([#775](https://github.com/apache/incubator-weex/pull/775)) +* `feature` `Android`New `local` module ([#781](https://github.com/apache/incubator-weex/pull/781)) +* `feature` `Android/iOS`Support `writing direction style:direction=rtl`([#782](https://github.com/apache/incubator-weex/pull/782)[#886](https://github.com/apache/incubator-weex/pull/886)) +* `feature` `Android`Support ripple background on Android 5.0 and higher ([#792](https://github.com/apache/incubator-weex/pull/792)) +* `feature` `Android`Support multi language on dialog ([#831](https://github.com/apache/incubator-weex/pull/831)) +* `feature` `Android/iOS`Support scroll start and scroll end event on scroller and list ([#858](https://github.com/apache/incubator-weex/pull/858)[856](https://github.com/apache/incubator-weex/pull/856)) +* `feature` `H5`Support lazyload and appear watcher when body height set to 100% ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `H5`Add try catch for storage accessing incase user disabled the related function in a browser ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `H5`image support css sprite (sprite-src, sprite-position, sprite-width) ([#827](https://github.com/apache/incubator-weex/pull/827)). +* `feature` `JSFM`Support batch update styles and attributes in Vue.js ([#819](https://github.com/apache/incubator-weex/pull/819) [#7046](https://github.com/vuejs/vue/pull/7046)) +* `feature` `JSFM`Stop trimming CSS units in richtext component. ([#6927](https://github.com/vuejs/vue/pull/6927)) +* `feature` `JSFM`Stop rethrow the captured error on Weex platform. ([#7024](https://github.com/vuejs/vue/pull/7024)) +* `feature` `JSFM`Upgrade weex-vue-framework to 2.5.3 ([release nodes](https://github.com/vuejs/vue/releases/tag/v2.5.3)) +* `feature` `JSFM`Adjust the behavior of `nextTick` to improve compatibility. +* `bugfix` `iOS`bugfix boxshadow render abnormal ï¼[#791](https://github.com/apache/incubator-weex/pull/791)ï¼ +* `bugfix` `iOS`bugfix timer exposed on JSContxt ï¼[#839](https://github.com/apache/incubator-weex/pull/839)ï¼ +* `bugfix` `iOS`fix iOS8 scrollviewâs assign delegate crash ï¼[#838](https://github.com/apache/incubator-weex/pull/838)ï¼ +* `bugfix` `iOS`fix setViewportï¼sometimes doesnât workï¼[#843](https://github.com/apache/incubator-weex/pull/843)ï¼ +* `bugfix` `iOS`fix addEvent lead to generate a new view while it as been recycled ï¼[#837](https://github.com/apache/incubator-weex/pull/837)ï¼ +* `bugfix` `iOS`fix about setting nan frame crash ï¼[#853](https://github.com/apache/incubator-weex/pull/853)ï¼ +* `bugfix` `iOS`disable tableview estimation row or section height which make list component behavior abnormal ï¼[#867](https://github.com/apache/incubator-weex/pull/867)ï¼ +* `bugfix` `Android`Fix that moveElement doesnât work when parent is not a list ([#805](https://github.com/apache/incubator-weex/pull/805)) +* `bugfix` `Android`Fix flicker caused by coexistence of box-shadow and border-radius (#[780](https://github.com/apache/incubator-weex/pull/780)) +* `bugfix` `Android`Fix android new Date() cannot get accuracy time ([#753](https://github.com/apache/incubator-weex/pull/753))
[GitHub] incubator-weex issue #860: [WEEX-112][iOS] make weex playground app adapt to...
Github user gurisxie commented on the issue: https://github.com/apache/incubator-weex/pull/860 This PR has been merged and will close soon, thanks ^_^ ---
incubator-weex git commit: [WEEX-112][iOS] make weex playground app adapt to iPhone X
Repository: incubator-weex Updated Branches: refs/heads/master 805f8a832 -> 850f6f47e [WEEX-112][iOS] make weex playground app adapt to iPhone X according to https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/launch-screen/ , we must add a 1125px X 2436px launch image for Portrait size and 2436 X1125px, at the same time, developers must consider about the safe-area of container. Bug: 112 [WEEX-112] make Xcode 8 adapt [WEEX-112][iOS]add launch image and clear launch image Bug:112 [WEEX-112][iOS] update project settings Bug:112 close #860 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/850f6f47 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/850f6f47 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/850f6f47 Branch: refs/heads/master Commit: 850f6f47eb8fa110216a1e0e61e904c850b33d1a Parents: 805f8a8 Author: acton393 <zhangxing610...@gmail.com> Authored: Tue Nov 14 13:10:15 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 13:26:30 2017 +0800 -- .../WeexDemo.xcodeproj/project.pbxproj | 12 +- .../AppIcon.appiconset/Contents.json| 5 + .../LaunchImage.launchimage/Contents.json | 122 --- .../LaunchImage.launchimage/default-...@2x.png | Bin 24902 -> 0 bytes .../default-5...@2x-1.png | Bin 22184 -> 0 bytes .../LaunchImage.launchimage/Default.png | Bin 6733 -> 0 bytes .../LaunchImage.launchimage/defa...@2x-1.png| Bin 19694 -> 0 bytes .../LaunchImage.launchimage/defa...@3x-1.png| Bin 6 -> 0 bytes .../LaunchImage.launchimage/defa...@3x.png | Bin 6 -> 0 bytes .../LaunchImage.launchimage/Retinal HD 4.7.png | Bin 0 -> 33603 bytes .../LaunchImage.launchimage/Retinal HD 5.5.png | Bin 0 -> 72798 bytes .../iPhone5.5-landscape.png | Bin 0 -> 66768 bytes .../iPhoneX-landscape.png | Bin 0 -> 68749 bytes .../LaunchImage.launchimage/ipho...@3x.png | Bin 0 -> 68622 bytes ios/playground/WeexDemo/WXDemoViewController.m | 21 +++- 15 files changed, 54 insertions(+), 106 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/850f6f47/ios/playground/WeexDemo.xcodeproj/project.pbxproj -- diff --git a/ios/playground/WeexDemo.xcodeproj/project.pbxproj b/ios/playground/WeexDemo.xcodeproj/project.pbxproj index 5c56412..351693b 100644 --- a/ios/playground/WeexDemo.xcodeproj/project.pbxproj +++ b/ios/playground/WeexDemo.xcodeproj/project.pbxproj @@ -35,8 +35,8 @@ 847CAF311F39E3F100551725 /* WXExtModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 847CAF301F39E3F100551725 /* WXExtModule.m */; }; 84D7CAC71CE3266C00D48D46 /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 7475ACA01CD8444A0044E96C /* libsqlite3.0.tbd */; }; 8A0B5EFFF75BF82EA481983D /* libPods-WeexUITestDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E48C20F443AA337D1FE97622 /* libPods-WeexUITestDemo.a */; }; - C47B78D21F299E27001D3B0C /* WXExtendCallNativeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = C47B78D11F299E27001D3B0C /* WXExtendCallNativeTest.m */; }; C43CDA031F1C6E01005A6B03 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = C43CDA021F1C6E01005A6B03 /* libz.tbd */; }; + C47B78D21F299E27001D3B0C /* WXExtendCallNativeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = C47B78D11F299E27001D3B0C /* WXExtendCallNativeTest.m */; }; DC20B8E61ECADA2500845F39 /* WXConfigCenterDefaultImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = DC20B8E51ECADA2500845F39 /* WXConfigCenterDefaultImpl.m */; }; DC5B53691E8CED9400E02125 /* WXScannerHistoryVC.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5B53681E8CED9400E02125 /* WXScannerHistoryVC.m */; }; DC5E503E1D0D97130059F0EB /* weex.png in Resources */ = {isa = PBXBuildFile; fileRef = DC5E503C1D0D97130059F0EB /* weex.png */; }; @@ -97,9 +97,9 @@ 847CAF2F1F39E3F100551725 /* WXExtModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXExtModule.h; sourceTree = ""; }; 847CAF301F39E3F100551725 /* WXExtModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXExtModule.m; sourceTree = ""; }; 9420131417A731ED089B0814 /* Pods-WeexDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wee
incubator-weex git commit: close #896
Repository: incubator-weex Updated Branches: refs/heads/master 4e006d88b -> 805f8a832 close #896 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/805f8a83 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/805f8a83 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/805f8a83 Branch: refs/heads/master Commit: 805f8a832b26a580089127e15b0aa30b5b5ee0b0 Parents: 4e006d8 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 22 11:08:20 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 11:08:20 2017 +0800 -- --
incubator-weex git commit: * [test] bug fix , compatibility of maraca can't find element
Repository: incubator-weex Updated Branches: refs/heads/master 5f3482315 -> 4e006d88b * [test] bug fix , compatibility of maraca can't find element Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/4e006d88 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4e006d88 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4e006d88 Branch: refs/heads/master Commit: 4e006d88bbf1755df56996727a2821c86242143c Parents: 5f34823 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 22 11:04:47 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 11:04:47 2017 +0800 -- test/pages/components/web-event.vue | 2 +- test/scripts/components/web-event.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4e006d88/test/pages/components/web-event.vue -- diff --git a/test/pages/components/web-event.vue b/test/pages/components/web-event.vue index d8ffa32..d86309e 100644 --- a/test/pages/components/web-event.vue +++ b/test/pages/components/web-event.vue @@ -33,7 +33,7 @@ module.exports = { data : { - src:'https://error.a-never-exists-site-for-testcase-in-weex.com', + src:'https://error.aneverexistssitefortestcaseinweex.com', txtStart:'', txtFinish:'', txtError:'' http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4e006d88/test/scripts/components/web-event.test.js -- diff --git a/test/scripts/components/web-event.test.js b/test/scripts/components/web-event.test.js index e04e8a1..6497f8e 100644 --- a/test/scripts/components/web-event.test.js +++ b/test/scripts/components/web-event.test.js @@ -28,7 +28,7 @@ describe('weex '+goal+' test @ignore-android', function () { .waitForElementByName(goal, maxW, 2000) .waitForElementByName('txtStart:https://www.baidu.com/', maxW, 2000) .waitForElementByName('txtFinish:https://www.baidu.com/', maxW, 2000) - .waitForElementByName('txtError:https://error.a-never-exists-site-for-testcase-in-weex.com/', maxW, 2000) + .waitForElementByName('txtError:https://error.aneverexistssitefortestcaseinweex.com/', maxW, 2000) .waitForElementByName('reload', maxW, 2000) .click().sleep(500) .waitForElementByName('txtFinish:https://www.baidu.com/', maxW, 2000)
incubator-weex git commit: [WEEX-131][ios]URL property in error event of web component may not be the real URL, fix it.
Repository: incubator-weex Updated Branches: refs/heads/master ee8094e7f -> 5f3482315 [WEEX-131][ios]URL property in error event of web component may not be the real URL, fix it. In error callback, webview.request may return the previous loaded web page URL, use error.userInfo to get the real error URL. And http://www.error.com exists now, change it to another URL. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5f348231 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5f348231 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5f348231 Branch: refs/heads/master Commit: 5f34823155ef892d04a90d8515696b77b33f1f69 Parents: ee8094e Author: CYJB <f8c...@126.com> Authored: Tue Nov 21 19:02:49 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 22 10:59:19 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m | 12 +--- test/pages/components/web-event.vue| 14 +++--- test/scripts/components/web-event.test.js | 4 ++-- 3 files changed, 18 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5f348231/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m index 792d4c9..c0bd9f4 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m @@ -200,9 +200,15 @@ WX_EXPORT_METHOD(@selector(goForward)) NSMutableDictionary *data = [self baseInfo]; [data setObject:[error localizedDescription] forKey:@"errorMsg"]; [data setObject:[NSString stringWithFormat:@"%ld", (long)error.code] forKey:@"errorCode"]; -if(error.userInfo && ![error.userInfo[NSURLErrorFailingURLStringErrorKey] hasPrefix:@"http"]){ -return; -} + + NSString * urlString = error.userInfo[NSURLErrorFailingURLStringErrorKey]; + if (urlString) { + // webview.request may not be the real error URL, must get from error.userInfo + [data setObject:urlString forKey:@"url"]; + if (![urlString hasPrefix:@"http"]) { + return; + } + } [self fireEvent:@"error" params:data]; } } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5f348231/test/pages/components/web-event.vue -- diff --git a/test/pages/components/web-event.vue b/test/pages/components/web-event.vue index 5cae27d..d8ffa32 100644 --- a/test/pages/components/web-event.vue +++ b/test/pages/components/web-event.vue @@ -1,8 +1,8 @@ - - + + @@ -18,11 +18,11 @@ æµè¯ç¹ï¼ - * + * æµè¯æ¹å¼ï¼ - * - * + * + * @@ -33,7 +33,7 @@ module.exports = { data : { - src:'http://www.error.com', + src:'https://error.a-never-exists-site-for-testcase-in-weex.com', txtStart:'', txtFinish:'', txtError:'' @@ -94,4 +94,4 @@ height:400px; border-width: 1px; } - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5f348231/test/scripts/components/web-event.test.js -- diff --git a/test/scripts/components/web-event.test.js b/test/scripts/components/web-event.test.js index b2ce6ce..e04e8a1 100644 --- a/test/scripts/components/web-event.test.js +++ b/test/scripts/components/web-event.test.js @@ -28,7 +28,7 @@ describe('weex '+goal+' test @ignore-android', function () { .waitForElementByName(goal, maxW, 2000) .waitForElementByName('txtStart:https://www.baidu.com/', maxW, 2000) .waitForElementByName('txtFinish:https://www.baidu.com/', maxW, 2000) - .waitForElementByName('txtError:http://www.error.com/', maxW, 2000) + .waitForElementByName('txtError:https://error.a-never-exists-site-for-testcase-in-weex.com/', maxW, 2000) .waitForElementByName('reload', maxW, 2000) .click().sleep(500) .waitForElementByName('txtFinish:https://www.baidu.com/', maxW, 2000) @@ -41,4 +41,4 @@ describe('weex '+goal+' test @ignore-android', function () { .waitForElementByName('txtStart:https://www.baidu.com/', maxW, 2000) .waitForElementByName('txtFinish:https://www.baidu.com/', maxW, 2000) }) -}); \ No newline at end of file +});
incubator-weex git commit: close #822
Repository: incubator-weex Updated Branches: refs/heads/master 446f5db41 -> ee8094e7f close #822 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ee8094e7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ee8094e7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ee8094e7 Branch: refs/heads/master Commit: ee8094e7f99ab8a9a3e9bd3bf81ddfdf348ffbb4 Parents: 446f5db Author: gurisxie <279483...@qq.com> Authored: Tue Nov 21 23:15:38 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Tue Nov 21 23:15:38 2017 +0800 -- --
[2/2] incubator-weex git commit: Remove maven central repository, use only jcenter
Remove maven central repository, use only jcenter jcenter is a super set on top of maven central, so having both of those repositories is redundant, and the preferred one should be jcenter. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/24e48c3f Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/24e48c3f Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/24e48c3f Branch: refs/heads/master Commit: 24e48c3f28921f79c926573e86623d33a966d87c Parents: 1175064 Author: Yinon Avraham <yinonavra...@gmail.com> Authored: Wed Oct 25 14:00:06 2017 +0300 Committer: gurisxie <279483...@qq.com> Committed: Tue Nov 21 22:55:23 2017 +0800 -- android/build.gradle | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/24e48c3f/android/build.gradle -- diff --git a/android/build.gradle b/android/build.gradle index 9c0e2d5..c51a1c3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,6 @@ buildscript { repositories { -mavenCentral() jcenter() } dependencies { @@ -15,18 +14,15 @@ plugins { } repositories { -mavenCentral() -jcenter() +jcenter() } subprojects { repositories { -mavenCentral() jcenter() } buildscript { repositories { -mavenCentral() jcenter() } dependencies {
[GitHub] incubator-weex issue #844: [WEEX-99][Android] fix setViewport: sometimes doe...
Github user gurisxie commented on the issue: https://github.com/apache/incubator-weex/pull/844 HI, @myeveryheart there is something wrong with your pr. It will not fill full when setViewport = 640. please have a look. the tc linkï¼[viewport tc](https://github.com/apache/incubator-weex/blob/master/test/pages/modules/viewport-basic.vue) the result pic: ![image](https://user-images.githubusercontent.com/7436932/33058996-4dfe0eca-cecd-11e7-97fd-a9e71fbb7efc.png) ---
[GitHub] incubator-weex pull request #894: * [test] rebase
Github user gurisxie closed the pull request at: https://github.com/apache/incubator-weex/pull/894 ---
[GitHub] incubator-weex pull request #894: * [test] rebase
Github user gurisxie closed the pull request at: https://github.com/apache/incubator-weex/pull/894 ---
[GitHub] incubator-weex pull request #894: * [test] rebase
GitHub user gurisxie reopened a pull request: https://github.com/apache/incubator-weex/pull/894 * [test] rebase First of all, thank you for your contribution! Please makes sure that these checkboxes are checked before submitting your PR, thank you! CheckList: **if** *isBugFix* **:** * [ ] Make sure that you add at least one unit test for the bug which you had fixed. **elif** *isNewFeature* **:** * [ ] Update API docs for the component. * [ ] Update/Add demo to demonstrate new feature. * [ ] Update test scripts for the feature. * [ ] Add unit tests for the feature. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gurisxie/incubator-weex ios-bugfix-rebase Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/894.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 #894 commit b749c89b9d06a49223dd3ec290626c2c31871042 Author: gurisxie <279483...@qq.com> Date: 2017-11-21T02:57:09Z * [test] rebase ---
[GitHub] incubator-weex pull request #894: * [test] rebase
GitHub user gurisxie opened a pull request: https://github.com/apache/incubator-weex/pull/894 * [test] rebase First of all, thank you for your contribution! Please makes sure that these checkboxes are checked before submitting your PR, thank you! CheckList: **if** *isBugFix* **:** * [ ] Make sure that you add at least one unit test for the bug which you had fixed. **elif** *isNewFeature* **:** * [ ] Update API docs for the component. * [ ] Update/Add demo to demonstrate new feature. * [ ] Update test scripts for the feature. * [ ] Add unit tests for the feature. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gurisxie/incubator-weex ios-bugfix-rebase Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/894.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 #894 commit b749c89b9d06a49223dd3ec290626c2c31871042 Author: gurisxie <279483...@qq.com> Date: 2017-11-21T02:57:09Z * [test] rebase ---
incubator-weex git commit: close #884,close #886,close #889
Repository: incubator-weex Updated Branches: refs/heads/master 54786c65d -> b94949b33 close #884,close #886,close #889 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b94949b3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b94949b3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b94949b3 Branch: refs/heads/master Commit: b94949b333105d4cc4186a90e8874cdc7876 Parents: 54786c6 Author: gurisxie <279483...@qq.com> Authored: Tue Nov 21 00:28:59 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Tue Nov 21 00:28:59 2017 +0800 -- --
incubator-weex git commit: -[test] close #887
Repository: incubator-weex Updated Branches: refs/heads/master 1201b24e8 -> 54786c65d -[test] close #887 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/54786c65 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/54786c65 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/54786c65 Branch: refs/heads/master Commit: 54786c65d064dd59bf46d052516b0fee86c6363d Parents: 1201b24 Author: gurisxie <279483...@qq.com> Authored: Mon Nov 20 23:43:38 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 23:43:38 2017 +0800 -- --
incubator-weex git commit: resolve #887
Repository: incubator-weex Updated Branches: refs/heads/master 564447f19 -> 1201b24e8 resolve #887 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1201b24e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1201b24e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1201b24e Branch: refs/heads/master Commit: 1201b24e8b443d6be8a815e00f1ce4a8bff4895b Parents: 564447f Author: gurisxie <279483...@qq.com> Authored: Mon Nov 20 23:41:07 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 23:41:07 2017 +0800 -- --
incubator-weex git commit: [WEEX-132][iOS] support text writing direction from right to left
Repository: incubator-weex Updated Branches: refs/heads/master 5a7b10d3a -> 564447f19 [WEEX-132][iOS] support text writing direction from right to left It is a common sense that people have different writing tradition, especially on writing direction, so text component must consider about the writing direction, if specify the direction in style is `rtl`, then the text writing direction will be right to left and right aligned, `ltr` or doesn't specify any direction value, the direction will be left to right default. Bug: 132 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/564447f1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/564447f1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/564447f1 Branch: refs/heads/master Commit: 564447f191c28e5cba3b15040b888e6d143758be Parents: 5a7b10d Author: acton393 <zhangxing610...@gmail.com> Authored: Fri Nov 17 18:03:58 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 23:06:01 2017 +0800 -- .../WeexSDK/Sources/Component/WXTextComponent.m | 30 1 file changed, 30 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/564447f1/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m index e426a6bd..32828c3 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m @@ -120,6 +120,7 @@ CGFloat WXTextDefaultLineThroughWidth = 1.2; WXTextStyle _fontStyle; NSUInteger _lines; NSTextAlignment _textAlign; +NSString *_direction; WXTextDecoration _textDecoration; NSString *_textOverflow; CGFloat _lineHeight; @@ -234,6 +235,7 @@ do {\ WX_STYLE_FILL_TEXT_PIXEL(lineHeight, lineHeight, YES) WX_STYLE_FILL_TEXT_PIXEL(letterSpacing, letterSpacing, YES) WX_STYLE_FILL_TEXT(wordWrap, wordWrap, NSString, YES); +WX_STYLE_FILL_TEXT(direction, direction, NSString, YES) UIEdgeInsets padding = { WXFloorPixelValue(self.cssNode->style.padding[CSS_TOP] + self.cssNode->style.border[CSS_TOP]), @@ -440,6 +442,20 @@ do {\ NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new]; +// handle text direction style, default ltr +if ([_direction isEqualToString:@"rtl"]) { +if (0 == _textAlign) { +//force text right-align if don't specified any align. +_textAlign = NSTextAlignmentRight; +} +paragraphStyle.baseWritingDirection = NSWritingDirectionRightToLeft; +} else { +//if you specify NSWritingDirectionNaturalDirection, the receiver resolves the writing +//directionto eitherNSWritingDirectionLeftToRight or NSWritingDirectionRightToLeft, +//depending on the direction for the userâs language preference setting. +paragraphStyle.baseWritingDirection = NSWritingDirectionNatural; +} + if (_textAlign) { paragraphStyle.alignment = _textAlign; } @@ -521,6 +537,20 @@ do {\ NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new]; +// handle text direction style, default ltr +if ([_direction isEqualToString:@"rtl"]) { +if (0 == _textAlign) { +//force text right-align if don't specified any align. +_textAlign = NSTextAlignmentRight; +} +paragraphStyle.baseWritingDirection = NSWritingDirectionRightToLeft; +} else { +//if you specify NSWritingDirectionNaturalDirection, the receiver resolves the writing +//directionto eitherNSWritingDirectionLeftToRight or NSWritingDirectionRightToLeft, +//depending on the direction for the userâs language preference setting. +paragraphStyle.baseWritingDirection = NSWritingDirectionNatural; +} + if (_textAlign) { paragraphStyle.alignment = _textAlign; }
incubator-weex git commit: [WEEX-133][iOS] support word-wrap on iOS when drawing text
Repository: incubator-weex Updated Branches: refs/heads/master 39704d41e -> 5a7b10d3a [WEEX-133][iOS] support word-wrap on iOS when drawing text support word-wrap on text component, according to w3c rules, word-wrap maybe normal or word-break value, and normal will just clip character, and word break will break a new line. w3c document: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap try case: http://dotwe.org/vue/5460408a9159fd13168f64bf0b046c4b Bug:133 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5a7b10d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5a7b10d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5a7b10d3 Branch: refs/heads/master Commit: 5a7b10d3a93329638ba75a6b9cbab5dc85c32259 Parents: 39704d4 Author: acton393 <zhangxing610...@gmail.com> Authored: Fri Nov 17 19:46:58 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 22:54:57 2017 +0800 -- .../WeexSDK/Sources/Component/WXTextComponent.m | 22 +--- 1 file changed, 19 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5a7b10d3/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m index 2fbd925..e426a6bd 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m @@ -128,6 +128,7 @@ CGFloat WXTextDefaultLineThroughWidth = 1.2; BOOL _needsRemoveObserver; NSAttributedString * _ctAttributedString; +NSString *_wordWrap; pthread_mutex_t _ctAttributedStringMutex; pthread_mutexattr_t _propertMutexAttr; @@ -232,6 +233,7 @@ do {\ WX_STYLE_FILL_TEXT(textOverflow, textOverflow, NSString, NO) WX_STYLE_FILL_TEXT_PIXEL(lineHeight, lineHeight, YES) WX_STYLE_FILL_TEXT_PIXEL(letterSpacing, letterSpacing, YES) +WX_STYLE_FILL_TEXT(wordWrap, wordWrap, NSString, YES); UIEdgeInsets padding = { WXFloorPixelValue(self.cssNode->style.padding[CSS_TOP] + self.cssNode->style.border[CSS_TOP]), @@ -442,8 +444,14 @@ do {\ paragraphStyle.alignment = _textAlign; } -// set default lineBreakMode -paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping; +if ([[_wordWrap lowercaseString] isEqualToString:@"break-word"]) { +paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping; +} else if ([[_wordWrap lowercaseString] isEqualToString:@"normal"]){ +paragraphStyle.lineBreakMode = NSLineBreakByClipping; +} else { + // set default lineBreakMode +paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping; +} _truncationLine = NO; if (_textOverflow && [_textOverflow length] > 0) { if (_lines && [_textOverflow isEqualToString:@"ellipsis"]) @@ -563,7 +571,15 @@ do {\ NSTextContainer *textContainer = [NSTextContainer new]; textContainer.lineFragmentPadding = 0.0; -textContainer.lineBreakMode = NSLineBreakByClipping; +if ([[_wordWrap lowercaseString] isEqualToString:@"break-word"]) { +textContainer.lineBreakMode = NSLineBreakByWordWrapping; +} else if ([[_wordWrap lowercaseString] isEqualToString:@"normal"]){ +textContainer.lineBreakMode = NSLineBreakByClipping; +} else { +// set default lineBreakMode +textContainer.lineBreakMode = NSLineBreakByCharWrapping; +} + if (_textOverflow && [_textOverflow length] > 0) { if ([_textOverflow isEqualToString:@"ellipsis"]) textContainer.lineBreakMode = NSLineBreakByTruncatingTail;
incubator-weex git commit: [WEEX-129][android] Appear Event Be Fired Multi Times And Event not watch be fired
Repository: incubator-weex Updated Branches: refs/heads/master 8a479c681 -> 39704d41e [WEEX-129][android] Appear Event Be Fired Multi Times And Event not watch be fired Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/39704d41 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/39704d41 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/39704d41 Branch: refs/heads/master Commit: 39704d41ed64c9b7b677b8541ffb20d08e27b75f Parents: 8a479c6 Author: jianbai.gbj <jianbai@alibaba-inc.com> Authored: Fri Nov 17 15:01:19 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 18:29:08 2017 +0800 -- .../com/taobao/weex/ui/component/WXComponent.java| 15 --- .../com/taobao/weex/ui/component/WXVContainer.java | 11 +++ .../list/template/WXRecyclerTemplateList.java| 6 +++--- 3 files changed, 14 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/39704d41/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 9dc2091..6f75866 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 @@ -1661,21 +1661,14 @@ public abstract class WXComponent implements IWXObject, IWXActi } public void notifyAppearStateChange(String wxEventType,String direction){ -if(containsEvent(Constants.Event.APPEAR) || containsEvent(Constants.Event.DISAPPEAR)) { - Map<String, Object> params = new HashMap<>(); - params.put("direction", direction); - fireEvent(wxEventType, params); -} - } - - public void notifyWatchAppearDisappearEvent(String wxEventType,String direction){ if(containsEvent(wxEventType)) { - Map<String, Object> params = new HashMap<>(); - params.put("direction", direction); - fireEvent(wxEventType, params); + Map<String, Object> params = new HashMap<>(); + params.put("direction", direction); + fireEvent(wxEventType, params); } } + public boolean isUsing() { return isUsing; } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/39704d41/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java index 62b667b..174a3c2 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java @@ -355,11 +355,14 @@ public abstract class WXVContainer extends WXComponent { if(getHostView()==null || mChildren==null){ return; } -for(WXComponent component:mChildren){ - if(component.getHostView()!=null && !(component.getHostView().getVisibility()==View.VISIBLE)){ -wxEventType= Constants.Event.DISAPPEAR; +//appear should not notify child +if(getDomObject().getAttrs().containsKey("appearNotifyChild")){ + for(WXComponent component:mChildren){ +if(component.getHostView()!=null && !(component.getHostView().getVisibility()==View.VISIBLE)){ + wxEventType= Constants.Event.DISAPPEAR; +} +component.notifyAppearStateChange(wxEventType,direction); } - component.notifyAppearStateChange(wxEventType,direction); } } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/39704d41/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java index 2f3baee..a5f61b7 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java @@ -1358,7 +1358,7 @@ public class WXRecyclerTemplateList extends WXVContainer imp int key = childLisener.getHostView().hashCode(); if(appear){ if(!component
incubator-weex git commit: [WEEX-124][android]fix android bug
Repository: incubator-weex Updated Branches: refs/heads/master 99131e9cc -> 8a479c681 [WEEX-124][android]fix android bug Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8a479c68 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8a479c68 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8a479c68 Branch: refs/heads/master Commit: 8a479c68157b5bc608c6b49f0e1f75d4e7586187 Parents: 99131e9 Author: jianbai.gbj <jianbai@alibaba-inc.com> Authored: Fri Nov 17 14:37:27 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 18:20:26 2017 +0800 -- .../com/taobao/weex/dom/action/AbstractLayoutFinishAction.java| 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8a479c68/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractLayoutFinishAction.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractLayoutFinishAction.java b/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractLayoutFinishAction.java index a16f27a..d3a7b70 100644 --- a/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractLayoutFinishAction.java +++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractLayoutFinishAction.java @@ -41,6 +41,9 @@ abstract class AbstractLayoutFinishAction extends TraceableAction implements DOM } WXDomObject root = context.getDomByRef(WXDomObject.ROOT); +if(root == null){ + return; +} mLayoutHeight = (int)root.getLayoutHeight(); mLayoutWidth = (int)root.getLayoutWidth(); context.postRenderTask(this);
incubator-weex git commit: * [android] fix page oin slider can not receive the lifecycle callbacks
Repository: incubator-weex Updated Branches: refs/heads/v0.17 b0704cd11 -> 99131e9cc * [android] fix page oin slider can not receive the lifecycle callbacks Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/99131e9c Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/99131e9c Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/99131e9c Branch: refs/heads/v0.17 Commit: 99131e9cc12af878d424badc0b278c41706cb9a1 Parents: b0704cd Author: misakuoAuthored: Mon Nov 20 14:56:32 2017 +0800 Committer: misakuo Committed: Mon Nov 20 14:56:32 2017 +0800 -- .../sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/99131e9c/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java index ec2d73f..fb1f487 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java @@ -220,6 +220,7 @@ public class WXSlider extends WXVContainer { @Override public void onActivityResume() { +super.onActivityResume(); if (mViewPager != null && mViewPager.isAutoScroll()) { mViewPager.startAutoScroll(); } @@ -227,6 +228,7 @@ public class WXSlider extends WXVContainer { @Override public void onActivityStop() { +super.onActivityStop(); if (mViewPager != null) { mViewPager.pauseAutoScroll(); }
incubator-weex git commit: * [android] fix page oin slider can not receive the lifecycle callbacks
Repository: incubator-weex Updated Branches: refs/heads/master b0704cd11 -> 99131e9cc * [android] fix page oin slider can not receive the lifecycle callbacks Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/99131e9c Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/99131e9c Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/99131e9c Branch: refs/heads/master Commit: 99131e9cc12af878d424badc0b278c41706cb9a1 Parents: b0704cd Author: misakuoAuthored: Mon Nov 20 14:56:32 2017 +0800 Committer: misakuo Committed: Mon Nov 20 14:56:32 2017 +0800 -- .../sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/99131e9c/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java index ec2d73f..fb1f487 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java @@ -220,6 +220,7 @@ public class WXSlider extends WXVContainer { @Override public void onActivityResume() { +super.onActivityResume(); if (mViewPager != null && mViewPager.isAutoScroll()) { mViewPager.startAutoScroll(); } @@ -227,6 +228,7 @@ public class WXSlider extends WXVContainer { @Override public void onActivityStop() { +super.onActivityStop(); if (mViewPager != null) { mViewPager.pauseAutoScroll(); }
[1/2] incubator-weex git commit: [WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit
Repository: incubator-weex Updated Branches: refs/heads/v0.17 28d047512 -> b0704cd11 [WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/713c6193 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/713c6193 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/713c6193 Branch: refs/heads/v0.17 Commit: 713c6193a0a72beddf1800444dfa4c95d4c2dfdd Parents: d1af84c Author: yuhun-alibabaAuthored: Fri Nov 17 00:16:02 2017 +0800 Committer: yuhun-alibaba Committed: Mon Nov 20 10:21:46 2017 +0800 -- .../com/taobao/weex/bridge/WXBridgeManager.java | 34 1 file changed, 21 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/713c6193/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index b6db683..52187ee 100644 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -137,9 +137,14 @@ public class WXBridgeManager implements Callback, BactchExecutor { private static final int CRASHREINIT = 50; static volatile WXBridgeManager mBridgeManager; private static long LOW_MEM_VALUE = 120; - private static int reInitCount = 1; + private volatile static int reInitCount = 1; private static String crashUrl = null; private static long lastCrashTime = 0; + + /** + * Whether JS Framework(main.js) has been initialized. + */ + private volatile static boolean mInit = false; /** * package **/ @@ -156,10 +161,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { private IWXDebugProxy mWxDebugProxy; private boolean mMock = false; - /** - * Whether JS Framework(main.js) has been initialized. - */ - private boolean mInit = false; + private List
[2/2] incubator-weex git commit: [WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit
[WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b0704cd1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b0704cd1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b0704cd1 Branch: refs/heads/v0.17 Commit: b0704cd110accf8ccd3802445a0898a87e84f1a1 Parents: 28d0475 713c619 Author: gurisxie <279483...@qq.com> Authored: Mon Nov 20 10:44:20 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 10:45:15 2017 +0800 -- .../com/taobao/weex/bridge/WXBridgeManager.java | 34 1 file changed, 21 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b0704cd1/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java --
[1/2] incubator-weex git commit: [WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit
Repository: incubator-weex Updated Branches: refs/heads/master 28d047512 -> b0704cd11 [WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/713c6193 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/713c6193 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/713c6193 Branch: refs/heads/master Commit: 713c6193a0a72beddf1800444dfa4c95d4c2dfdd Parents: d1af84c Author: yuhun-alibabaAuthored: Fri Nov 17 00:16:02 2017 +0800 Committer: yuhun-alibaba Committed: Mon Nov 20 10:21:46 2017 +0800 -- .../com/taobao/weex/bridge/WXBridgeManager.java | 34 1 file changed, 21 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/713c6193/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index b6db683..52187ee 100644 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -137,9 +137,14 @@ public class WXBridgeManager implements Callback, BactchExecutor { private static final int CRASHREINIT = 50; static volatile WXBridgeManager mBridgeManager; private static long LOW_MEM_VALUE = 120; - private static int reInitCount = 1; + private volatile static int reInitCount = 1; private static String crashUrl = null; private static long lastCrashTime = 0; + + /** + * Whether JS Framework(main.js) has been initialized. + */ + private volatile static boolean mInit = false; /** * package **/ @@ -156,10 +161,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { private IWXDebugProxy mWxDebugProxy; private boolean mMock = false; - /** - * Whether JS Framework(main.js) has been initialized. - */ - private boolean mInit = false; + private List > mRegisterComponentFailList = new ArrayList<>(8); private List > mRegisterModuleFailList = new ArrayList<>(8); private List mRegisterServiceFailList = new ArrayList<>(8); @@ -185,8 +187,14 @@ public class WXBridgeManager implements Callback, BactchExecutor { return mBridgeManager; } + // setJSFrameworkInit and isJSFrameworkInit may use on diff thread + // use volatile private boolean isJSFrameworkInit() { -return mInit; + return mInit; + } + + private void setJSFrameworkInit(boolean init) { + mInit = init; } private void initWXBridge(boolean remoteDebug) { @@ -269,7 +277,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { * Model switch. For now, debug model and release model are supported */ public void restart() { -mInit = false; +setJSFrameworkInit(false); initWXBridge(WXEnvironment.sRemoteDebugMode); } @@ -949,7 +957,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { } reInitCount++; // reinit frame work - mInit = false; + setJSFrameworkInit(false); initScriptsFramework(""); if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) { @@ -1387,8 +1395,8 @@ public class WXBridgeManager implements Callback, BactchExecutor { final long totalTime = System.currentTimeMillis() - start; WXSDKManager.getInstance().postOnUiThread(new Runnable() { - @Override - public void run() { +@Override +public void run() { instance.createInstanceFinished(totalTime); } }, 0); @@ -1560,7 +1568,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { framework = WXFileUtils.loadAsset("main.js", WXEnvironment.getApplication()); } if (TextUtils.isEmpty(framework)) { -mInit = false; +setJSFrameworkInit(false); commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_FRAMEWORK, "JS Framework is empty!"); return; } @@ -1591,7 +1599,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { WXLogUtils.renderPerformanceLog("initFramework", WXEnvironment.sJSLibInitTime); WXEnvironment.sSDKInitTime = System.currentTimeMillis() - WXEnvironment.sSDKInitStart; WXLogUtils.renderPerformanceLog("SDKInitTime", WXEnvironment.sSDKInitTime); - mInit = true; +
[2/2] incubator-weex git commit: [WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit
[WEEX-134][android] createInstance and initFramework may on different Thread, add volatile static for mInit Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b0704cd1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b0704cd1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b0704cd1 Branch: refs/heads/master Commit: b0704cd110accf8ccd3802445a0898a87e84f1a1 Parents: 28d0475 713c619 Author: gurisxie <279483...@qq.com> Authored: Mon Nov 20 10:44:20 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Nov 20 10:45:15 2017 +0800 -- .../com/taobao/weex/bridge/WXBridgeManager.java | 34 1 file changed, 21 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b0704cd1/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java --
[incubator-weex] Git Push Summary
Repository: incubator-weex Updated Branches: refs/heads/v0.17 [created] 28d047512
incubator-weex git commit: * [ios] update compare png for border
Repository: incubator-weex Updated Branches: refs/heads/master 672f92a5f -> 28d047512 * [ios] update compare png for border Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/28d04751 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/28d04751 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/28d04751 Branch: refs/heads/master Commit: 28d0475127e1b8185572e5f9afc1207d73a311e2 Parents: 672f92a Author: gurisxie <279483...@qq.com> Authored: Fri Nov 17 14:16:52 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Fri Nov 17 14:16:52 2017 +0800 -- test/screenshot/image-resize-ios.png | Bin 138103 -> 145574 bytes 1 file changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28d04751/test/screenshot/image-resize-ios.png -- diff --git a/test/screenshot/image-resize-ios.png b/test/screenshot/image-resize-ios.png old mode 100755 new mode 100644 index 1a80944..95347f4 Binary files a/test/screenshot/image-resize-ios.png and b/test/screenshot/image-resize-ios.png differ
[GitHub] incubator-weex issue #882: [WEEX-127][android]Use HashSet Instead of array, ...
Github user gurisxie commented on the issue: https://github.com/apache/incubator-weex/pull/882 has merged. ---
incubator-weex git commit: [WEEX-127][android]Use HashSet Instead of array, because some app not contains arrayset
Repository: incubator-weex Updated Branches: refs/heads/master f4b819ac3 -> 672f92a5f [WEEX-127][android]Use HashSet Instead of array, because some app not contains arrayset Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/672f92a5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/672f92a5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/672f92a5 Branch: refs/heads/master Commit: 672f92a5f1434a0d9e0430e8c5da5cd8840b75d1 Parents: f4b819a Author: jianbai.gbj <jianbai@alibaba-inc.com> Authored: Fri Nov 17 10:05:44 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Fri Nov 17 10:49:13 2017 +0800 -- .../main/java/com/taobao/weex/dom/transition/WXTransition.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/672f92a5/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java b/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java index 535ef74..41fcd12 100644 --- a/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java +++ b/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java @@ -27,7 +27,6 @@ import android.animation.ValueAnimator; import android.graphics.drawable.ColorDrawable; import android.os.Handler; import android.support.v4.util.ArrayMap; -import android.support.v4.util.ArraySet; import android.support.v4.view.animation.PathInterpolatorCompat; import android.text.TextUtils; import android.util.Property; @@ -51,6 +50,7 @@ import com.taobao.weex.utils.WXUtils; import com.taobao.weex.utils.WXViewUtils; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -84,7 +84,7 @@ public class WXTransition { /** * layout animation property * */ -private static final Set LAYOUT_PROPERTIES = new ArraySet<>(); +private static final Set LAYOUT_PROPERTIES = new HashSet<>(); static { LAYOUT_PROPERTIES.add(Constants.Name.WIDTH); LAYOUT_PROPERTIES.add(Constants.Name.HEIGHT); @@ -97,7 +97,7 @@ public class WXTransition { /** * transform animation property, use android system animaton ability * */ -private static final Set TRANSFORM_PROPERTIES = new ArraySet<>(); +private static final Set TRANSFORM_PROPERTIES = new HashSet<>(); static { TRANSFORM_PROPERTIES.add(Constants.Name.OPACITY); TRANSFORM_PROPERTIES.add(Constants.Name.BACKGROUND_COLOR);
incubator-weex git commit: * [ios] update compare png for compositing
Repository: incubator-weex Updated Branches: refs/heads/master 4e534a491 -> f4b819ac3 * [ios] update compare png for compositing Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f4b819ac Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f4b819ac Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f4b819ac Branch: refs/heads/master Commit: f4b819ac30bd059a1349966f5525c5655e94bb73 Parents: 4e534a4 Author: gurisxie <279483...@qq.com> Authored: Fri Nov 17 10:39:30 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Fri Nov 17 10:39:30 2017 +0800 -- test/screenshot/compositing-ios.png | Bin 229534 -> 236255 bytes 1 file changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4b819ac/test/screenshot/compositing-ios.png -- diff --git a/test/screenshot/compositing-ios.png b/test/screenshot/compositing-ios.png old mode 100755 new mode 100644 index 1c6276b..0fbc6f6 Binary files a/test/screenshot/compositing-ios.png and b/test/screenshot/compositing-ios.png differ
incubator-weex git commit: [WEEX-124][iOS] bugfix transform crash about unknow selector
Repository: incubator-weex Updated Branches: refs/heads/master 39f539ab6 -> 728f38bcf [WEEX-124][iOS] bugfix transform crash about unknow selector Bug:124 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/728f38bc Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/728f38bc Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/728f38bc Branch: refs/heads/master Commit: 728f38bcf61bfa56cc85c47b174bad3041d53d41 Parents: 39f539a Author: acton393Authored: Fri Nov 17 00:09:46 2017 +0800 Committer: acton393 Committed: Fri Nov 17 00:09:46 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/728f38bc/ios/sdk/WeexSDK/Sources/Component/WXTransform.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m index f81af72..bc3ce8e 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXTransform.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXTransform.m @@ -348,14 +348,16 @@ - (void)parseTranslate:(NSArray *)value { [self parseTranslatex:value[0]]; -[self parseTranslatey:value[1]]; +if ([value count] > 1) { +[self parseTranslatey:value[1]]; +} } -- (void)parseTranslatex:(NSArray *)value +- (void)parseTranslatex:(id)value { WXLength *translateX; -double x = [value[0] doubleValue]; -if ([value[0] hasSuffix:@"%"]) { +double x = [value doubleValue]; +if ([value hasSuffix:@"%"]) { translateX = [WXLength lengthWithFloat:x type:WXLengthTypePercent]; } else { x = WXPixelScale(x, self.weexInstance.pixelScaleFactor); @@ -364,11 +366,11 @@ _translateX = translateX; } -- (void)parseTranslatey:(NSArray *)value +- (void)parseTranslatey:(id)value { WXLength *translateY; -double y = [value[0] doubleValue]; -if ([value[0] hasSuffix:@"%"]) { +double y = [value doubleValue]; +if ([value hasSuffix:@"%"]) { translateY = [WXLength lengthWithFloat:y type:WXLengthTypePercent]; } else { y = WXPixelScale(y, self.weexInstance.pixelScaleFactor);
[1/3] incubator-weex git commit: [WEEX-102][iOS]bugfix appear event will fire wrongly while the view has not been loaded
Repository: incubator-weex Updated Branches: refs/heads/master 75d5cd6ba -> 39f539ab6 [WEEX-102][iOS]bugfix appear event will fire wrongly while the view has not been loaded if the view has not been loaded or has not been added to its scroller view, it should not be notified appear event, because it cannot scroll to appear area as the scrollview scroll. Bug:102 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f77f9cc3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f77f9cc3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f77f9cc3 Branch: refs/heads/master Commit: f77f9cc35adc53c527853f898589fe6418ed4781 Parents: 6617a0d Author: acton393Authored: Thu Nov 16 15:33:17 2017 +0800 Committer: acton393 Committed: Thu Nov 16 15:33:17 2017 +0800 -- .../Sources/Component/WXScrollerComponent.m | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f77f9cc3/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m index 99ae5b3..9995e89 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m @@ -26,6 +26,8 @@ #import "WXUtility.h" #import "WXLoadingComponent.h" #import "WXRefreshComponent.h" +#import "WXConfigCenterProtocol.h" +#import "WXSDKEngine.h" @interface WXScrollerComponnetView:UIScrollView @end @@ -78,6 +80,8 @@ NSString *_direction; BOOL _showScrollBar; BOOL _pagingEnabled; + +BOOL _shouldNotifiAppearDescendantView; css_node_t *_scrollerCSSNode; @@ -142,6 +146,12 @@ WX_EXPORT_METHOD(@selector(resetLoadmore)) self.cssNode->style.flex <= 0.0) { self.cssNode->style.flex = 1.0; } +id configCenter = [WXSDKEngine handlerForProtocol:@protocol(WXConfigCenterProtocol)]; +if ([configCenter respondsToSelector:@selector(configForKey:defaultValue:isDefault:)]) { +BOOL shouldNotifiAppearDescendantView = [[configCenter configForKey:@"iOS_weex_ext_config.shouldNotifiAppearDescendantView" defaultValue:@(YES) isDefault:NULL] boolValue]; +_shouldNotifiAppearDescendantView = shouldNotifiAppearDescendantView; + +} } return self; @@ -604,7 +614,14 @@ WX_EXPORT_METHOD(@selector(resetLoadmore)) // notify action for appear NSArray *listenerArrayCopy = [self.listenerArray copy]; for(WXScrollToTarget *target in listenerArrayCopy){ -[self scrollToTarget:target scrollRect:scrollRect]; +if (_shouldNotifiAppearDescendantView) { +// if target component is descendant of scrollerview, it should notify the appear event handler, or here will skip this appear calculation. +if ([target.target isViewLoaded] && [target.target.view isDescendantOfView:self.view]) { +[self scrollToTarget:target scrollRect:scrollRect]; +} +} else { +[self scrollToTarget:target scrollRect:scrollRect]; +} } }
[2/3] incubator-weex git commit: [WEEX-102][iOS] bug-fix default config center return value
[WEEX-102][iOS] bug-fix default config center return value if config center can not find any config key value , it should return default value but just nil value. Bug: 102 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/539c71a1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/539c71a1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/539c71a1 Branch: refs/heads/master Commit: 539c71a13fce45dee933b8cc73beb5265ad33727 Parents: f77f9cc Author: acton393Authored: Thu Nov 16 15:37:07 2017 +0800 Committer: acton393 Committed: Thu Nov 16 15:37:07 2017 +0800 -- ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/539c71a1/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m -- diff --git a/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m b/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m index ffb8f69..d127edb 100644 --- a/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m +++ b/ios/playground/WeexDemo/WXConfigCenterDefaultImpl.m @@ -39,7 +39,7 @@ if ([keys[0] isEqualToString:@"iOS_weex_prerender_config"] && [keys[1] isEqualToString:@"max_cache_num"]){ return @2; } -return nil; +return defaultValue; } @end
[3/3] incubator-weex git commit: [WEEX-102][iOS]bugfix appear event will fire wrongly while the view has not been loaded
[WEEX-102][iOS]bugfix appear event will fire wrongly while the view has not been loaded Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/39f539ab Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/39f539ab Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/39f539ab Branch: refs/heads/master Commit: 39f539ab6a75ae464e9463868cf4a276bd26f711 Parents: 75d5cd6 539c71a Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 22:55:05 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 22:55:21 2017 +0800 -- .../WeexDemo/WXConfigCenterDefaultImpl.m | 2 +- .../Sources/Component/WXScrollerComponent.m | 19 ++- 2 files changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/39f539ab/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m --
incubator-weex git commit: * [ios] update pod version
Repository: incubator-weex Updated Branches: refs/heads/master ce7c929d4 -> 75d5cd6ba * [ios] update pod version Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/75d5cd6b Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/75d5cd6b Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/75d5cd6b Branch: refs/heads/master Commit: 75d5cd6ba26faa0e964bc0e3d7ffab2b8c035d63 Parents: ce7c929 Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 22:53:21 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 22:53:21 2017 +0800 -- WeexSDK.podspec| 2 +- ios/sdk/WeexSDK/Sources/Utility/WXDefine.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/75d5cd6b/WeexSDK.podspec -- diff --git a/WeexSDK.podspec b/WeexSDK.podspec index 47f2085..73c8a46 100644 --- a/WeexSDK.podspec +++ b/WeexSDK.podspec @@ -3,7 +3,7 @@ Pod::Spec.new do |s| s.name = "WeexSDK" - s.version = "0.16.1" + s.version = "0.17.0" s.summary = "WeexSDK Source ." http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/75d5cd6b/ios/sdk/WeexSDK/Sources/Utility/WXDefine.h -- diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXDefine.h b/ios/sdk/WeexSDK/Sources/Utility/WXDefine.h index 48fe117..64e850b 100644 --- a/ios/sdk/WeexSDK/Sources/Utility/WXDefine.h +++ b/ios/sdk/WeexSDK/Sources/Utility/WXDefine.h @@ -20,7 +20,7 @@ #ifndef __WX_DEFINE_H__ #define __WX_DEFINE_H__ -#define WX_SDK_VERSION @"0.16.1" +#define WX_SDK_VERSION @"0.17.0" #if defined(__cplusplus) #define WX_EXTERN extern "C" __attribute__((visibility("default")))
[1/2] incubator-weex git commit: [WEEX-121][iOS] bug-fix draw text crash
Repository: incubator-weex Updated Branches: refs/heads/master af911f780 -> ce7c929d4 [WEEX-121][iOS] bug-fix draw text crash there are case when text update frequently, so when main thread drawing text, here updates come, so the text value must protect here from be setting in multithread, here use lock temporarily. Bug:121 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/76dd76d0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/76dd76d0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/76dd76d0 Branch: refs/heads/master Commit: 76dd76d06e0813b192a4c82ca17617601fe4760c Parents: 6617a0d Author: acton393Authored: Thu Nov 16 12:09:59 2017 +0800 Committer: acton393 Committed: Thu Nov 16 12:09:59 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/76dd76d0/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m index 8b292d4..2fbd925 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m @@ -249,8 +249,8 @@ do {\ - (void)fillAttributes:(NSDictionary *)attributes { id text = attributes[@"value"]; -if (text) { -_text = [WXConvert NSString:text]; +if (text && ![[self text] isEqualToString:text]) { +[self setText:[WXConvert NSString:text]]; [self setNeedsRepaint]; [self setNeedsLayout]; } @@ -361,6 +361,12 @@ do {\ { return _text; } +- (void)setText:(NSString*)text +{ +pthread_mutex_lock(&(_ctAttributedStringMutex)); +_text = text; +pthread_mutex_unlock(&(_ctAttributedStringMutex)); +} - (NSAttributedString *)ctAttributedString {
[2/2] incubator-weex git commit: [WEEX-121][iOS] bug-fix draw text crash
[WEEX-121][iOS] bug-fix draw text crash Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ce7c929d Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ce7c929d Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ce7c929d Branch: refs/heads/master Commit: ce7c929d4682e66c362f5032ade1afc7d8f51de1 Parents: af911f7 76dd76d Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 22:35:55 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 22:36:09 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) --
[1/2] incubator-weex git commit: [WEEX-122][iOS]bugfix round float pixel lead to the lack of pixel
Repository: incubator-weex Updated Branches: refs/heads/master ade8400f8 -> af911f780 [WEEX-122][iOS]bugfix round float pixel lead to the lack of pixel this action will let iOS decide whether it should draw float pixel. Bug:122 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/c774c4df Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/c774c4df Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/c774c4df Branch: refs/heads/master Commit: c774c4dff285ca45c7bb865b50b718d4d3536023 Parents: 78f2312 Author: acton393Authored: Wed Nov 15 22:40:48 2017 +0800 Committer: acton393 Committed: Wed Nov 15 22:40:48 2017 +0800 -- ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 5 ios/sdk/WeexSDK/Sources/Utility/WXUtility.h | 3 +++ ios/sdk/WeexSDK/Sources/Utility/WXUtility.m | 31 +- 3 files changed, 33 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c774c4df/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m -- diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m index 8fc2511..3350f12 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m @@ -224,6 +224,11 @@ typedef enum : NSUInteger { if ([configCenter respondsToSelector:@selector(configForKey:defaultValue:isDefault:)]) { BOOL useCoreText = [[configCenter configForKey:@"iOS_weex_ext_config.text_render_useCoreText" defaultValue:@YES isDefault:NULL] boolValue]; [WXTextComponent setRenderUsingCoreText:useCoreText]; + +//handler pixel round +BOOL shouldRoudPixel = [[configCenter configForKey:@"iOS_weex_ext_config.utilityShouldRoundPixel" defaultValue:@(NO) isDefault:NULL] boolValue]; +[WXUtility setShouldRoudPixel:shouldRoudPixel]; + id sliderConfig = [configCenter configForKey:@"iOS_weex_ext_config.slider_class_name" defaultValue:@"WXCycleSliderComponent" isDefault:NULL]; if(sliderConfig){ NSString *sliderClassName = [WXConvert NSString:sliderConfig]; http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c774c4df/ios/sdk/WeexSDK/Sources/Utility/WXUtility.h -- diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.h b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.h index dfbc303..fac6a9c 100644 --- a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.h +++ b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.h @@ -460,4 +460,7 @@ BOOL WXFloatGreaterThanWithPrecision(CGFloat a,CGFloat b,double precision); */ + (NSData *_Nonnull)base64DictToData:(NSDictionary *_Nullable)base64Dict; + ++ (void)setShouldRoudPixel:(BOOL)shouldRoundPixel; + @end http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c774c4df/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m -- diff --git a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m index 621cf68..f96a68e 100644 --- a/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m +++ b/ios/sdk/WeexSDK/Sources/Utility/WXUtility.m @@ -41,6 +41,8 @@ #define KEY_PASSWORD @"com.taobao.Weex.123456" #define KEY_USERNAME_PASSWORD @"com.taobao.Weex.weex123456" +static BOOL utilityShouldRoundPixel = NO; + void WXPerformBlockOnMainThread(void (^ _Nonnull block)()) { if (!block) return; @@ -117,20 +119,29 @@ CGFloat WXPixelScale(CGFloat value, CGFloat scaleFactor) CGFloat WXRoundPixelValue(CGFloat value) { -CGFloat scale = WXScreenScale(); -return round(value * scale) / scale; +if (utilityShouldRoundPixel) { +CGFloat scale = WXScreenScale(); +return round(value * scale) / scale; +} +return value; } CGFloat WXCeilPixelValue(CGFloat value) { -CGFloat scale = WXScreenScale(); -return ceil(value * scale) / scale; +if (utilityShouldRoundPixel) { +CGFloat scale = WXScreenScale(); +return ceil(value * scale) / scale; +} +return value; } CGFloat WXFloorPixelValue(CGFloat value) { -CGFloat scale = WXScreenScale(); -return floor(value * scale) / scale; +if (utilityShouldRoundPixel) { +CGFloat scale = WXScreenScale(); +return floor(value * scale) / scale; +} +return value; } @implementation WXUtility @@ -154,6 +165,14 @@ CGFloat WXFloorPixelValue(CGFloat value) block(); } ++ (void)setShouldRoudPixel:(BOOL)shouldRoundPixel +{ +utilityShouldRoundPixel = shouldRoundPixel; +} ++ (BOOL)shouldRoudPixel +{ +
[3/4] incubator-weex git commit: [WEEX-101][iOS] specify voice-over navigation order is column or vertical
[WEEX-101][iOS] specify voice-over navigation order is column or vertical Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/224cdb82 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/224cdb82 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/224cdb82 Branch: refs/heads/master Commit: 224cdb82c63f68990439d64a1c272622e5070bf6 Parents: 05a32d8 7f49963 Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 22:22:26 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 22:22:56 2017 +0800 -- .../WeexSDK/Sources/Component/WXComponent_internal.h| 1 + ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 12 2 files changed, 13 insertions(+) --
[1/4] incubator-weex git commit: [WEEX-120][iOS]try to optimize unload weex component
Repository: incubator-weex Updated Branches: refs/heads/master 05a32d881 -> ade8400f8 [WEEX-120][iOS]try to optimize unload weex component try to reduce context switch when unload component. Bug:120 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/90f535d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/90f535d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/90f535d8 Branch: refs/heads/master Commit: 90f535d86e1a234383fac202a4cd92d5aba2e9f7 Parents: 4269d24 Author: acton393Authored: Wed Nov 15 17:08:20 2017 +0800 Committer: acton393 Committed: Wed Nov 15 17:08:20 2017 +0800 -- .../Sources/Manager/WXComponentManager.m| 24 1 file changed, 9 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/90f535d8/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m -- diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m index 691f713..4f6c06c 100644 --- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m +++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m @@ -711,25 +711,19 @@ static css_node_t * rootNodeGetChild(void *context, int i) - (void)unload { WXAssertComponentThread(); - -NSEnumerator *enumerator = [_indexDict objectEnumerator]; -WXComponent *component; -while ((component = [enumerator nextObject])) { -dispatch_async(dispatch_get_main_queue(), ^{ +[self invalidate]; +[self _stopDisplayLink]; +NSEnumerator *enumerator = [[_indexDict copy] objectEnumerator]; +dispatch_async(dispatch_get_main_queue(), ^{ +WXComponent *component; +while ((component = [enumerator nextObject])) { [component _unloadViewWithReusing:NO]; -}); -} +} +_rootComponent = nil; +}); [_indexDict removeAllObjects]; [_uiTaskQueue removeAllObjects]; - -dispatch_async(dispatch_get_main_queue(), ^{ - _rootComponent = nil; -}); - -[self _stopDisplayLink]; - -_isValid = NO; } - (void)invalidate
[2/4] incubator-weex git commit: [WEEX-101][iOS] specify voice-over navigation order is column or vertical
[WEEX-101][iOS] specify voice-over navigation order is column or vertical Consider an app that shows items in vertical columns. Normally, voiceOver would navigate through these items in horizontal rows. Setting the value of this property to YES on the parent element of the items in the vertical columns causes VoiceOver to respect the appâs grouping and navigate them.And the default of this property is NO. Bug:101 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7f49963f Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7f49963f Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7f49963f Branch: refs/heads/master Commit: 7f49963f80b63ce0ee2aff78c76e4bd20611b43f Parents: 78f2312 Author: acton393Authored: Wed Nov 15 20:56:47 2017 +0800 Committer: acton393 Committed: Wed Nov 15 20:56:47 2017 +0800 -- .../WeexSDK/Sources/Component/WXComponent_internal.h| 1 + ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 12 2 files changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7f49963f/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h b/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h index f1163a9..dc9772b 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h +++ b/ios/sdk/WeexSDK/Sources/Component/WXComponent_internal.h @@ -70,6 +70,7 @@ typedef id (^WXDataBindingBlock)(NSDictionary *data, BOOL *needUpdate); NSString * _ariaHidden; // accessibilityElementsHidden NSString * _accessible; // accessible NSString * _accessibilityHintContent; // hint for the action +NSString * _groupAccessibilityChildren; // voice-over navigation order NSString * _testId;// just for auto-test BOOL _accessibilityMagicTapEvent; http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7f49963f/ios/sdk/WeexSDK/Sources/Model/WXComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m index 7ad52f3..a924176 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m @@ -126,6 +126,9 @@ if(attributes[@"accessibilityHint"]) { _accessibilityHintContent = [WXConvert NSString:attributes[@"accessibilityHint"]]; } +if (attributes[@"groupAccessibilityChildren"]) { +_groupAccessibilityChildren = [WXConvert NSString:attributes[@"groupAccessibilityChildren"]]; +} if (attributes[@"testId"]) { _testId = [WXConvert NSString:attributes[@"testId"]]; @@ -366,6 +369,9 @@ if (_ariaHidden) { [_view setAccessibilityElementsHidden:[WXConvert BOOL:_ariaHidden]]; } +if (_groupAccessibilityChildren) { +[_view setShouldGroupAccessibilityChildren:[WXConvert BOOL:_groupAccessibilityChildren]]; +} [self _initEvents:self.events]; [self _initPseudoEvents:_isListenPseudoTouch]; @@ -736,6 +742,12 @@ [self.view setAccessibilityHint:_accessibilityHintContent]; } +if (attributes[@"groupAccessibilityChildren"]) { +_groupAccessibilityChildren = [WXConvert NSString:attributes[@"groupAccessibilityChildren"]]; +[self.view setShouldGroupAccessibilityChildren:[WXConvert BOOL:_groupAccessibilityChildren]]; +} + + if (attributes[@"testId"]) { [self.view setAccessibilityIdentifier:[WXConvert NSString:attributes[@"testId"]]]; }
[4/4] incubator-weex git commit: [WEEX-120][iOS]try to optimize unload weex component
[WEEX-120][iOS]try to optimize unload weex component Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ade8400f Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ade8400f Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ade8400f Branch: refs/heads/master Commit: ade8400f8028b59f54845882c77528dbd40dba40 Parents: 224cdb8 90f535d Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 22:23:40 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 22:24:03 2017 +0800 -- .../Sources/Manager/WXComponentManager.m| 24 1 file changed, 9 insertions(+), 15 deletions(-) --
[2/2] incubator-weex git commit: [WEEX-119][iOS] disable tableview estimation row or section height.
[WEEX-119][iOS] disable tableview estimation row or section height. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/05a32d88 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/05a32d88 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/05a32d88 Branch: refs/heads/master Commit: 05a32d8811671a2994d7f7734145d8baff43261a Parents: dd8b7e1 ada7945 Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 22:13:37 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 22:14:25 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/05a32d88/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m --
[1/2] incubator-weex git commit: [WEEX-119][iOS] disable tableview estimation row or section height.
Repository: incubator-weex Updated Branches: refs/heads/master dd8b7e1a8 -> 05a32d881 [WEEX-119][iOS] disable tableview estimation row or section height. according to https://stackoverflow.com/questions/46445661/ios-11-uitableview-behaviour-changed/46447370#46447370 https://forums.developer.apple.com/message/245686 this estimation action will make tableview edit abnormal, crash sometimes so disable it from iOS 11. Bug: 119 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ada7945e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ada7945e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ada7945e Branch: refs/heads/master Commit: ada7945ec8b4c4e1b3c73ef47a41c1ef08d29c54 Parents: 4269d24 Author: acton393Authored: Wed Nov 15 16:22:01 2017 +0800 Committer: acton393 Committed: Wed Nov 15 16:22:01 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ada7945e/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m index 7c4fe68..1e3e5e5 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m @@ -155,6 +155,10 @@ _tableView.delegate = self; _tableView.dataSource = self; _tableView.userInteractionEnabled = YES; + +_tableView.estimatedRowHeight = 0; +_tableView.estimatedSectionFooterHeight = 0; +_tableView.estimatedSectionHeaderHeight = 0; } - (void)viewWillUnload
[2/2] incubator-weex git commit: [WEEX-105][iOS] bug-fix about setting nan frame crash
[WEEX-105][iOS] bug-fix about setting nan frame crash Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/dd8b7e1a Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/dd8b7e1a Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/dd8b7e1a Branch: refs/heads/master Commit: dd8b7e1a846915395de8de957a53ebf5a1d5d541 Parents: 9009671 784fd75 Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 22:10:53 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 22:10:59 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 6 ++ ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m | 8 2 files changed, 10 insertions(+), 4 deletions(-) --
[1/2] incubator-weex git commit: [WEEX-105][iOS] bug-fix about setting nan frame crash
Repository: incubator-weex Updated Branches: refs/heads/master 900967124 -> dd8b7e1a8 [WEEX-105][iOS] bug-fix about setting nan frame crash try to protect nan crash when set frame containing nan value. Last Exception Backtrace: 0 CoreFoundation 0x0001830301c0 __exceptionPreprocess :124 (in CoreFoundation) 1 libobjc.A.dylib 0x000181a6855c _objc_exception_throw :56 (in libobjc.A.dylib) 2 CoreFoundation 0x000183030108 +[NSException raise:format:] :116 (in CoreFoundation) 3 QuartzCore 0x000186335db8 CA::Layer::set_position(CA::Vec2 const&, bool) :152 (in QuartzCore) 4 QuartzCore 0x000186335f2c -[CALayer setPosition:] :40 (in QuartzCore) 5 QuartzCore 0x0001863364c4 -[CALayer setFrame:] :448 (in QuartzCore) 6 UIKit 0x000188e71e2c -[UIView(Geometry) setFrame:] :784 (in UIKit) 7 Taobao4iPhone 0x000102d6ad4c _43-[WXComponent(Layout) _frameDidCalculated:]_block_invoke WXComponent+Layout.m:136 Last Exception Backtrace 2: 0 CoreFoundation 0x000185b12fe0 __exceptionPreprocess :124 (in CoreFoundation) 1 libobjc.A.dylib 0x000184574538 _objc_exception_throw :56 (in libobjc.A.dylib) 2 CoreFoundation 0x000185b12f28 +[NSException raise:format:] :116 (in CoreFoundation) 3 QuartzCore 0x000188e29798 CA::Layer::set_bounds(CA::Rect const&, bool) :204 (in QuartzCore) 4 QuartzCore 0x000188e299e0 -[CALayer setBounds:] :100 (in QuartzCore) 5 UIKit 0x00018bc908c8 -[UIView(Geometry) setBounds:] :404 (in UIKit) 6 UIKit 0x00018bc9eacc -[UIScrollView setBounds:] :988 (in UIKit) 7 UIKit 0x00018bd271c8 -[UITableView setBounds:] :224 (in UIKit) 8 UIKit 0x00018bc62828 -[UIScrollView setContentOffset:] :400 (in UIKit) 9 UIKit 0x00018bd191dc -[UITableView setContentOffset:] :272 (in UIKit) 10 Taobao4iPhone 0x000102d7b6e8 -[WXTableView setContentOffset:] WXListComponent.m:63 (in Taobao4iPhone) 11 UIKit 0x00018bde6d08 -[UIScrollView _updatePanGesture] :1988 (in UIKit) 12 UIKit 0x00018c2168d0 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] :64 (in UIKit) 13 UIKit 0x00018c21a104 _UIGestureRecognizerSendTargetActions :124 (in UIKit) 14 UIKit 0x00018bdd40b4 _UIGestureRecognizerSendActions :252 (in UIKit) Bug: 105 Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/784fd75d Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/784fd75d Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/784fd75d Branch: refs/heads/master Commit: 784fd75d324c2034a362a79251a87c295eb9fbea Parents: d731f4d Author: acton393Authored: Mon Nov 13 15:08:15 2017 +0800 Committer: acton393 Committed: Mon Nov 13 15:08:15 2017 +0800 -- ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 6 ++ ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m | 8 2 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/784fd75d/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m -- diff --git a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m index 7c4fe68..ddfaf6f 100644 --- a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m @@ -58,6 +58,12 @@ if (fabs(contentOffset.y) < 0.5) { contentOffset.y = 0; } +if (isnan(contentOffset.x)) { +contentOffset.x = 0; +} +if(isnan(contentOffset.y)) { +contentOffset.y = 0; +} [super setContentOffset:contentOffset]; } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/784fd75d/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m -- diff --git a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m index adf1652..44aef1c 100644 --- a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m +++ b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.m @@ -166,10 +166,10 @@ _cssNode->layout.should_update = false; _isLayoutDirty = NO; -CGRect
[GitHub] incubator-weex pull request #878: [WEEX-126][iOS] protect for pagename when ...
Github user gurisxie closed the pull request at: https://github.com/apache/incubator-weex/pull/878 ---
[GitHub] incubator-weex pull request #879: [WEEX-126][iOS] protect for pagename when ...
GitHub user gurisxie opened a pull request: https://github.com/apache/incubator-weex/pull/879 [WEEX-126][iOS] protect for pagename when need send jserror 1. compatible old logic; 2. use instance.pageName as default for front user. First of all, thank you for your contribution! Please makes sure that these checkboxes are checked before submitting your PR, thank you! CheckList: **if** *isBugFix* **:** * [ ] Make sure that you add at least one unit test for the bug which you had fixed. **elif** *isNewFeature* **:** * [ ] Update API docs for the component. * [ ] Update/Add demo to demonstrate new feature. * [ ] Update test scripts for the feature. * [ ] Add unit tests for the feature. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gurisxie/incubator-weex ios-bugfix-projectToPageName2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/879.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 #879 commit 900967124608822df69a7697b556a46a5496e90b Author: gurisxie <279483...@qq.com> Date: 2017-11-16T13:55:02Z [WEEX-126][iOS] protect for pagename when need send jserror 1. compatible old logic; 2. use instance.pageName as default for front user. ---
[GitHub] incubator-weex pull request #878: [WEEX-126][iOS] protect for pagename when ...
GitHub user gurisxie opened a pull request: https://github.com/apache/incubator-weex/pull/878 [WEEX-126][iOS] protect for pagename when need send jserror â¦pageName insteadï¼ 1. compatible old logic; 2. use instance.pageName as default for front user. First of all, thank you for your contribution! Please makes sure that these checkboxes are checked before submitting your PR, thank you! CheckList: **if** *isBugFix* **:** * [ ] Make sure that you add at least one unit test for the bug which you had fixed. **elif** *isNewFeature* **:** * [ ] Update API docs for the component. * [ ] Update/Add demo to demonstrate new feature. * [ ] Update test scripts for the feature. * [ ] Add unit tests for the feature. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gurisxie/incubator-weex ios-bugfix-protectToPageName1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/878.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 #878 commit cd38f3bb34d007218ae24629b833418dfc41903e Author: gurisxie <279483...@qq.com> Date: 2017-11-16T10:34:04Z [WEEX-126][iOS] scripturl will have no value in some way,we need use pageName insteadï¼ 1. compatible old logic; 2. use instance.pageName as default for front user. ---
[2/2] incubator-weex git commit: * [android] revert clip path targetview judge.
* [android] revert clip path targetview judge. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fb667372 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fb667372 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fb667372 Branch: refs/heads/master Commit: fb6673727774421e38aef9f2138b47a5583f Parents: 6561069 d1af84c Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 18:11:52 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 18:12:29 2017 +0800 -- .../java/com/taobao/weex/utils/WXViewUtils.java| 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) --
[1/2] incubator-weex git commit: [WEEX-107] [android] layer type none has some bug on some platform. force layer type soft for render text right
Repository: incubator-weex Updated Branches: refs/heads/master 6617a0dda -> 67ba6dacf [WEEX-107] [android] layer type none has some bug on some platform. force layer type soft for render text right Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8f4b7bf9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8f4b7bf9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8f4b7bf9 Branch: refs/heads/master Commit: 8f4b7bf9d2eb46115bcd9bcfb3efb9cb318229ce Parents: 3c3536a Author: jianbai.gbjAuthored: Thu Nov 16 15:44:50 2017 +0800 Committer: jianbai.gbj Committed: Thu Nov 16 15:44:50 2017 +0800 -- .../src/main/java/com/taobao/weex/dom/transition/WXTransition.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8f4b7bf9/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java b/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java index fc477bb..535ef74 100644 --- a/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java +++ b/android/sdk/src/main/java/com/taobao/weex/dom/transition/WXTransition.java @@ -315,6 +315,7 @@ public class WXTransition { switch (property){ case Constants.Name.OPACITY:{ holders.add(PropertyValuesHolder.ofFloat(View.ALPHA, taregtView.getAlpha(), WXUtils.getFloat(value, 1.0f))); +taregtView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); //hardware or none has bug on some platform } break; case Constants.Name.BACKGROUND_COLOR:{
[2/2] incubator-weex git commit: [WEEX-107] [android] layer type none has some bug on some platform.
[WEEX-107] [android] layer type none has some bug on some platform. Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/67ba6dac Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/67ba6dac Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/67ba6dac Branch: refs/heads/master Commit: 67ba6dacf9c4b9e4fb658e11e8d9065da5b31070 Parents: 8f4b7bf 6617a0d Author: jianbai.gbj <jianbai@alibaba-inc.com> Authored: Thu Nov 16 17:06:44 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 17:16:30 2017 +0800 -- android/playground/app/build.gradle | 1 - android/playground/app/proguard-rules.pro | 3 +- .../playground/app/src/main/AndroidManifest.xml | 23 - .../java/com/alibaba/weex/WXApplication.java| 2 - .../java/com/alibaba/weex/WXDebugActivity.java | 109 .../alibaba/weex/extend/PlayDebugAdapter.java | 154 -- .../zxing/client/android/CaptureActivity.java | 30 +- .../src/main/res/layout/activity_dynamic.xml| 45 -- .../app/src/main/res/layout/content_dynamic.xml | 42 -- .../main/java/com/taobao/weex/InitConfig.java | 13 - .../java/com/taobao/weex/WXEnvironment.java | 2 - .../main/java/com/taobao/weex/WXSDKEngine.java | 37 +- .../java/com/taobao/weex/WXSDKInstance.java | 23 +- .../main/java/com/taobao/weex/WXSDKManager.java | 7 - .../taobao/weex/adapter/IWXDebugAdapter.java| 41 -- .../weex/appfram/pickers/DatePickerImpl.java| 33 +- .../weex/appfram/pickers/WXPickersModule.java | 7 +- .../com/taobao/weex/bridge/WXBridgeManager.java | 4 +- .../java/com/taobao/weex/common/Constants.java | 6 + .../com/taobao/weex/common/WXPerformance.java | 32 +- .../com/taobao/weex/dom/WXTextDomObject.java| 17 +- .../taobao/weex/ui/component/WXComponent.java | 92 +++- .../taobao/weex/ui/component/WXScroller.java| 43 +- .../component/helper/ScrollStartEndHelper.java | 116 + .../ui/component/helper/WXTimeInputHelper.java | 6 +- .../ui/component/list/BasicListComponent.java | 35 +- .../weex/ui/component/list/WXListComponent.java | 10 +- .../list/template/WXRecyclerTemplateList.java | 44 +- .../pesudo/OnActivePseudoListener.java | 26 + .../component/pesudo/OnActivePseudoListner.java | 26 - .../pesudo/TouchActivePseudoListener.java | 12 +- .../taobao/weex/ui/module/WXLocalModule.java| 93 .../ui/view/refresh/core/WXSwipeLayout.java | 214 ++-- .../taobao/weex/utils/StaticLayoutProxy.java| 72 +++ .../java/com/taobao/weex/utils/WXLogUtils.java | 91 ++-- android/settings.gradle | 1 - android/weex_debug/.gitignore | 2 - android/weex_debug/NOTICE | 7 - android/weex_debug/build.gradle | 39 -- android/weex_debug/libs/classes.jar | Bin 112153 -> 0 bytes android/weex_debug/proguard-rules.pro | 17 - .../java/com/taobao/weex/ApplicationTest.java | 32 -- android/weex_debug/src/main/AndroidManifest.xml | 52 -- .../main/java/com/taobao/weex/WXDebugTool.java | 70 --- .../java/com/taobao/weex/WXPFComponent.java | 82 --- .../main/java/com/taobao/weex/WXPrettyFish.java | 50 -- .../taobao/weex/adapter/DefautDebugAdapter.java | 127 - .../taobao/weex/bridge/WXWebsocketBridge.java | 295 --- .../taobao/weex/scalpel/ScalpelFrameLayout.java | 519 --- .../weex/websocket/WXWebSocketManager.java | 226 .../main/res/drawable-xhdpi/ic_action_3d.png| Bin 3429 -> 0 bytes .../main/res/drawable-xhdpi/ic_action_weex.png | Bin 7284 -> 0 bytes .../res/drawable-xhdpi/prettyfish_boundary.png | Bin 5731 -> 0 bytes .../res/drawable-xhdpi/prettyfish_coord.png | Bin 6396 -> 0 bytes .../main/res/drawable-xhdpi/prettyfish_cpu.png | Bin 7505 -> 0 bytes .../main/res/drawable-xhdpi/prettyfish_fps.png | Bin 21422 -> 0 bytes .../main/res/drawable-xhdpi/prettyfish_grid.png | Bin 5494 -> 0 bytes .../res/drawable-xhdpi/prettyfish_icon_back.png | Bin 732 -> 0 bytes .../drawable-xhdpi/prettyfish_icon_close.png| Bin 347 -> 0 bytes .../prettyfish_icon_deletefile.png | Bin 247 -> 0 bytes .../res/drawable-xhdpi/prettyfish_icon_fab.png | Bin 1667 -> 0 bytes .../res/drawable-xhdpi/prettyfish_icon_perf.png | Bin 6152 -> 0 bytes .../res/drawable-xhdpi/prettyfish_icon_sp.png | Bin 9689 -> 0 bytes .../drawable-xhdpi/prettyfish_icon_tools.png| Bin 6874 -> 0 bytes .../res/drawable-xhdpi/prettyfish_icon_ued.png | Bin 7029 -> 0 bytes .../res/drawable-xhdpi/prettyfish_memory.png| Bin 5910 -> 0 bytes .../res/drawable-xhdpi/prettyfish_traffic.png | Bin 6083 -> 0 bytes .../drawable/leak_canary_toast_background.xml | 23 -
incubator-weex git commit: * [test] update image compare border
Repository: incubator-weex Updated Branches: refs/heads/master 2f5816be4 -> 6617a0dda * [test] update image compare border Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/6617a0dd Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/6617a0dd Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/6617a0dd Branch: refs/heads/master Commit: 6617a0dda0c9822f76c75a3d3929597bc6f18273 Parents: 2f5816b Author: gurisxie <279483...@qq.com> Authored: Thu Nov 16 03:05:11 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Thu Nov 16 03:05:11 2017 +0800 -- test/screenshot/border-android.png | Bin 164417 -> 160024 bytes 1 file changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/6617a0dd/test/screenshot/border-android.png -- diff --git a/test/screenshot/border-android.png b/test/screenshot/border-android.png index 166a287..b2bcd5d 100644 Binary files a/test/screenshot/border-android.png and b/test/screenshot/border-android.png differ
incubator-weex git commit: * [test] update image compare png
Repository: incubator-weex Updated Branches: refs/heads/master 78f2312ca -> 2f5816be4 * [test] update image compare png Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/2f5816be Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/2f5816be Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/2f5816be Branch: refs/heads/master Commit: 2f5816be4e221f909496fad76b63508b81eb5305 Parents: 78f2312 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 15 23:45:18 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 15 23:45:18 2017 +0800 -- test/screenshot/image-resize-android.png | Bin 218804 -> 213917 bytes 1 file changed, 0 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2f5816be/test/screenshot/image-resize-android.png -- diff --git a/test/screenshot/image-resize-android.png b/test/screenshot/image-resize-android.png old mode 100755 new mode 100644 index cdd8c92..dc48849 Binary files a/test/screenshot/image-resize-android.png and b/test/screenshot/image-resize-android.png differ
[16/19] incubator-weex git commit: * [android] add invokeExecJS log to logwatcher
* [android] add invokeExecJS log to logwatcher Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e7eed891 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e7eed891 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e7eed891 Branch: refs/heads/master Commit: e7eed89143350abd3a6be3c2be035ee9cff240e6 Parents: ae08416 Author: atomtongAuthored: Tue Nov 14 14:47:17 2017 +0800 Committer: atomtong Committed: Tue Nov 14 14:47:17 2017 +0800 -- .../src/main/java/com/taobao/weex/bridge/WXBridgeManager.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e7eed891/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index 97fb867..e40013c 100644 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -1529,7 +1529,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { public void invokeExecJS(String instanceId, String namespace, String function, WXJSObject[] args, boolean logTaskDetail) { - if (WXEnvironment.isApkDebugable()) { +// if (WXEnvironment.isApkDebugable()) { mLodBuilder.append("callJS instanceId:").append(instanceId) .append("function:").append(function); if (logTaskDetail) @@ -1538,7 +1538,7 @@ public class WXBridgeManager implements Callback, BactchExecutor { mLodBuilder.setLength(0); } mWXBridge.execJS(instanceId, namespace, function, args); - } +// } private void invokeInitFramework(Message msg) { String framework = "";
[12/19] incubator-weex git commit: Merge branch 'release-0.16-github-mtop-tracker' into release-0.16-gitlab
Merge branch 'release-0.16-github-mtop-tracker' into release-0.16-gitlab * release-0.16-github-mtop-tracker: * [android] change format data * [android] register dim and mes * [android] get screenreader time add mtop coume time Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/9d3caa20 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9d3caa20 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9d3caa20 Branch: refs/heads/master Commit: 9d3caa20f34d703caba78fbe5ac3db3091ee7d04 Parents: 8b9a3a1 72f5e13 Author: atomtongAuthored: Sat Nov 11 14:26:23 2017 +0800 Committer: atomtong Committed: Sat Nov 11 14:26:23 2017 +0800 -- .../java/com/taobao/weex/WXSDKInstance.java | 11 +-- .../com/taobao/weex/common/WXPerformance.java | 32 +--- 2 files changed, 36 insertions(+), 7 deletions(-) --
[07/19] incubator-weex git commit: Merge branch 'release-0.16-github' into release-0.16-gitlab
Merge branch 'release-0.16-github' into release-0.16-gitlab * release-0.16-github: Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8a87fcd1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8a87fcd1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8a87fcd1 Branch: refs/heads/master Commit: 8a87fcd1609bc26700a4ba4bce7ddf2a6d9d4174 Parents: e5c3f22 19f0f0a Author: atomtongAuthored: Thu Nov 9 11:45:26 2017 +0800 Committer: atomtong Committed: Thu Nov 9 11:45:26 2017 +0800 -- --
[02/19] incubator-weex git commit: * [android] get screenreader time add mtop coume time
* [android] get screenreader time add mtop coume time Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7857ba40 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7857ba40 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7857ba40 Branch: refs/heads/master Commit: 7857ba40a7692797e0fcc103e8c622c95af8446c Parents: 355800d Author: atomtongAuthored: Wed Nov 1 23:38:01 2017 +0800 Committer: atomtong Committed: Wed Nov 1 23:38:01 2017 +0800 -- .../java/com/taobao/weex/WXSDKInstance.java | 11 -- .../com/taobao/weex/common/WXPerformance.java | 21 +--- 2 files changed, 27 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7857ba40/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 5079cd1..14c6172 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -127,19 +127,24 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. public long mRenderStartNanos; public int mExecJSTraceId = WXTracing.nextId(); + /** + *for network tracker + */ + public String mwxDims[] = new String [5]; + public Double measureTimes[] = new Double [5]; public WeakReference templateRef; - public Map responseHeaders = new HashMap<>(); /** * Render strategy. */ private WXRenderStrategy mRenderStrategy = WXRenderStrategy.APPEND_ASYNC; + /** * Render start time */ - private long mRenderStartTime; + public long mRenderStartTime; /** * Refresh start time */ @@ -840,6 +845,8 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. mWXPerformance.useScroller=1; } mWXPerformance.maxDeepViewLayer=getMaxDeepLayer(); + mWXPerformance.wxDims = mwxDims; + mWXPerformance.measureTimes = measureTimes; if (mUserTrackAdapter != null) { mUserTrackAdapter.commit(mContext, null, IWXUserTrackAdapter.LOAD, mWXPerformance, getUserTrackParams()); } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7857ba40/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java index 229a475..04eb354 100644 --- a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java +++ b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java @@ -176,6 +176,12 @@ public class WXPerformance { public String connectionType; public String requestType; + /** + *for network tracker + */ + + public String wxDims[] = new String [5]; + public Double measureTimes[] = new Double [5]; public WXPerformance(){ mErrMsgBuilder=new StringBuilder(); @@ -203,7 +209,12 @@ public class WXPerformance { quotas.put("SDKInitTime",(double)WXEnvironment.sSDKInitTime); quotas.put("maxDeepViewLayer", (double) maxDeepViewLayer); quotas.put("useScroller", (double) useScroller); -return quotas; + quotas.put("measureTime1", measureTimes[0]); + quotas.put("measureTime2", measureTimes[1]); + quotas.put("measureTime3", measureTimes[2]); + quotas.put("measureTime4", measureTimes[3]); + quotas.put("measureTime5", measureTimes[4]); + return quotas; } public Map getDimensionMap(){ @@ -215,8 +226,12 @@ public class WXPerformance { quotas.put("WXSDKVersion", WXSDKVersion); quotas.put("connectionType",connectionType); quotas.put("requestType",requestType); - -return quotas; + quotas.put("wxdim1", wxDims[0]); + quotas.put("wxdim2", wxDims[1]); + quotas.put("wxdim3", wxDims[2]); + quotas.put("wxdim4", wxDims[3]); + quotas.put("wxdim5", wxDims[4]); + return quotas; } public static String[] getDimensions(){
[08/19] incubator-weex git commit: Merge branch 'android-bugfix-log-tlog' into release-0.16-gitlab
Merge branch 'android-bugfix-log-tlog' into release-0.16-gitlab * android-bugfix-log-tlog: * [android] android bugfixed logwatcher Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8b9a3a16 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8b9a3a16 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8b9a3a16 Branch: refs/heads/master Commit: 8b9a3a1644023de368d44b559427306f3cbfbfba Parents: 8a87fcd 8a19b9b Author: atomtongAuthored: Thu Nov 9 14:13:17 2017 +0800 Committer: atomtong Committed: Thu Nov 9 14:13:17 2017 +0800 -- android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java | 4 1 file changed, 4 insertions(+) --
[15/19] incubator-weex git commit: Merge branch 'release-0.16-github' into release-0.16-android-bugfixed-logtrack
Merge branch 'release-0.16-github' into release-0.16-android-bugfixed-logtrack * release-0.16-github: remove unused log edit remove unused log edit * [android] abstract transform parse code, share code * [android] weex transition support on android platform, improve batch time when layout * [android] android bugfixed logwatcher * [devtool] fix devtool network mode Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ae08416d Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ae08416d Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ae08416d Branch: refs/heads/master Commit: ae08416d0993d8af0c84523cf29b4217412e0144 Parents: 265d427 3c3536a Author: atomtongAuthored: Tue Nov 14 14:14:04 2017 +0800 Committer: atomtong Committed: Tue Nov 14 14:14:04 2017 +0800 -- .../java/com/taobao/weex/common/Constants.java | 11 + .../com/taobao/weex/dom/DOMActionContext.java | 2 + .../taobao/weex/dom/DOMActionContextImpl.java | 17 +- .../java/com/taobao/weex/dom/WXDomHandler.java | 15 +- .../java/com/taobao/weex/dom/WXDomObject.java | 33 +- .../taobao/weex/dom/action/AnimationAction.java | 43 +- .../weex/dom/action/UpdateStyleAction.java | 20 +- .../weex/dom/transition/WXTransition.java | 626 +++ .../weex/ui/animation/TransformParser.java | 296 + .../weex/ui/animation/WXAnimationBean.java | 128 +--- .../com/taobao/weex/utils/FunctionParser.java | 2 +- .../java/com/taobao/weex/utils/WXViewUtils.java | 5 + .../weex/dom/transition/WXTransitionTest.java | 96 +++ .../weex/ui/animation/TransformParserTest.java | 38 ++ 14 files changed, 1173 insertions(+), 159 deletions(-) --
[01/19] incubator-weex git commit: Merge branch 'release-0.16-github' into release-0.16-devtool-bugfixed
Repository: incubator-weex Updated Branches: refs/heads/master 1c8b760e9 -> 4269d2479 Merge branch 'release-0.16-github' into release-0.16-devtool-bugfixed * release-0.16-github: onVisibilityChanged most sense right. but when native component custom set parent visibility, the method not paired on some platform, e.g when parent become invisible, changedView is this, visibility is invisible. * [html5] bugfix: - scroll event listenning on window. - img lazyloading. - scrollToElement on latest chrome. - rm id of a comp. - fix stream.fetch. - add statistics for components and modules. - support lazyload and appear watcher when body height set to 100% - add try catch for accessing localStorage may throw a error. - image support sprite (sprite-src, sprite-position, sprite-width). - fix indicator when there's only one slide in slider. when cell amount is big, watch appear will none changed will result too many logs when scroll, move log to appear changed Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/0c20eed1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/0c20eed1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/0c20eed1 Branch: refs/heads/master Commit: 0c20eed10795c776156592a7e1960a8b6a8a3a8c Parents: 41221fc 355800d Author: atomtongAuthored: Wed Nov 1 19:21:06 2017 +0800 Committer: atomtong Committed: Wed Nov 1 19:21:06 2017 +0800 -- .../ui/component/list/BasicListComponent.java | 6 +- .../com/taobao/weex/ui/view/WXImageView.java| 13 +- html5/render/browser/extend/api/storage.js | 123 --- html5/render/browser/extend/api/stream.js | 9 +- html5/render/vue/README.md | 20 ++- html5/render/vue/components/a.js| 3 - html5/render/vue/components/image.js| 42 +-- html5/render/vue/components/slider/indicator.js | 4 +- html5/render/vue/env/weex.js| 34 - html5/render/vue/index.js | 2 +- html5/render/vue/mixins/base.js | 81 +++- html5/render/vue/mixins/style.js| 22 +--- html5/render/vue/modules/dom.js | 6 +- html5/render/vue/utils/component.js | 11 +- html5/render/vue/utils/lazyload.js | 24 +++- html5/test/render/vue/components/image.js | 1 - html5/test/render/vue/components/switch.js | 9 +- html5/test/render/vue/components/text.js| 2 +- html5/test/render/vue/modules/dom.js| 1 + package.json| 2 +- packages/weex-vue-render/README.md | 20 ++- packages/weex-vue-render/package.json | 2 +- 22 files changed, 317 insertions(+), 120 deletions(-) --
[19/19] incubator-weex git commit: [WEEX-115] [android]logwatcher is design to support release environment critical issuses analyzing
[WEEX-115] [android]logwatcher is design to support release environment critical issuses analyzing Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/4269d247 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4269d247 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4269d247 Branch: refs/heads/master Commit: 4269d2479b3347e8fb8b2aa2a17e27a5bcad7d5c Parents: 1c8b760 fd24667 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 15 12:22:13 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 15 12:22:33 2017 +0800 -- .../java/com/taobao/weex/WXSDKInstance.java | 14 ++-- .../com/taobao/weex/bridge/WXBridgeManager.java | 4 +- .../com/taobao/weex/common/WXPerformance.java | 32 +++-- .../java/com/taobao/weex/utils/WXLogUtils.java | 76 ++-- 4 files changed, 78 insertions(+), 48 deletions(-) --
[06/19] incubator-weex git commit: Merge branch 'release-0.16-github' into release-0.16-gitlab
Merge branch 'release-0.16-github' into release-0.16-gitlab * release-0.16-github: when header view has parent, remove it from parent remove log when app run, improve performance Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e5c3f226 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e5c3f226 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e5c3f226 Branch: refs/heads/master Commit: e5c3f226b0fee98373fee4f9d864e8ac40e2f805 Parents: 0c20eed db0ae56 Author: atomtongAuthored: Tue Nov 7 15:27:03 2017 +0800 Committer: atomtong Committed: Tue Nov 7 15:27:03 2017 +0800 -- .../main/java/com/taobao/weex/bridge/WXBridgeManager.java | 4 ++-- .../java/com/taobao/weex/ui/component/list/WXCell.java| 3 +++ .../java/com/taobao/weex/ui/module/WXTimerModule.java | 10 -- 3 files changed, 13 insertions(+), 4 deletions(-) --
[18/19] incubator-weex git commit: * [android] add NPE protection
* [android] add NPE protection Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fd246676 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fd246676 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fd246676 Branch: refs/heads/master Commit: fd246676302bdce2313608fb21ac79d6a01a9dde Parents: 060d89a Author: atomtongAuthored: Wed Nov 15 11:24:54 2017 +0800 Committer: atomtong Committed: Wed Nov 15 11:24:54 2017 +0800 -- .../sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fd246676/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java index 70ca32b..f6439bc 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java @@ -123,9 +123,10 @@ public class WXLogUtils { public static void d(String tag, String msg) { - log(tag, msg, LogLevel.DEBUG); + if(!TextUtils.isEmpty(tag) && !TextUtils.isEmpty(msg)){ + log(tag, msg, LogLevel.DEBUG); - if(WXEnvironment.isApkDebugable()){//sLogLevel in debug mode is "LogLevel.DEBUG" + if(WXEnvironment.isApkDebugable()){//sLogLevel in debug mode is "LogLevel.DEBUG" if ("jsLog".equals(tag) && jsLogWatcher != null) { if (msg.endsWith("__DEBUG")) { jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__DEBUG", "")); @@ -151,7 +152,8 @@ public class WXLogUtils { return; } } - sendLog(LogLevel.DEBUG, tag + ":" + msg);// WXDebugTool sendLog + sendLog(LogLevel.DEBUG, tag + ":" + msg);// WXDebugTool sendLog + } } }
[04/19] incubator-weex git commit: * [android] change format data
* [android] change format data Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/9a36f0bd Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9a36f0bd Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9a36f0bd Branch: refs/heads/master Commit: 9a36f0bd808b36f52ae8d2abfb55a4a40d5074dd Parents: f7b8510 Author: atomtongAuthored: Thu Nov 2 01:10:04 2017 +0800 Committer: atomtong Committed: Thu Nov 2 01:10:04 2017 +0800 -- .../src/main/java/com/taobao/weex/WXSDKInstance.java| 2 +- .../main/java/com/taobao/weex/common/WXPerformance.java | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9a36f0bd/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 14c6172..8aa9809 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -131,7 +131,7 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. *for network tracker */ public String mwxDims[] = new String [5]; - public Double measureTimes[] = new Double [5]; + public long measureTimes[] = new long [5]; public WeakReference templateRef; public Map responseHeaders = new HashMap<>(); http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9a36f0bd/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java index 8f682ee..8238041 100644 --- a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java +++ b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java @@ -181,7 +181,7 @@ public class WXPerformance { */ public String wxDims[] = new String [5]; - public Double measureTimes[] = new Double [5]; + public long measureTimes[] = new long [5]; public WXPerformance(){ mErrMsgBuilder=new StringBuilder(); @@ -209,11 +209,11 @@ public class WXPerformance { quotas.put("SDKInitTime",(double)WXEnvironment.sSDKInitTime); quotas.put("maxDeepViewLayer", (double) maxDeepViewLayer); quotas.put("useScroller", (double) useScroller); - quotas.put("measureTime1", measureTimes[0]); - quotas.put("measureTime2", measureTimes[1]); - quotas.put("measureTime3", measureTimes[2]); - quotas.put("measureTime4", measureTimes[3]); - quotas.put("measureTime5", measureTimes[4]); + quotas.put("measureTime1", (double) measureTimes[0]); + quotas.put("measureTime2", (double) measureTimes[1]); + quotas.put("measureTime3", (double) measureTimes[2]); + quotas.put("measureTime4", (double) measureTimes[3]); + quotas.put("measureTime5", (double) measureTimes[4]); return quotas; }
[14/19] incubator-weex git commit: [android] remove debug log into debug mode
[android] remove debug log into debug mode Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/265d4272 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/265d4272 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/265d4272 Branch: refs/heads/master Commit: 265d4272e3af8fc1ecaff2b58d33a0d47f41433e Parents: 71d92a2 Author: atomtongAuthored: Mon Nov 13 15:24:44 2017 +0800 Committer: atomtong Committed: Mon Nov 13 15:24:44 2017 +0800 -- .../main/java/com/taobao/weex/WXSDKInstance.java| 3 +-- .../com/taobao/weex/bridge/WXBridgeManager.java | 4 ++-- .../main/java/com/taobao/weex/utils/WXLogUtils.java | 16 +--- 3 files changed, 12 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/265d4272/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 8aa9809..11e7ce1 100644 --- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java +++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java @@ -1074,13 +1074,12 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext, View. } WXLogUtils.d(WXLogUtils.WEEX_PERF_TAG, mWXPerformance.toString()); - } } }); } if(!WXEnvironment.isApkDebugable()){ - Log.e("weex_perf",mWXPerformance.getPerfData()); + WXLogUtils.e("weex_perf",mWXPerformance.getPerfData()); } } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/265d4272/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index b6db683..97fb867 100644 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -1529,14 +1529,14 @@ public class WXBridgeManager implements Callback, BactchExecutor { public void invokeExecJS(String instanceId, String namespace, String function, WXJSObject[] args, boolean logTaskDetail) { -// if (WXEnvironment.isApkDebugable()) { + if (WXEnvironment.isApkDebugable()) { mLodBuilder.append("callJS instanceId:").append(instanceId) .append("function:").append(function); if (logTaskDetail) mLodBuilder.append(" tasks:").append(WXJsonUtils.fromObjectToJSONString(args)); WXLogUtils.d(mLodBuilder.substring(0)); mLodBuilder.setLength(0); -// } + } mWXBridge.execJS(instanceId, namespace, function, args); } http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/265d4272/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java index 10f1597..70ca32b 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java @@ -75,14 +75,18 @@ public class WXLogUtils { sLogWatcher.onLog(level.getName(), tag, msg); } -if (msg != null && WXEnvironment.sLogLevel.compare(level) >= 0) { + if (WXEnvironment.isApkDebugable()) { Log.println(level.getPriority(),tag, msg); // if not debug level then print log - if(WXEnvironment.isApkDebugable() && !level.getName().equals("debug")){ + if(!level.getName().equals("debug")){ writeConsoleLog(level.getName(), msg); sendLog(level, msg); } -} +}else { + if(level.getPriority() - LogLevel.WARN.getPriority() >=0){ + Log.println(level.getPriority(),tag, msg); + } + } } public static void d(String msg) { @@ -120,10 +124,8 @@ public class WXLogUtils { public static void d(String tag, String msg) { log(tag, msg, LogLevel.DEBUG); - sendLog(LogLevel.DEBUG, tag + ":" + msg);// WXDebugTool sendLog - if(WXEnvironment.sLogLevel.compare(LogLevel.DEBUG) >= 0){//sLogLevel in debug mode is "LogLevel.DEBUG" - if (WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg)) { + if(WXEnvironment.isApkDebugable()){//sLogLevel in debug mode is "LogLevel.DEBUG" if
[13/19] incubator-weex git commit: Merge branch 'release-0.16-gitlab' into release-0.16-android-bugfixed-logtrack
Merge branch 'release-0.16-gitlab' into release-0.16-android-bugfixed-logtrack * release-0.16-gitlab: * [android] change format data * [android] register dim and mes * [android] get screenreader time add mtop coume time Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/71d92a29 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/71d92a29 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/71d92a29 Branch: refs/heads/master Commit: 71d92a2959cd6ff47470d510399f99c8d307933b Parents: 454ea94 9d3caa2 Author: atomtongAuthored: Sat Nov 11 14:27:26 2017 +0800 Committer: atomtong Committed: Sat Nov 11 14:27:26 2017 +0800 -- .../java/com/taobao/weex/WXSDKInstance.java | 11 +-- .../com/taobao/weex/common/WXPerformance.java | 32 +--- 2 files changed, 36 insertions(+), 7 deletions(-) --
[17/19] incubator-weex git commit: * [android] comment position fixed
* [android] comment position fixed Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/060d89aa Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/060d89aa Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/060d89aa Branch: refs/heads/master Commit: 060d89aa9dc886efe4066f67d664c63488f65d66 Parents: e7eed89 Author: atomtongAuthored: Tue Nov 14 19:34:57 2017 +0800 Committer: atomtong Committed: Tue Nov 14 19:34:57 2017 +0800 -- .../src/main/java/com/taobao/weex/bridge/WXBridgeManager.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/060d89aa/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java index e40013c..d125d5b 100644 --- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java +++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java @@ -1536,9 +1536,9 @@ public class WXBridgeManager implements Callback, BactchExecutor { mLodBuilder.append(" tasks:").append(WXJsonUtils.fromObjectToJSONString(args)); WXLogUtils.d(mLodBuilder.substring(0)); mLodBuilder.setLength(0); - } +// } mWXBridge.execJS(instanceId, namespace, function, args); -// } + } private void invokeInitFramework(Message msg) { String framework = "";
[09/19] incubator-weex git commit: * [android] release log analyse logwatcher
* [android] release log analyse logwatcher Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7efcc193 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7efcc193 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7efcc193 Branch: refs/heads/master Commit: 7efcc19320afb48dc2a66aaf4d871719671f3885 Parents: 8a19b9b Author: atomtongAuthored: Fri Nov 10 21:03:27 2017 +0800 Committer: atomtong Committed: Fri Nov 10 21:03:27 2017 +0800 -- .../sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java| 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7efcc193/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java index af20f22..78b3dbf 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java @@ -124,6 +124,12 @@ public class WXLogUtils { public static void d(String tag, String msg) { + if(!WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg)){ + if(sLogWatcher != null){//sLogWatcher designed to track analyse log + log(tag, msg, LogLevel.DEBUG); + } + } + if (WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg) && WXEnvironment.sLogLevel.compare(LogLevel.DEBUG) >= 0) { if ("jsLog".equals(tag) && jsLogWatcher != null) { if (msg.endsWith("__DEBUG")) {
[11/19] incubator-weex git commit: * [android] log track adapter fix logLevel
* [android] log track adapter fix logLevel Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/454ea94b Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/454ea94b Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/454ea94b Branch: refs/heads/master Commit: 454ea94b97657a95b7f13fb23e9a8281ffb3ae8d Parents: a1dc1ac Author: atomtongAuthored: Sat Nov 11 14:22:05 2017 +0800 Committer: atomtong Committed: Sat Nov 11 14:22:05 2017 +0800 -- .../java/com/taobao/weex/utils/WXLogUtils.java | 68 +--- 1 file changed, 30 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/454ea94b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java index 78b3dbf..10f1597 100644 --- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java +++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java @@ -76,12 +76,7 @@ public class WXLogUtils { } if (msg != null && WXEnvironment.sLogLevel.compare(level) >= 0) { - if (sLogWatcher != null ) { -sLogWatcher.onLog(level.getName(), tag, msg); - }else{ Log.println(level.getPriority(),tag, msg); - } - // if not debug level then print log if(WXEnvironment.isApkDebugable() && !level.getName().equals("debug")){ writeConsoleLog(level.getName(), msg); @@ -124,41 +119,38 @@ public class WXLogUtils { public static void d(String tag, String msg) { - if(!WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg)){ - if(sLogWatcher != null){//sLogWatcher designed to track analyse log - log(tag, msg, LogLevel.DEBUG); + log(tag, msg, LogLevel.DEBUG); + sendLog(LogLevel.DEBUG, tag + ":" + msg);// WXDebugTool sendLog + + if(WXEnvironment.sLogLevel.compare(LogLevel.DEBUG) >= 0){//sLogLevel in debug mode is "LogLevel.DEBUG" + if (WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg)) { + if ("jsLog".equals(tag) && jsLogWatcher != null) { + if (msg.endsWith("__DEBUG")) { + jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__DEBUG", "")); + } else if (msg.endsWith("__INFO")) { + jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__INFO", "")); + } else if (msg.endsWith("__WARN")) { + jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__WARN", "")); + } else if (msg.endsWith("__ERROR")) { + jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__ERROR", "")); + } else { + jsLogWatcher.onJsLog(Log.DEBUG, msg); + } + } + + /** This log method will be invoked from jni code, so try to extract loglevel from message. **/ + writeConsoleLog("debug", tag + ":" + msg); + if(msg.contains(" | __")){ + String[] msgs=msg.split(" | __"); + LogLevel level; + if( msgs!=null && msgs.length==4 && !TextUtils.isEmpty(msgs[0]) && !TextUtils.isEmpty(msgs[2])){ + level=getLogLevel(msgs[2]); + sendLog(level,msgs[0]); + return; + } + } } } - -if (WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg) && WXEnvironment.sLogLevel.compare(LogLevel.DEBUG) >= 0) { - if ("jsLog".equals(tag) && jsLogWatcher != null) { -if (msg.endsWith("__DEBUG")) { - jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__DEBUG", "")); -} else if (msg.endsWith("__INFO")) { - jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__INFO", "")); -} else if (msg.endsWith("__WARN")) { - jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__WARN", "")); -} else if (msg.endsWith("__ERROR")) { - jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__ERROR", "")); -} else { - jsLogWatcher.onJsLog(Log.DEBUG, msg); -} - } - - /** This log method will be invoked from jni code, so try to extract loglevel from message. **/ - writeConsoleLog("debug", tag + ":" + msg); - if(msg.contains(" | __")){ -String[] msgs=msg.split(" | __"); -LogLevel level; -if( msgs!=null && msgs.length==4 && !TextUtils.isEmpty(msgs[0]) && !TextUtils.isEmpty(msgs[2])){ - level=getLogLevel(msgs[2]); - sendLog(level,msgs[0]); -
[03/19] incubator-weex git commit: * [android] register dim and mes
* [android] register dim and mes Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f7b85105 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f7b85105 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f7b85105 Branch: refs/heads/master Commit: f7b851052fb0cc3f8112da30a96dc30680a71a17 Parents: 7857ba4 Author: atomtongAuthored: Thu Nov 2 00:36:26 2017 +0800 Committer: atomtong Committed: Thu Nov 2 00:36:26 2017 +0800 -- .../main/java/com/taobao/weex/common/WXPerformance.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f7b85105/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java index 04eb354..8f682ee 100644 --- a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java +++ b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java @@ -235,7 +235,8 @@ public class WXPerformance { } public static String[] getDimensions(){ -return new String[]{"bizType","templateUrl","pageName","JSLibVersion","WXSDKVersion","connectionType","requestType"}; +return new String[]{"bizType","templateUrl","pageName","JSLibVersion","WXSDKVersion","connectionType","requestType" +,"wxdim1","wxdim2","wxdim3","wxdim4","wxdim5"}; } public static String[] getMeasures(){ @@ -258,7 +259,13 @@ public class WXPerformance { "actualNetworkTime", "firstScreenJSFExecuteTime", "maxDeepViewLayer", -"useScroller"}; +"useScroller", + "measureTime1", + "measureTime2", + "measureTime3", + "measureTime4", + "measureTime5" + }; } @Override
[10/19] incubator-weex git commit: Merge branch 'release-0.16-gitlab' into release-0.16-android-bugfixed-logtrack
Merge branch 'release-0.16-gitlab' into release-0.16-android-bugfixed-logtrack * release-0.16-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/a1dc1ac4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a1dc1ac4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a1dc1ac4 Branch: refs/heads/master Commit: a1dc1ac43960a732813a7bb5b5cfca7411090805 Parents: 7efcc19 8b9a3a1 Author: atomtongAuthored: Sat Nov 11 13:58:59 2017 +0800 Committer: atomtong Committed: Sat Nov 11 13:58:59 2017 +0800 -- --
[05/19] incubator-weex git commit: Merge branch 'release-0.16-gitlab' into release-0.16-github-mtop-tracker
Merge branch 'release-0.16-gitlab' into release-0.16-github-mtop-tracker * release-0.16-gitlab: * [devtool] fix devtool network mode Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/72f5e138 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/72f5e138 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/72f5e138 Branch: refs/heads/master Commit: 72f5e138a17d5ffbdf3f4b93d9e19b6867a52b1e Parents: 9a36f0b 0c20eed Author: atomtongAuthored: Thu Nov 2 08:49:53 2017 +0800 Committer: atomtong Committed: Thu Nov 2 08:49:53 2017 +0800 -- android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java | 1 + 1 file changed, 1 insertion(+) --
[2/2] incubator-weex git commit: [WEEX-109][android] support scroll start scroll end event on scroller
[WEEX-109][android] support scroll start scroll end event on scroller Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/4747acc9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4747acc9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4747acc9 Branch: refs/heads/master Commit: 4747acc95aab3d00d712306f90ac6068e762db3e Parents: 00a4cd6 40de940 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 15 11:27:44 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 15 11:28:12 2017 +0800 -- .../java/com/taobao/weex/common/Constants.java | 2 + .../taobao/weex/ui/component/WXScroller.java| 43 ++- .../component/helper/ScrollStartEndHelper.java | 116 +++ .../ui/component/list/BasicListComponent.java | 35 +- .../list/template/WXRecyclerTemplateList.java | 39 +-- 5 files changed, 219 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4747acc9/android/sdk/src/main/java/com/taobao/weex/common/Constants.java -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4747acc9/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java --
[1/2] incubator-weex git commit: [WEEX-109][android] support scroll start scroll end event on scroller list template list
Repository: incubator-weex Updated Branches: refs/heads/master 00a4cd654 -> 4747acc95 [WEEX-109][android] support scroll start scroll end event on scroller list template list Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/40de9402 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/40de9402 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/40de9402 Branch: refs/heads/master Commit: 40de94021c0d5e139f8c8696d19ce493f252b772 Parents: 8a19b9b Author: jianbai.gbjAuthored: Mon Nov 13 18:09:08 2017 +0800 Committer: jianbai.gbj Committed: Mon Nov 13 18:09:08 2017 +0800 -- .../java/com/taobao/weex/common/Constants.java | 2 + .../taobao/weex/ui/component/WXScroller.java| 43 ++- .../component/helper/ScrollStartEndHelper.java | 116 +++ .../ui/component/list/BasicListComponent.java | 35 +- .../list/template/WXRecyclerTemplateList.java | 39 +-- 5 files changed, 219 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/40de9402/android/sdk/src/main/java/com/taobao/weex/common/Constants.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java index 32c91ba..5145f9e 100644 --- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java +++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java @@ -278,6 +278,8 @@ public class Constants { String ONPULLING_DOWN = "pullingdown"; String ONPULLING_UP = "pullingup"; String SCROLL = "scroll"; +String SCROLL_START = "scrollstart"; +String SCROLL_END = "scrollend"; String CLICKBACKITEM = "clickbackitem"; String RESUME_EVENT = "WXApplicationDidBecomeActiveEvent"; String PAUSE_EVENT = "WXApplicationWillResignActiveEvent"; http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/40de9402/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java index 9e56259..9885d62 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java @@ -42,6 +42,7 @@ import com.taobao.weex.common.OnWXScrollListener; import com.taobao.weex.common.WXThread; import com.taobao.weex.dom.WXDomObject; import com.taobao.weex.ui.ComponentCreator; +import com.taobao.weex.ui.component.helper.ScrollStartEndHelper; import com.taobao.weex.ui.component.helper.WXStickyHelper; import com.taobao.weex.ui.view.IWXScroller; import com.taobao.weex.ui.view.WXBaseRefreshLayout; @@ -78,6 +79,14 @@ public class WXScroller extends WXVContainer implements WXScrollViewL private boolean mForceLoadmoreNextTime = false; private int mOffsetAccuracy = 10; private Point mLastReport = new Point(-1, -1); + private boolean mHasAddScrollEvent = false; + + /** + * scroll start and scroll end event + * */ + private ScrollStartEndHelper mScrollStartEndHelper; + + public static class Creator implements ComponentCreator { public WXComponent createInstance(WXSDKInstance instance, WXDomObject node, WXVContainer parent) throws IllegalAccessException, InvocationTargetException, InstantiationException { @@ -102,6 +111,7 @@ public class WXScroller extends WXVContainer implements WXScrollViewL private boolean isScrollable = true; + @Deprecated public WXScroller(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy) { this(instance,dom,parent); @@ -148,11 +158,17 @@ public class WXScroller extends WXVContainer implements WXScrollViewL @Override public void addEvent(String type) { super.addEvent(type); -if (Constants.Event.SCROLL.equals(type) && getInnerView() != null) { +if (ScrollStartEndHelper.isScrollEvent(type) +&& getInnerView() != null && !mHasAddScrollEvent) { + mHasAddScrollEvent = true; if (getInnerView() instanceof WXScrollView) { ((WXScrollView) getInnerView()).addScrollViewListener(new WXScrollViewListener() { @Override public void onScrollChanged(WXScrollView scrollView, int x, int y, int oldx, int oldy) { +getScrollStartEndHelper().onScrolled(x, y); +if(!getDomObject().getEvents().contains(Constants.Event.SCROLL)){ + return; +} if (shouldReport(x, y))
[4/7] incubator-weex git commit: nested scroll helper
nested scroll helper Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d4c004bd Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d4c004bd Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d4c004bd Branch: refs/heads/master Commit: d4c004bde700e5ccc7b5d2d1b974ede8ceb34c1f Parents: 69f634a Author: jianbai.gbjAuthored: Mon Oct 30 20:20:57 2017 +0800 Committer: jianbai.gbj Committed: Mon Oct 30 20:20:57 2017 +0800 -- .../ui/view/refresh/core/WXSwipeLayout.java | 32 1 file changed, 19 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d4c004bd/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java index 1676c99..e1ec10b 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java @@ -297,18 +297,6 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, mNestedScrollInProgress = true; } - /** - * Callback on TouchEvent.ACTION_CANCLE or TouchEvent.ACTION_UP - * handler : refresh or loading - * @param child : child view of SwipeLayout,RecyclerView or Scroller - */ - @Override - public void onStopNestedScroll(View child) { -mNestedScrollingParentHelper.onStopNestedScroll(child); -mNestedScrollInProgress = true; -handlerAction(); -stopNestedScroll(); - } /** * With child view to processing move events @@ -320,6 +308,12 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, @Override public void onNestedPreScroll(View target, int dx, int dy, int[] consumed) { if ((!mPullRefreshEnable && !mPullLoadEnable)) { + // Now let our nested parent consume the leftovers + final int[] parentConsumed = mParentScrollConsumed; + if (dispatchNestedPreScroll(dx - consumed[0], dy - consumed[1], parentConsumed, null)) { +consumed[0] += parentConsumed[0]; +consumed[1] += parentConsumed[1]; + } return; } @@ -338,7 +332,6 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, if (moveSpinner(-dy)) { consumed[1] += dy; } - // Now let our nested parent consume the leftovers final int[] parentConsumed = mParentScrollConsumed; if (dispatchNestedPreScroll(dx - consumed[0], dy - consumed[1], parentConsumed, null)) { @@ -353,6 +346,19 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, } + /** + * Callback on TouchEvent.ACTION_CANCLE or TouchEvent.ACTION_UP + * handler : refresh or loading + * @param child : child view of SwipeLayout,RecyclerView or Scroller + */ + @Override + public void onStopNestedScroll(View child) { +mNestedScrollingParentHelper.onStopNestedScroll(child); +mNestedScrollInProgress = true; +handlerAction(); +stopNestedScroll(); + } + @Override public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) {
[7/7] incubator-weex git commit: [WEEX-110][android]WXSwipeLayout support nested scrolling for list
[WEEX-110][android]WXSwipeLayout support nested scrolling for list Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/00a4cd65 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/00a4cd65 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/00a4cd65 Branch: refs/heads/master Commit: 00a4cd654381f7dbf53b8433b2ed4670753caf78 Parents: 6b3519a f669385 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 15 11:26:21 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 15 11:26:41 2017 +0800 -- .../weex/ui/component/list/WXListComponent.java | 10 +- .../list/template/WXRecyclerTemplateList.java | 5 + .../ui/view/refresh/core/WXSwipeLayout.java | 214 --- 3 files changed, 197 insertions(+), 32 deletions(-) --
[1/7] incubator-weex git commit: nest scroll
Repository: incubator-weex Updated Branches: refs/heads/master 6b3519a2d -> 00a4cd654 nest scroll Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/868a9bd6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/868a9bd6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/868a9bd6 Branch: refs/heads/master Commit: 868a9bd64c35cf86ea29a6f4bbfe70e06dccfa8c Parents: 1538690 Author: jianbai.gbjAuthored: Thu Oct 26 14:04:04 2017 +0800 Committer: jianbai.gbj Committed: Thu Oct 26 14:04:04 2017 +0800 -- .../ui/view/refresh/core/WXSwipeLayout.java | 92 1 file changed, 77 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/868a9bd6/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java index fa26de7..e9c84e4 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java @@ -24,6 +24,8 @@ import android.annotation.TargetApi; import android.content.Context; import android.graphics.Color; import android.os.Build; +import android.support.v4.view.NestedScrollingChild; +import android.support.v4.view.NestedScrollingChildHelper; import android.support.v4.view.NestedScrollingParent; import android.support.v4.view.NestedScrollingParentHelper; import android.support.v4.view.ViewCompat; @@ -36,9 +38,11 @@ import android.view.View; import android.widget.AbsListView; import android.widget.FrameLayout; -public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent { +public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, NestedScrollingChild { - private NestedScrollingParentHelper parentHelper; + private NestedScrollingParentHelper mNestedScrollingParentHelper; + private NestedScrollingChildHelper mNestedScrollingChildHelper; + private final int[] mParentOffsetInWindow = new int[2]; private WXOnRefreshListener onRefreshListener; private WXOnLoadingListener onLoadingListener; @@ -143,7 +147,9 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent throw new RuntimeException("WXSwipeLayout should not have more than one child"); } -parentHelper = new NestedScrollingParentHelper(this); +mNestedScrollingParentHelper = new NestedScrollingParentHelper(this); +mNestedScrollingChildHelper = new NestedScrollingChildHelper(this); +setNestedScrollingEnabled(true); if (isInEditMode() && attrs == null) { return; @@ -206,6 +212,68 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent return super.onInterceptTouchEvent(ev); } + // NestedScrollingChild + + @Override + public void setNestedScrollingEnabled(boolean enabled) { +mNestedScrollingChildHelper.setNestedScrollingEnabled(enabled); + } + + @Override + public boolean isNestedScrollingEnabled() { +return mNestedScrollingChildHelper.isNestedScrollingEnabled(); + } + + @Override + public boolean startNestedScroll(int axes) { +return mNestedScrollingChildHelper.startNestedScroll(axes); + } + + @Override + public void stopNestedScroll() { +mNestedScrollingChildHelper.stopNestedScroll(); + } + + @Override + public boolean hasNestedScrollingParent() { +return mNestedScrollingChildHelper.hasNestedScrollingParent(); + } + + @Override + public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed, + int dyUnconsumed, int[] offsetInWindow) { +return mNestedScrollingChildHelper.dispatchNestedScroll(dxConsumed, dyConsumed, +dxUnconsumed, dyUnconsumed, offsetInWindow); + } + + @Override + public boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow) { +return mNestedScrollingChildHelper.dispatchNestedPreScroll( +dx, dy, consumed, offsetInWindow); + } + + @Override + public boolean onNestedPreFling(View target, float velocityX, + float velocityY) { +return dispatchNestedPreFling(velocityX, velocityY); + } + + @Override + public boolean onNestedFling(View target, float velocityX, float velocityY, + boolean consumed) { +return dispatchNestedFling(velocityX, velocityY, consumed); + } + + @Override + public
[5/7] incubator-weex git commit: [WEEX-110][android]WXSwipeLayout support nested scroll for list
[WEEX-110][android]WXSwipeLayout support nested scroll for list Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/874147d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/874147d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/874147d8 Branch: refs/heads/master Commit: 874147d8f28f2ab9a3656a3f4ba5e2df8753800e Parents: d4c004b Author: jianbai.gbjAuthored: Tue Oct 31 14:05:52 2017 +0800 Committer: jianbai.gbj Committed: Tue Nov 14 11:27:54 2017 +0800 -- .../weex/ui/component/list/WXListComponent.java | 10 +- .../list/template/WXRecyclerTemplateList.java | 5 + .../ui/view/refresh/core/WXSwipeLayout.java | 130 ++- 3 files changed, 110 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/874147d8/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java index c5ef8b5..507a40c 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXListComponent.java @@ -37,6 +37,7 @@ import com.taobao.weex.ui.component.WXVContainer; import com.taobao.weex.ui.view.listview.WXRecyclerView; import com.taobao.weex.ui.view.listview.adapter.ListBaseViewHolder; import com.taobao.weex.ui.view.refresh.wrapper.BounceRecyclerView; +import com.taobao.weex.utils.WXUtils; import java.util.Map; @@ -79,8 +80,13 @@ public class WXListComponent extends BasicListComponent { @Override protected BounceRecyclerView generateListView(Context context, int orientation) { - -return new BounceRecyclerView(context,mLayoutType,mColumnCount,mColumnGap,orientation); +BounceRecyclerView bounceRecyclerView = new BounceRecyclerView(context,mLayoutType,mColumnCount,mColumnGap,orientation); +if(bounceRecyclerView.getSwipeLayout() != null){ + if(WXUtils.getBoolean(getDomObject().getAttrs().get("nestedScrollingEnabled"), false)) { + bounceRecyclerView.getSwipeLayout().setNestedScrollingEnabled(true); + } +} +return bounceRecyclerView; } @Override http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/874147d8/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java index 76bcce0..54e1564 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java @@ -236,6 +236,11 @@ public class WXRecyclerTemplateList extends WXVContainer imp if(itemViewCacheSize != 2) { bounceRecyclerView.getInnerView().setItemViewCacheSize(itemViewCacheSize); } +if(bounceRecyclerView.getSwipeLayout() != null){ + if(WXUtils.getBoolean(getDomObject().getAttrs().get("nestedScrollingEnabled"), false)) { + bounceRecyclerView.getSwipeLayout().setNestedScrollingEnabled(true); +} +} bounceRecyclerView.getInnerView().setHasFixedSize(hasFixedSize); bounceRecyclerView.setRecyclerViewBaseAdapter(recyclerViewBaseAdapter); bounceRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER); http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/874147d8/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java index e1ec10b..a69dc0e 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java @@ -29,12 +29,15 @@ import android.support.v4.view.NestedScrollingChildHelper; import android.support.v4.view.NestedScrollingParent; import android.support.v4.view.NestedScrollingParentHelper; import android.support.v4.view.ViewCompat; +import android.support.v4.view.ViewParentCompat; import
[3/7] incubator-weex git commit: nest scroll check
nest scroll check Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/69f634a4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/69f634a4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/69f634a4 Branch: refs/heads/master Commit: 69f634a420df660433536d7630376222ace8e647 Parents: 1f54c7d Author: jianbai.gbjAuthored: Thu Oct 26 20:06:36 2017 +0800 Committer: jianbai.gbj Committed: Thu Oct 26 20:06:36 2017 +0800 -- .../com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java | 9 + 1 file changed, 9 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/69f634a4/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java index b8c8465..1676c99 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java @@ -44,6 +44,7 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, private NestedScrollingChildHelper mNestedScrollingChildHelper; private final int[] mParentScrollConsumed = new int[2]; private final int[] mParentOffsetInWindow = new int[2]; + private boolean mNestedScrollInProgress; private WXOnRefreshListener onRefreshListener; private WXOnLoadingListener onLoadingListener; @@ -210,6 +211,12 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, if ((!mPullRefreshEnable && !mPullLoadEnable)) { return false; } +if (!isEnabled() || canChildScrollUp() +|| mRefreshing || mNestedScrollInProgress) { + // Fail fast if we're not in a state where a swipe is possible + return false; +} + return super.onInterceptTouchEvent(ev); } @@ -287,6 +294,7 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, public void onNestedScrollAccepted(View child, View target, int axes) { mNestedScrollingParentHelper.onNestedScrollAccepted(child, target, axes); startNestedScroll(axes & ViewCompat.SCROLL_AXIS_VERTICAL); +mNestedScrollInProgress = true; } /** @@ -297,6 +305,7 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, @Override public void onStopNestedScroll(View child) { mNestedScrollingParentHelper.onStopNestedScroll(child); +mNestedScrollInProgress = true; handlerAction(); stopNestedScroll(); }
[2/7] incubator-weex git commit: nest scroll parent
nest scroll parent Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1f54c7d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1f54c7d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1f54c7d3 Branch: refs/heads/master Commit: 1f54c7d3378bece79a4bb2762ea34b185f0259f1 Parents: 868a9bd Author: jianbai.gbjAuthored: Thu Oct 26 14:35:22 2017 +0800 Committer: jianbai.gbj Committed: Thu Oct 26 14:35:22 2017 +0800 -- .../ui/view/refresh/core/WXSwipeLayout.java | 27 +++- 1 file changed, 20 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1f54c7d3/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java index e9c84e4..b8c8465 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java @@ -42,6 +42,7 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, private NestedScrollingParentHelper mNestedScrollingParentHelper; private NestedScrollingChildHelper mNestedScrollingChildHelper; + private final int[] mParentScrollConsumed = new int[2]; private final int[] mParentOffsetInWindow = new int[2]; private WXOnRefreshListener onRefreshListener; private WXOnLoadingListener onLoadingListener; @@ -278,13 +279,14 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, @Override public boolean onStartNestedScroll(View child, View target, int nestedScrollAxes) { -return true; +return isEnabled() && !mRefreshing +&& (nestedScrollAxes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0; } @Override public void onNestedScrollAccepted(View child, View target, int axes) { mNestedScrollingParentHelper.onNestedScrollAccepted(child, target, axes); -startNestedScroll(axes); +startNestedScroll(axes & ViewCompat.SCROLL_AXIS_VERTICAL); } /** @@ -325,13 +327,15 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, } if (moveSpinner(-dy)) { - consumed[1] += dy; + consumed[1] += dy; } - } - @Override - public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) { - dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, mParentOffsetInWindow); +// Now let our nested parent consume the leftovers +final int[] parentConsumed = mParentScrollConsumed; +if (dispatchNestedPreScroll(dx - consumed[0], dy - consumed[1], parentConsumed, null)) { + consumed[0] += parentConsumed[0]; + consumed[1] += parentConsumed[1]; +} } @Override @@ -341,6 +345,15 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, + @Override + public void onNestedScroll(View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) { + dispatchNestedScroll(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, mParentOffsetInWindow); + } + + + + + private double calculateDistanceY(View target, int dy) { int viewHeight = target.getMeasuredHeight(); double ratio = (viewHeight - Math.abs(target.getY())) / 1.0d / viewHeight * DAMPING;
[6/7] incubator-weex git commit: [WEEX-109][android] support scroll start scroll end event on scroller list template list, handle pull action when nestedScrollingEnable false
[WEEX-109][android] support scroll start scroll end event on scroller list template list, handle pull action when nestedScrollingEnable false Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f6693854 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f6693854 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f6693854 Branch: refs/heads/master Commit: f6693854d79b9785b7a3ba7a43835e4aab7537a8 Parents: 874147d Author: jianbai.gbjAuthored: Tue Nov 14 20:18:55 2017 +0800 Committer: jianbai.gbj Committed: Tue Nov 14 20:18:55 2017 +0800 -- .../java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f6693854/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java index a69dc0e..5a2050b 100644 --- a/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java +++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/refresh/core/WXSwipeLayout.java @@ -414,9 +414,9 @@ public class WXSwipeLayout extends FrameLayout implements NestedScrollingParent, @Override public void onStopNestedScroll(View child) { mNestedScrollingParentHelper.onStopNestedScroll(child); +handlerAction(); if(isNestedScrollingEnabled()) { mNestedScrollInProgress = true; - handlerAction(); stopNestedScroll(); } }
[2/2] incubator-weex git commit: [WEEX-100][Android] support multi language on dialog
[WEEX-100][Android] support multi language on dialog Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/6b3519a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/6b3519a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/6b3519a2 Branch: refs/heads/master Commit: 6b3519a2d14df113a83bec3c4bebc6947e3d9031 Parents: 1c7f1ff a8cac84 Author: gurisxie <279483...@qq.com> Authored: Wed Nov 15 11:18:11 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 15 11:19:17 2017 +0800 -- .../weex/appfram/pickers/DatePickerImpl.java| 33 ++-- .../weex/appfram/pickers/WXPickersModule.java | 7 +++-- .../ui/component/helper/WXTimeInputHelper.java | 6 ++-- 3 files changed, 39 insertions(+), 7 deletions(-) --
[1/2] incubator-weex git commit: * [android] support mutil language on dialog
Repository: incubator-weex Updated Branches: refs/heads/master 1c7f1ff75 -> 6b3519a2d * [android] support mutil language on dialog Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a8cac846 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a8cac846 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a8cac846 Branch: refs/heads/master Commit: a8cac8467f6236b962a9c3d13b9ebf72bf4c1ad5 Parents: 659284d Author: misakuoAuthored: Mon Oct 23 14:18:36 2017 +0800 Committer: misakuo Committed: Mon Oct 23 14:18:36 2017 +0800 -- .../weex/appfram/pickers/DatePickerImpl.java| 33 ++-- .../weex/appfram/pickers/WXPickersModule.java | 7 +++-- .../ui/component/helper/WXTimeInputHelper.java | 6 ++-- 3 files changed, 39 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a8cac846/android/sdk/src/main/java/com/taobao/weex/appfram/pickers/DatePickerImpl.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/appfram/pickers/DatePickerImpl.java b/android/sdk/src/main/java/com/taobao/weex/appfram/pickers/DatePickerImpl.java index f6950bf..db00765 100644 --- a/android/sdk/src/main/java/com/taobao/weex/appfram/pickers/DatePickerImpl.java +++ b/android/sdk/src/main/java/com/taobao/weex/appfram/pickers/DatePickerImpl.java @@ -18,6 +18,7 @@ */ package com.taobao.weex.appfram.pickers; +import android.app.AlertDialog; import android.app.DatePickerDialog; import android.app.TimePickerDialog; import android.content.Context; @@ -25,6 +26,7 @@ import android.content.DialogInterface; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.TextUtils; +import android.widget.Button; import android.widget.DatePicker; import android.widget.TimePicker; @@ -35,6 +37,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; +import java.util.Map; /** * Created by moxun on 16/11/23. @@ -48,7 +51,7 @@ public class DatePickerImpl { private static SimpleDateFormat timeFormatter; private static SimpleDateFormat dateFormatter; -public static void pickDate(@NonNull Context context, String value, String max, String min, @NonNull final OnPickListener listener) { +public static void pickDate(@NonNull Context context, String value, String max, String min, @NonNull final OnPickListener listener, @Nullable Map extras) { Calendar calendar = Calendar.getInstance(); calendar.setTime(parseDate(value)); final DatePickerDialog dialog = new DatePickerDialog( @@ -102,10 +105,13 @@ public class DatePickerImpl { } }); +setButtonText(dialog, DialogInterface.BUTTON_NEGATIVE, String.valueOf(extras.get("cancelTitle"))); +setButtonText(dialog, DialogInterface.BUTTON_POSITIVE, String.valueOf(extras.get("confirmTitle"))); + dialog.show(); } -public static void pickTime(@NonNull Context context, String value, @NonNull final OnPickListener listener) { +public static void pickTime(@NonNull Context context, String value, @NonNull final OnPickListener listener, @Nullable Map extras) { Calendar calendar = Calendar.getInstance(); calendar.setTime(parseTime(value)); TimePickerDialog dialog = new TimePickerDialog( @@ -131,6 +137,9 @@ public class DatePickerImpl { } }); +setButtonText(dialog, DialogInterface.BUTTON_NEGATIVE, String.valueOf(extras.get("cancelTitle"))); +setButtonText(dialog, DialogInterface.BUTTON_POSITIVE, String.valueOf(extras.get("confirmTitle"))); + dialog.show(); } @@ -165,4 +174,24 @@ public class DatePickerImpl { } return new Date(); } + +private static void setButtonText(final AlertDialog dialog, final int which, final CharSequence text) { +if (TextUtils.isEmpty(text) || "null".equals(text)) { +return; +} +try { +dialog.getWindow().getDecorView().post(new Runnable() { +@Override +public void run() { +Button button = dialog.getButton(which); +if (button != null) { +button.setAllCaps(false); +button.setText(text); +} +} +}); +} catch (Throwable t) { +t.printStackTrace(); +} +} }
[6/6] incubator-weex git commit: * [android] support ripple background
* [android] support ripple background Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1c7f1ff7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1c7f1ff7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1c7f1ff7 Branch: refs/heads/master Commit: 1c7f1ff75993c7d3d9c24ddbb653706fac1a1271 Parents: 3949bff aff7e3a Author: gurisxie <279483...@qq.com> Authored: Wed Nov 15 11:17:18 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Nov 15 11:17:30 2017 +0800 -- .../java/com/taobao/weex/common/Constants.java | 1 + .../taobao/weex/ui/component/WXComponent.java | 92 ++-- .../pesudo/OnActivePseudoListener.java | 26 ++ .../component/pesudo/OnActivePseudoListner.java | 26 -- .../pesudo/TouchActivePseudoListener.java | 12 +-- 5 files changed, 118 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1c7f1ff7/android/sdk/src/main/java/com/taobao/weex/common/Constants.java -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1c7f1ff7/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java --
[4/6] incubator-weex git commit: * [android] remove static import
* [android] remove static import Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/240f6040 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/240f6040 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/240f6040 Branch: refs/heads/master Commit: 240f604068ea54b8c666468bca472afde83f612d Parents: c38239b Author: misakuoAuthored: Mon Oct 16 11:12:15 2017 +0800 Committer: misakuo Committed: Mon Oct 16 11:12:15 2017 +0800 -- .../main/java/com/taobao/weex/ui/component/WXComponent.java | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/240f6040/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 5a1d046..351f768 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 @@ -75,7 +75,6 @@ import com.taobao.weex.tracing.WXTracing; import com.taobao.weex.ui.IFComponentHolder; import com.taobao.weex.ui.animation.WXAnimationModule; import com.taobao.weex.ui.component.pesudo.OnActivePseudoListener; -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; @@ -732,11 +731,11 @@ public abstract class WXComponent implements IWXObject, IWXActi switch (key) { case Constants.Name.PREVENT_MOVE_EVENT: if(mGesture != null){ - mGesture.setPreventMoveEvent(WXUtils.getBoolean(param,false)); + mGesture.setPreventMoveEvent(getBoolean(param,false)); } return true; case Constants.Name.DISABLED: -Boolean disabled = WXUtils.getBoolean(param,null); +Boolean disabled = getBoolean(param,null); if (disabled != null) { setDisabled(disabled); setPseudoClassStatus(Constants.PSEUDO.DISABLED, disabled); @@ -832,7 +831,7 @@ public abstract class WXComponent implements IWXObject, IWXActi setAriaLabel(label); return true; case Constants.Name.ARIA_HIDDEN: -boolean isHidden = WXUtils.getBoolean(param,false); +boolean isHidden = getBoolean(param,false); setAriaHidden(isHidden); return true; case Constants.Name.WIDTH: @@ -998,7 +997,7 @@ public abstract class WXComponent implements IWXObject, IWXActi if (view instanceof WXGestureObservable) { if (mGesture == null) { mGesture = new WXGesture(this, mContext); - boolean isPreventMove = getBoolean(getDomObject().getAttrs().get(Constants.Name.PREVENT_MOVE_EVENT),false); + boolean isPreventMove = WXUtils.getBoolean(getDomObject().getAttrs().get(Constants.Name.PREVENT_MOVE_EVENT),false); mGesture.setPreventMoveEvent(isPreventMove); } mGestureType.add(type);
[5/6] incubator-weex git commit: * [android] remove static import
* [android] remove static import Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/aff7e3a7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/aff7e3a7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/aff7e3a7 Branch: refs/heads/master Commit: aff7e3a70a3a2e3d930ff9443db8b3042beb3ca6 Parents: 240f604 Author: misakuoAuthored: Mon Oct 16 11:14:07 2017 +0800 Committer: misakuo Committed: Mon Oct 16 11:14:07 2017 +0800 -- .../java/com/taobao/weex/ui/component/WXComponent.java| 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/aff7e3a7/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 351f768..de8553f 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 @@ -106,8 +106,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static com.taobao.weex.utils.WXUtils.getBoolean; - /** * abstract component * @@ -731,11 +729,11 @@ public abstract class WXComponent implements IWXObject, IWXActi switch (key) { case Constants.Name.PREVENT_MOVE_EVENT: if(mGesture != null){ - mGesture.setPreventMoveEvent(getBoolean(param,false)); + mGesture.setPreventMoveEvent(WXUtils.getBoolean(param,false)); } return true; case Constants.Name.DISABLED: -Boolean disabled = getBoolean(param,null); +Boolean disabled = WXUtils.getBoolean(param,null); if (disabled != null) { setDisabled(disabled); setPseudoClassStatus(Constants.PSEUDO.DISABLED, disabled); @@ -831,7 +829,7 @@ public abstract class WXComponent implements IWXObject, IWXActi setAriaLabel(label); return true; case Constants.Name.ARIA_HIDDEN: -boolean isHidden = getBoolean(param,false); +boolean isHidden = WXUtils.getBoolean(param,false); setAriaHidden(isHidden); return true; case Constants.Name.WIDTH: @@ -1913,7 +1911,7 @@ public abstract class WXComponent implements IWXObject, IWXActi protected boolean isRippleEnabled() { try { Object obj = getDomObject().getAttrs().get(Constants.Name.RIPPLE_ENABLED); - return getBoolean(obj, false); + return WXUtils.getBoolean(obj, false); } catch (Throwable t) { //ignore }
[2/6] incubator-weex git commit: * [android] fix wrong ripple with pseudo class
* [android] fix wrong ripple with pseudo 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/bdad06d0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/bdad06d0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/bdad06d0 Branch: refs/heads/master Commit: bdad06d015b6b6b8edd758b5cb8b4fb6ad515b0f Parents: 0bf3d92 Author: misakuoAuthored: Tue Oct 10 17:43:49 2017 +0800 Committer: misakuo Committed: Tue Oct 10 17:43:49 2017 +0800 -- .../taobao/weex/ui/component/WXComponent.java | 27 .../pesudo/OnActivePseudoListener.java | 26 +++ .../component/pesudo/OnActivePseudoListner.java | 26 --- .../pesudo/TouchActivePseudoListener.java | 12 - 4 files changed, 54 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdad06d0/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 09e5e8d..e524a0c 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 @@ -74,7 +74,7 @@ import com.taobao.weex.tracing.Stopwatch; import com.taobao.weex.tracing.WXTracing; import com.taobao.weex.ui.IFComponentHolder; import com.taobao.weex.ui.animation.WXAnimationModule; -import com.taobao.weex.ui.component.pesudo.OnActivePseudoListner; +import com.taobao.weex.ui.component.pesudo.OnActivePseudoListener; import com.taobao.weex.ui.component.pesudo.PesudoStatus; import com.taobao.weex.ui.component.pesudo.TouchActivePseudoListener; import com.taobao.weex.ui.flat.FlatComponent; @@ -112,7 +112,7 @@ import static com.taobao.weex.utils.WXUtils.getBoolean; * abstract component * */ -public abstract class WXComponent implements IWXObject, IWXActivityStateListener,OnActivePseudoListner { +public abstract class WXComponent implements IWXObject, IWXActivityStateListener,OnActivePseudoListener { public static final String PROP_FIXED_SIZE = "fixedSize"; public static final String PROP_FS_MATCH_PARENT = "m"; @@ -1278,9 +1278,7 @@ public abstract class WXComponent implements IWXObject, IWXActi public void setBackgroundColor(String color) { if (!TextUtils.isEmpty(color)) { int colorInt = WXResourceUtils.getColor(color); - Object obj = getDomObject().getAttrs().get(Constants.Name.RIPPLE_ENABLED); - boolean isRippleEnabled = getBoolean(obj, false); - if (isRippleEnabled && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + if (isRippleEnabled() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { mRippleBackground = prepareBackgroundRipple(); if (mRippleBackground != null) { if (mBackgroundDrawable == null) { @@ -1735,6 +1733,15 @@ public abstract class WXComponent implements IWXObject, IWXActi status, pesudoStyles, styles.getPesudoResetStyles()); + +if (resultStyles != null && isRippleEnabled()) { + resultStyles.remove(Constants.Name.BACKGROUND_COLOR); + if (resultStyles.isEmpty()) { +WXLogUtils.d("PseudoClass", "skip empty pseudo styles"); +return; + } +} + updateStyleByPesudo(resultStyles); } @@ -1896,4 +1903,14 @@ public abstract class WXComponent implements IWXObject, IWXActi } } } + + protected boolean isRippleEnabled() { +try { + Object obj = getDomObject().getAttrs().get(Constants.Name.RIPPLE_ENABLED); + return getBoolean(obj, false); +} catch (Throwable t) { + //ignore +} +return false; + } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdad06d0/android/sdk/src/main/java/com/taobao/weex/ui/component/pesudo/OnActivePseudoListener.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/pesudo/OnActivePseudoListener.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/pesudo/OnActivePseudoListener.java new file mode 100644 index 000..989f9e9 --- /dev/null +++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/pesudo/OnActivePseudoListener.java @@ -0,0 +1,26 @@ +/* + * 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
[1/6] incubator-weex git commit: + [android] support ripple background with pseudo class on API 21 and higher
Repository: incubator-weex Updated Branches: refs/heads/master 3949bffae -> 1c7f1ff75 + [android] support ripple background with pseudo class on API 21 and higher Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/0bf3d925 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/0bf3d925 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/0bf3d925 Branch: refs/heads/master Commit: 0bf3d925dcbb38d211ebb23a1eb5451f69e4f55e Parents: 08e1c3e Author: misakuoAuthored: Mon Sep 25 17:13:16 2017 +0800 Committer: misakuo Committed: Mon Sep 25 17:13:16 2017 +0800 -- .../java/com/taobao/weex/common/Constants.java | 1 + .../taobao/weex/ui/component/WXComponent.java | 79 ++-- 2 files changed, 72 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0bf3d925/android/sdk/src/main/java/com/taobao/weex/common/Constants.java -- diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java index e74e083..de2c604 100644 --- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java +++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java @@ -199,6 +199,7 @@ public class Constants { String VIF_FALSE = "ifFalse"; String UNDEFINED = "undefined"; String FLAT = "flat"; +String RIPPLE_ENABLED = "rippleEnabled"; } public interface Value { http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0bf3d925/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 b389d67..09e5e8d 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 @@ -21,13 +21,19 @@ package com.taobao.weex.ui.component; import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; +import android.content.res.ColorStateList; +import android.graphics.Canvas; import android.graphics.Color; +import android.graphics.Path; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; +import android.graphics.RectF; import android.graphics.Shader; +import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; +import android.graphics.drawable.RippleDrawable; import android.os.Build; import android.os.Message; import android.support.annotation.CallSuper; @@ -44,6 +50,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.MarginLayoutParams; import android.widget.FrameLayout; + import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.taobao.weex.ComponentObserver; @@ -67,8 +74,6 @@ import com.taobao.weex.tracing.Stopwatch; import com.taobao.weex.tracing.WXTracing; import com.taobao.weex.ui.IFComponentHolder; import com.taobao.weex.ui.animation.WXAnimationModule; -import com.taobao.weex.ui.component.binding.Statements; -import com.taobao.weex.ui.component.list.WXCell; import com.taobao.weex.ui.component.pesudo.OnActivePseudoListner; import com.taobao.weex.ui.component.pesudo.PesudoStatus; import com.taobao.weex.ui.component.pesudo.TouchActivePseudoListener; @@ -88,6 +93,7 @@ import com.taobao.weex.utils.WXReflectionUtils; import com.taobao.weex.utils.WXResourceUtils; import com.taobao.weex.utils.WXUtils; import com.taobao.weex.utils.WXViewUtils; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -100,6 +106,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import static com.taobao.weex.utils.WXUtils.getBoolean; + /** * abstract component * @@ -124,6 +132,7 @@ public abstract class WXComponent implements IWXObject, IWXActi private Set mGestureType; private BorderDrawable mBackgroundDrawable; + private Drawable mRippleBackground; private int mPreRealWidth = 0; private int mPreRealHeight = 0; private int mPreRealLeft = 0; @@ -432,14 +441,13 @@ public abstract class WXComponent implements IWXObject, IWXActi if (mBackgroundDrawable == null) { mBackgroundDrawable = new BorderDrawable(); if (mHost != null) { -Drawable backgroundDrawable = mHost.getBackground();
[3/6] incubator-weex git commit: Merge remote-tracking branch 'remotes/upstream/release-0.16' into android-feature-ripple-background
Merge remote-tracking branch 'remotes/upstream/release-0.16' into android-feature-ripple-background # Conflicts: # android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/c38239b3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/c38239b3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/c38239b3 Branch: refs/heads/master Commit: c38239b3c00ac644854ce757d73f40df3a3763ba Parents: bdad06d ccf0590 Author: misakuoAuthored: Mon Oct 16 11:10:17 2017 +0800 Committer: misakuo Committed: Mon Oct 16 11:10:17 2017 +0800 -- .github/PULL_REQUEST_TEMPLATE.md|34 +- CONTRIBUTING.md |20 +- README.md | 1 + WeexSDK.podspec | 2 +- android/sdk/libs/armeabi/libweexjsb.so | Bin 22556 -> 22620 bytes android/sdk/libs/armeabi/libweexjsc.so | Bin 325660 -> 342264 bytes android/sdk/libs/armeabi/libweexjss.so | Bin 6754016 -> 6754016 bytes android/sdk/libs/x86/libweexjsc.so | Bin 12121924 -> 12126020 bytes .../main/java/com/taobao/weex/WXSDKEngine.java | 3 +- .../java/com/taobao/weex/WXSDKInstance.java |11 +- .../taobao/weex/bridge/NativeInvokeHelper.java | 2 +- .../java/com/taobao/weex/bridge/WXBridge.java |43 +- .../com/taobao/weex/bridge/WXBridgeManager.java | 184 +- .../java/com/taobao/weex/common/IWXBridge.java | 9 + .../main/java/com/taobao/weex/dom/WXAttr.java |15 +- .../com/taobao/weex/dom/WXCellDomObject.java|11 + .../java/com/taobao/weex/dom/WXDomManager.java | 4 + .../java/com/taobao/weex/dom/WXDomObject.java |19 +- .../main/java/com/taobao/weex/dom/WXEvent.java | 3 + .../taobao/weex/dom/WXRecyclerDomObject.java|50 +- .../com/taobao/weex/dom/WXTextDomObject.java|39 +- .../dom/action/AbstractAddElementAction.java|12 +- .../com/taobao/weex/dom/binding/ELUtils.java|14 +- .../taobao/weex/dom/binding/WXStatement.java|93 +- .../java/com/taobao/weex/dom/flex/CSSNode.java |32 +- .../com/taobao/weex/el/parse/ArrayStack.java| 3 - .../java/com/taobao/weex/el/parse/Block.java| 7 +- .../java/com/taobao/weex/el/parse/Operator.java | 3 +- .../com/taobao/weex/el/parse/Operators.java | 3 - .../java/com/taobao/weex/el/parse/Symbol.java | 3 +- .../java/com/taobao/weex/el/parse/Token.java| 5 +- .../taobao/weex/ui/component/WXComponent.java |23 +- .../weex/ui/component/binding/Layouts.java | 106 +- .../weex/ui/component/binding/Statements.java | 129 +- .../ui/component/list/BasicListComponent.java |82 +- .../taobao/weex/ui/component/list/WXCell.java |30 + .../list/template/CellLifecycleManager.java | 211 - .../component/list/template/DomTreeBuilder.java | 100 + .../component/list/template/TemplateCache.java |30 + .../list/template/TemplateViewHolder.java | 9 + .../list/template/WXRecyclerTemplateList.java | 390 +- .../weex/ui/view/WXBaseCircleIndicator.java |40 +- .../com/taobao/weex/utils/BoxShadowUtil.java|65 +- .../java/com/taobao/weex/utils/WXFileUtils.java |26 + .../java/com/taobao/weex/utils/WXLogUtils.java |17 + .../taobao/weex/utils/WXReflectionUtils.java| 6 + .../taobao/weex/utils/WXSoInstallMgrSdk.java|56 + .../java/com/taobao/weex/WXSDKEngineTest.java |12 +- .../java/com/taobao/weex/el/ParserTest.java | 4 +- .../ui/component/binding/StatementTest.java | 8 +- .../com/taobao/weex/utils/WXFileUtilsTest.java | 8 + .../taobao/weex/bridge/WXWebsocketBridge.java |15 + build/build.js |17 +- build/config.js |15 +- build/karma.vue.conf.js | 2 + dangerfile-android.js | 8 +- dangerfile-ios.js |10 +- dangerfile-jsfm.js | 8 +- dangerfile.js | 6 +- doc/source/cn/guide/set-up-env.md |68 +- .../cn/references/advanced/extend-to-ios.md | 4 +- doc/source/cn/references/components/image.md|24 + doc/source/cn/references/modules/animation.md | 5 +- doc/source/cn/releasenote.md|51 + doc/source/guide/set-up-env.md |82 +- doc/source/references/advanced/extend-to-ios.md | 4 +- doc/source/references/components/image.md |22 + doc/source/references/modules/animation.md | 6 +- doc/source/releasenote.md