Skip to content

Commit

Permalink
* [html5] merge form html5-feature-0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanks10100 committed Jan 3, 2017
2 parents 295e4c2 + b5b600d commit 3a36f30
Show file tree
Hide file tree
Showing 764 changed files with 157,605 additions and 53,677 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language: objective-c
script: xcodebuild -project ios/sdk/WeexSDK.xcodeproj test -scheme WeexSDKTests CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination 'platform=iOS Simulator,name=iPhone 6'
6 changes: 5 additions & 1 deletion .wwprc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"a",
"embed",
"spinner",
"web"
"web",
"neighbor"
],
"apis": [
"animation",
Expand All @@ -32,5 +33,8 @@
"storage",
"stream",
"webview"
],
"npm": [
"weex-picker"
]
}
1 change: 1 addition & 0 deletions android/commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dependencies {
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.fresco:fresco:0.10.0'

provided 'com.taobao.android:weex_analyzer:0.1.0.5'

testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-core:1.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,18 @@
*/
package com.alibaba.weex.commons;

import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import com.alibaba.weex.commons.util.ScreenUtil;

import com.alibaba.weex.commons.util.AssertUtil;
import com.alibaba.weex.commons.util.ScreenUtil;
import com.taobao.weex.IWXRenderListener;
import com.taobao.weex.WXSDKInstance;
import com.taobao.weex.common.WXRenderStrategy;
Expand All @@ -228,11 +232,17 @@ public abstract class AbstractWeexActivity extends AppCompatActivity implements
private ViewGroup mContainer;
private WXSDKInstance mInstance;

protected WXAnalyzerDelegate mWxAnalyzerDelegate;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
createWeexInstance();
mInstance.onActivityCreate();

mWxAnalyzerDelegate = new WXAnalyzerDelegate(this);
mWxAnalyzerDelegate.onCreate();
getWindow().setFormat(PixelFormat.TRANSLUCENT);
}

protected final void setContainer(ViewGroup container){
Expand Down Expand Up @@ -307,6 +317,9 @@ public void onStart() {
if(mInstance!=null){
mInstance.onActivityStart();
}
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onStart();
}
}

@Override
Expand All @@ -315,6 +328,9 @@ public void onResume() {
if(mInstance!=null){
mInstance.onActivityResume();
}
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onResume();
}
}

@Override
Expand All @@ -323,6 +339,9 @@ public void onPause() {
if(mInstance!=null){
mInstance.onActivityPause();
}
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onPause();
}
}

@Override
Expand All @@ -331,6 +350,9 @@ public void onStop() {
if(mInstance!=null){
mInstance.onActivityStop();
}
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onStop();
}
}

@Override
Expand All @@ -339,10 +361,20 @@ public void onDestroy() {
if(mInstance!=null){
mInstance.onActivityDestroy();
}
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onDestroy();
}
}

@Override
public void onViewCreated(WXSDKInstance wxsdkInstance, View view) {
View wrappedView = null;
if(mWxAnalyzerDelegate != null){
wrappedView = mWxAnalyzerDelegate.onWeexViewCreated(wxsdkInstance,view);
}
if(wrappedView != null){
view = wrappedView;
}
if (mContainer != null) {
mContainer.removeAllViews();
mContainer.addView(view);
Expand All @@ -355,4 +387,26 @@ public void onViewCreated(WXSDKInstance wxsdkInstance, View view) {
public void onRefreshSuccess(WXSDKInstance wxsdkInstance, int i, int i1) {

}

@Override
@CallSuper
public void onRenderSuccess(WXSDKInstance instance, int width, int height) {
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onWeexRenderSuccess(instance);
}
}

@Override
@CallSuper
public void onException(WXSDKInstance instance, String errCode, String msg) {
if(mWxAnalyzerDelegate != null){
mWxAnalyzerDelegate.onException(instance,errCode,msg);
}
}

@Override
@CallSuper
public boolean onKeyUp(int keyCode, KeyEvent event) {
return (mWxAnalyzerDelegate != null && mWxAnalyzerDelegate.onKeyUp(keyCode,event)) || super.onKeyUp(keyCode, event);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {

@Override
public void onRenderSuccess(WXSDKInstance instance, int width, int height) {

super.onRenderSuccess(instance,width,height);
}

@Override
public void onException(WXSDKInstance instance, String errCode, String msg) {

super.onException(instance,errCode,msg);
}
}
Loading

0 comments on commit 3a36f30

Please sign in to comment.