weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sospar...@apache.org
Subject incubator-weex git commit: + [android] add newNestedInstance method in WXSDKInstance
Date Wed, 26 Jul 2017 08:50:53 GMT
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev ee9b1c7d2 -> bf9fe0dc2


+ [android] add newNestedInstance method in WXSDKInstance


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/bf9fe0dc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/bf9fe0dc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/bf9fe0dc

Branch: refs/heads/0.15-dev
Commit: bf9fe0dc284e7ba3881b2e6701127ce08572bdb5
Parents: ee9b1c7
Author: lybeen <ilybeen@gmail.com>
Authored: Wed Jul 26 16:42:38 2017 +0800
Committer: lybeen <ilybeen@gmail.com>
Committed: Wed Jul 26 16:42:38 2017 +0800

----------------------------------------------------------------------
 android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bf9fe0dc/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 a8d8a60..7f03cc2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -250,14 +250,18 @@ public class WXSDKInstance implements IWXActivityStateListener,DomContext,
View.
     mNestedInstanceInterceptor = interceptor;
   }
 
-  public WXSDKInstance createNestedInstance(NestedContainer container){
-    WXSDKInstance sdkInstance = new WXSDKInstance(mContext);
+  public final WXSDKInstance createNestedInstance(NestedContainer container){
+    WXSDKInstance sdkInstance = newNestedInstance();
     if(mNestedInstanceInterceptor != null){
       mNestedInstanceInterceptor.onCreateNestInstance(sdkInstance,container);
     }
     return sdkInstance;
   }
 
+  protected WXSDKInstance newNestedInstance() {
+    return new WXSDKInstance(mContext);
+  }
+
   public void addOnInstanceVisibleListener(OnInstanceVisibleListener l){
     mVisibleListeners.add(l);
   }


Mime
View raw message