当前位置: 首页>>代码示例>>Java>>正文


Java WXLogUtils.e方法代码示例

本文整理汇总了Java中com.taobao.weex.utils.WXLogUtils.e方法的典型用法代码示例。如果您正苦于以下问题:Java WXLogUtils.e方法的具体用法?Java WXLogUtils.e怎么用?Java WXLogUtils.e使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.taobao.weex.utils.WXLogUtils的用法示例。


在下文中一共展示了WXLogUtils.e方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerDomObject

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static boolean registerDomObject(String type, Class<? extends WXDomObject> clazz) throws WXException {
  if (clazz == null || TextUtils.isEmpty(type)) {
    return false;
  }

  if (sDom.containsKey(type)) {
    if (WXEnvironment.isApkDebugable()) {
      throw new WXException("WXDomRegistry had duplicate Dom:" + type);
    } else {
      WXLogUtils.e("WXDomRegistry had duplicate Dom: " + type);
      return false;
    }
  }
  sDom.put(type, clazz);
  return true;
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:17,代码来源:WXDomRegistry.java

示例2: createAnimationBean

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
private WXAnimationBean createAnimationBean(String ref,Map<String, Object> style){
  if (style != null) {
    try {
      Object transform = style.get(WXDomObject.TRANSFORM);
      if (transform instanceof String && !TextUtils.isEmpty((String) transform)) {
        String transformOrigin = (String) style.get(WXDomObject.TRANSFORM_ORIGIN);
        WXAnimationBean animationBean = new WXAnimationBean();
        WXDomObject domObject = mRegistry.get(ref);
        int width = (int) domObject.getLayoutWidth();
        int height = (int) domObject.getLayoutHeight();
        animationBean.styles = new WXAnimationBean.Style();
        animationBean.styles.init(transformOrigin, (String) transform, width, height,WXSDKManager.getInstance().getSDKInstance(mInstanceId).getViewPortWidth());
        return animationBean;
      }
    }catch (RuntimeException e){
      WXLogUtils.e("", e);
      return null;
    }
  }
  return null;
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:22,代码来源:WXDomStatement.java

示例3: sendRequest

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
private void sendRequest(Options options,ResponseCallback callback,JSCallback progressCallback){
  WXRequest wxRequest = new WXRequest();
  wxRequest.method = options.getMethod();
  wxRequest.url = mWXSDKInstance.rewriteUri(Uri.parse(options.getUrl()), URIAdapter.REQUEST).toString();
  wxRequest.body = options.getBody();
  wxRequest.timeoutMs = options.getTimeout();

  if(options.getHeaders()!=null)
  if (wxRequest.paramMap == null) {
    wxRequest.paramMap = options.getHeaders();
  }else{
    wxRequest.paramMap.putAll(options.getHeaders());
  }


  IWXHttpAdapter adapter = ( mAdapter==null && mWXSDKInstance != null) ? mWXSDKInstance.getWXHttpAdapter() : mAdapter;
  if (adapter != null) {
    adapter.sendRequest(wxRequest, new StreamHttpListener(callback,progressCallback));
  }else{
    WXLogUtils.e("WXStreamModule","No HttpAdapter found,request failed.");
  }
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:23,代码来源:WXStreamModule.java

示例4: onHostViewInitialized

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
protected void onHostViewInitialized(T host) {
  super.onHostViewInitialized(host);

  WXRecyclerView recyclerView = host.getInnerView();
  if (recyclerView == null || recyclerView.getAdapter() == null) {
    WXLogUtils.e(TAG, "RecyclerView is not found or Adapter is not bound");
    return;
  }

  if (mChildren == null) {
    WXLogUtils.e(TAG, "children is null");
    return;
  }

  mDragHelper = new DefaultDragHelper(mChildren, recyclerView, new EventTrigger() {
    @Override
    public void triggerEvent(String type, Map<String, Object> args) {
      fireEvent(type, args);
    }
  });

  mTriggerType = getTriggerType(getDomObject());
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:25,代码来源:BasicListComponent.java

示例5: performRemoveItem

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
private boolean performRemoveItem(String key) {
    SQLiteDatabase database = mDatabaseSupplier.getDatabase();
    if (database == null) {
        return false;
    }

    int count = 0;
    try {
        count = database.delete(WXSQLiteOpenHelper.TABLE_STORAGE,
                WXSQLiteOpenHelper.COLUMN_KEY + "=?",
                new String[]{key});
    } catch (Exception e) {
        WXLogUtils.e(WXSQLiteOpenHelper.TAG_STORAGE, "DefaultWXStorage occurred an exception when execute removeItem:" + e.getMessage());
        return false;
    }
    return count == 1;
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:18,代码来源:DefaultWXStorage.java

示例6: getColumnGap

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public float getColumnGap() {

    Object obj = get(Constants.Name.COLUMN_GAP);
    if (obj == null) {
      return Constants.Value.COLUMN_GAP_NORMAL;
    }

    String value = String.valueOf(obj);
    if (Constants.Name.NORMAL.equals(value)) {
      return Constants.Value.COLUMN_GAP_NORMAL;
    }

    try {
      float columnGap = Float.parseFloat(value);
      return columnGap >= 0 ? columnGap : Constants.Value.AUTO;
    } catch (Exception e) {
      WXLogUtils.e("[WXAttr] getColumnGap:", e);
    }
    return Constants.Value.COLUMN_GAP_NORMAL;
  }
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:21,代码来源:WXAttr.java

示例7: callCreateFinish

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
 * JavaScript uses this methods to call Android code
 *
 * @param instanceId
 * @param tasks
 * @param callback
 */

public int callCreateFinish(String instanceId, byte [] tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callCreateFinish(instanceId, callback);
  } catch (Throwable e) {
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callCreateFinish throw exception:" + e.getMessage());
    }
  }
  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  return errorCode;
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:29,代码来源:WXBridge.java

示例8: createBodyOnDomThread

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
WXComponent createBodyOnDomThread(WXDomObject dom) {
  if (mWXSDKInstance == null) {
    return null;
  }
  WXDomObject domObject = new WXDomObject();
  WXDomObject.prepareGod(domObject);
  mGodComponent = (WXVContainer) WXComponentFactory.newInstance(mWXSDKInstance, domObject, null);
  mGodComponent.createView(null, -1);
  if (mGodComponent == null) {
    if (WXEnvironment.isApkDebugable()) {
      WXLogUtils.e("rootView failed!");
    }
    //TODO error callback
    return null;
  }
  FrameLayout frameLayout = (FrameLayout) mGodComponent.getHostView();
  ViewGroup.LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
  frameLayout.setLayoutParams(layoutParams);
  frameLayout.setBackgroundColor(Color.TRANSPARENT);

  WXComponent component = generateComponentTree(dom, mGodComponent);
  mGodComponent.addChild(component);
  mRegistry.put(component.getRef(), component);
  return component;
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:26,代码来源:WXRenderStatement.java

示例9: callNative

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public int callNative(String instanceId, String tasks, String callback) {
  long start = System.currentTimeMillis();
  WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
  if(instance != null) {
    instance.firstScreenCreateInstanceTime(start);
  }
  int errorCode = IWXBridge.INSTANCE_RENDERING;
  try {
    errorCode = WXBridgeManager.getInstance().callNative(instanceId, tasks, callback);
  }catch (Throwable e){
    //catch everything during call native.
    if(WXEnvironment.isApkDebugable()){
      WXLogUtils.e(TAG,"callNative throw exception:"+e.getMessage());
    }
  }

  if(instance != null) {
    instance.callNativeTime(System.currentTimeMillis() - start);
  }
  if(WXEnvironment.isApkDebugable()){
    if(errorCode == IWXBridge.DESTROY_INSTANCE){
      WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
    }
  }
  return errorCode;
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:27,代码来源:WXBridge.java

示例10: getAppVersionName

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
 * Get the version of the current app.
 */
private static String getAppVersionName() {
  String versionName = "";
  PackageManager manager;
  PackageInfo info = null;
  try {
    manager = sApplication.getPackageManager();
    info = manager.getPackageInfo(sApplication.getPackageName(), 0);
    versionName = info.versionName;
  } catch (Exception e) {
    WXLogUtils.e("WXEnvironment getAppVersionName Exception: ", e);
  }
  return versionName;
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:17,代码来源:WXEnvironment.java

示例11: getDrawableByName

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static Drawable getDrawableByName(Context context, String drawableName) {
    Resources resources = context.getResources();
    if (TextUtils.isEmpty(drawableName)) {
        WXLogUtils.e("drawableName is null");
        return null;
    }
    int id = resources.getIdentifier(drawableName, "drawable", context.getPackageName());
    return id == 0 ? null : ResourcesCompat.getDrawable(resources, id, null);
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:10,代码来源:ImageLoadUtil.java

示例12: readAsString

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
static String readAsString(byte[] data,String cType){
  String charset = "utf-8";
  if(cType != null){
    Matcher matcher = CHARSET_PATTERN.matcher(cType.toLowerCase());
    if(matcher.find()){
      charset = matcher.group(1);
    }
  }
  try {
    return new String(data,charset);
  } catch (UnsupportedEncodingException e) {
    WXLogUtils.e("", e);
    return new String(data);
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:16,代码来源:WXStreamModule.java

示例13: WXScrollView

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public WXScrollView(Context context) {
  super(context);
  mScrollViewListeners = new ArrayList<>();
  init();
  try {
    WXReflectionUtils.setValue(this, "mMinimumVelocity", 5);
  } catch (Exception e) {
    WXLogUtils.e("[WXScrollView] WXScrollView: ", e);
  }
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:11,代码来源:WXScrollView.java

示例14: alert

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@JSMethod(uiThread = true)
public void alert(String param, final JSCallback callback) {

  if (mWXSDKInstance.getContext() instanceof Activity) {

    String message = "";
    String okTitle = OK;
    if (!TextUtils.isEmpty(param)) {
      try {
        param = URLDecoder.decode(param, "utf-8");
        JSONObject jsObj = JSON.parseObject(param);
        message = jsObj.getString(MESSAGE);
        okTitle = jsObj.getString(OK_TITLE);
      } catch (Exception e) {
        WXLogUtils.e("[WXModalUIModule] alert param parse error ", e);
      }
    }
    if (TextUtils.isEmpty(message)) {
      message = "";
    }
    AlertDialog.Builder builder = new AlertDialog.Builder(mWXSDKInstance.getContext());
    builder.setMessage(message);

    final String okTitle_f = TextUtils.isEmpty(okTitle) ? OK : okTitle;
    builder.setPositiveButton(okTitle_f, new OnClickListener() {
      @Override
      public void onClick(DialogInterface dialog, int which) {
        if (callback != null) {
          callback.invoke(okTitle_f);
        }
      }
    });
    AlertDialog alertDialog = builder.create();
    alertDialog.setCanceledOnTouchOutside(false);
    alertDialog.show();
    tracking(alertDialog);
  } else {
    WXLogUtils.e("[WXModalUIModule] when call alert mWXSDKInstance.getContext() must instanceof Activity");
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:41,代码来源:WXModalUIModule.java

示例15: close

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void close() {
    try {
        mDatabaseSupplier.closeDatabase();
        if (mExecutorService != null) {
            mExecutorService.shutdown();
            mExecutorService = null;
        }
    } catch (Exception e) {
        WXLogUtils.e(WXSQLiteOpenHelper.TAG_STORAGE, e.getMessage());
    }
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:13,代码来源:DefaultWXStorage.java


注:本文中的com.taobao.weex.utils.WXLogUtils.e方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。