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


Java WXLogUtils.d方法代码示例

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


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

示例1: loadConstructor

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
private void loadConstructor(){
  Class<? extends WXComponent> c = mCompClz;
  Constructor<? extends WXComponent> constructor;
  try {
    constructor = c.getConstructor(WXSDKInstance.class, WXDomObject.class, WXVContainer.class);
  } catch (NoSuchMethodException e) {
    WXLogUtils.d("ClazzComponentCreator","Use deprecated component constructor");
    try {
      //compatible deprecated constructor with 4 args
      constructor = c.getConstructor(WXSDKInstance.class, WXDomObject.class, WXVContainer.class, boolean.class);
    } catch (NoSuchMethodException e1) {
      try {
        //compatible deprecated constructor with 5 args
        constructor = c.getConstructor(WXSDKInstance.class, WXDomObject.class, WXVContainer.class,String.class, boolean.class);
      } catch (NoSuchMethodException e2) {
        throw new WXRuntimeException("Can't find constructor of component.");
      }
    }
  }
  mConstructor = constructor;
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:22,代码来源:SimpleComponentHolder.java

示例2: onBindViewHolder

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
     * Bind the component of the position to the holder. Then flush the view.
     *
     * @param holder   viewHolder, which holds reference to the view
     * @param position position of component in WXListComponent
     */
    @Override
    public void onBindViewHolder(ListBaseViewHolder holder, int position) {
        if (holder == null) return;
        holder.setComponentUsing(true);
        WXComponent component = getChild(position);
        if ( component == null
                || (component instanceof WXRefresh)
                || (component instanceof WXLoading)
                || (component.getDomObject()!=null && component.getDomObject().isFixed())
                ) {
            if(WXEnvironment.isApkDebugable()) {
                WXLogUtils.d(TAG, "Bind WXRefresh & WXLoading " + holder);
            }
            return;
        }

        if (component != null&& holder.getComponent() != null
                && holder.getComponent() instanceof WXCell) {

                holder.getComponent().bindData(component);
//              holder.getComponent().refreshData(component);
        }

    }
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:31,代码来源:WXListComponent.java

示例3: generateMethodMap

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
private void generateMethodMap() {
  if(WXEnvironment.isApkDebugable()) {
    WXLogUtils.d(TAG, "extractMethodNames:" + mClazz.getSimpleName());
  }
  ArrayList<String> methods = new ArrayList<>();
  HashMap<String, Invoker> methodMap = new HashMap<>();
  try {
    for (Method method : mClazz.getMethods()) {
      // iterates all the annotations available in the method
      for (Annotation anno : method.getDeclaredAnnotations()) {
        if (anno != null && anno instanceof WXModuleAnno) {
          methods.add(method.getName());
          methodMap.put(method.getName(), new MethodInvoker(method));
          break;
        }
      }
    }
  } catch (Throwable e) {
    WXLogUtils.e("[WXModuleManager] extractMethodNames:", e);
  }
  mMethods = methods;
  mMethodMap = methodMap;
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:24,代码来源:TypeModuleFactory.java

示例4: onLoadMore

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void onLoadMore(int offScreenY) {
  try {
    String offset = getDomObject().getAttrs().getLoadMoreOffset();

    if (TextUtils.isEmpty(offset)) {
      offset = "0";
    }
    float offsetParsed = WXViewUtils.getRealPxByWidth(Integer.parseInt(offset),getInstance().getInstanceViewPortWidth());

    if (offScreenY < offsetParsed) {

      if (mListCellCount != mChildren.size()
          || mForceLoadmoreNextTime) {
        fireEvent(Constants.Event.LOADMORE);
        mListCellCount = mChildren.size();
        mForceLoadmoreNextTime = false;
      }
    }
  } catch (Exception e) {
    WXLogUtils.d(TAG + "onLoadMore :", e);
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:24,代码来源:BasicListComponent.java

示例5: onBindViewHolder

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
   * Bind the component of the position to the holder. Then flush the view.
   *
   * @param holder   viewHolder, which holds reference to the view
   * @param position position of component in WXListComponent
   */
  @Override
  public void onBindViewHolder(ListBaseViewHolder holder, int position) {
    if (holder == null) return;
    holder.setComponentUsing(true);
    WXComponent component = getChild(position);
    if (component == null
        || (component instanceof WXRefresh)
        || (component instanceof WXLoading)
        || (component.getDomObject() != null && component.getDomObject().isFixed())
        ) {
      if (WXEnvironment.isApkDebugable()) {
        WXLogUtils.d(TAG, "Bind WXRefresh & WXLoading " + holder);
      }
      return;
    }

    if (holder.getComponent() != null && holder.getComponent() instanceof WXCell) {
      holder.getComponent().bindData(component);
//              holder.getComponent().refreshData(component);
    }

  }
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:29,代码来源:BasicListComponent.java

示例6: onLoadMore

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void onLoadMore(int offScreenY) {
  try {
    String offset = getDomObject().getAttrs().getLoadMoreOffset();

    if (TextUtils.isEmpty(offset)) {
      offset = "0";
    }

    if (offScreenY < Integer.parseInt(offset)) {
      String loadMoreRetry = getDomObject().getAttrs().getLoadMoreRetry();
      if (loadMoreRetry == null) {
        loadMoreRetry = mLoadMoreRetry;
      }

      if (mListCellCount != mChildren.size()
          || mLoadMoreRetry == null || !mLoadMoreRetry.equals(loadMoreRetry)) {
        fireEvent(Constants.Event.LOADMORE);
        mListCellCount = mChildren.size();
        mLoadMoreRetry = loadMoreRetry;
      }
    }
  } catch (Exception e) {
    WXLogUtils.d(TAG + "onLoadMore :", e);
  }
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:27,代码来源:BasicListComponent.java

示例7: onLoadMore

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
 * Handle loadMore Event.when Scroller has bind loadMore Event and set the attr of loadMoreOffset
 * it will tell the JS to handle the event of onLoadMore;
 * @param scrollView  the WXScrollView
 * @param x the X direction
 * @param y the Y direction
 */
protected void onLoadMore(WXScrollView scrollView, int x, int y) {
  try {
    String offset = getDomObject().getAttrs().getLoadMoreOffset();

    if (TextUtils.isEmpty(offset)) {
      return;
    }

    int contentH = scrollView.getChildAt(0).getHeight();
    int scrollerH = scrollView.getHeight();
    int offScreenY = contentH - y - scrollerH;
    if (offScreenY < Integer.parseInt(offset)) {
      if (WXEnvironment.isApkDebugable()) {
        WXLogUtils.d("[WXScroller-onScroll] offScreenY :" + offScreenY);
      }
      String loadMoreRetry = getDomObject().getAttrs().getLoadMoreRetry();
      if (loadMoreRetry == null) {
        loadMoreRetry = mLoadMoreRetry;
      }
      if (mContentHeight != contentH || !mLoadMoreRetry.equals(loadMoreRetry)) {
        fireEvent(Constants.Event.LOADMORE);
        mContentHeight = contentH;
        mLoadMoreRetry = loadMoreRetry;
      }
    }
  } catch (Exception e) {
    WXLogUtils.d("[WXScroller-onScroll] ", e);
  }

}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:38,代码来源:WXScroller.java

示例8: callRemoveElement

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public int callRemoveElement(String instanceId, String ref, String callback) {

    if (WXEnvironment.isApkDebugable()) {
      mLodBuilder.append("[WXBridgeManager] callRemoveElement >>>> instanceId:").append(instanceId)
              .append(", ref:").append(ref);
      WXLogUtils.d(mLodBuilder.substring(0));
      mLodBuilder.setLength(0);
    }

    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
      return IWXBridge.DESTROY_INSTANCE;
    }

    try {
      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
        WXDomModule domModule = getDomModule(instanceId);
        Action action = Actions.getRemoveElement(ref);
        domModule.postAction((DOMAction)action, false);
      }
    } catch (Exception e) {
      WXLogUtils.e("[WXBridgeManager] callRemoveElement exception: ", e);
      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT,"[WXBridgeManager] callRemoveElement exception " + e.getCause());
    }

    if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
      return IWXBridge.INSTANCE_RENDERING_ERROR;
    }
    // get next tick
    getNextTick(instanceId, callback);
    return IWXBridge.INSTANCE_RENDERING;
  }
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:32,代码来源:WXBridgeManager.java

示例9: onLoadMore

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
 * Handle loadMore Event.when Scroller has bind loadMore Event and set the attr of loadMoreOffset
 * it will tell the JS to handle the event of onLoadMore;
 * @param scrollView  the WXScrollView
 * @param x the X direction
 * @param y the Y direction
 */
protected void onLoadMore(WXScrollView scrollView, int x, int y) {
  try {
    String offset = getDomObject().getAttrs().getLoadMoreOffset();
    if (TextUtils.isEmpty(offset)) {
      return;
    }
    int offsetInt = (int)WXViewUtils.getRealPxByWidth(Float.parseFloat(offset), getInstance().getInstanceViewPortWidth());

    int contentH = scrollView.getChildAt(0).getHeight();
    int scrollerH = scrollView.getHeight();
    int offScreenY = contentH - y - scrollerH;
    if (offScreenY < offsetInt) {
      if (WXEnvironment.isApkDebugable()) {
        WXLogUtils.d("[WXScroller-onScroll] offScreenY :" + offScreenY);
      }
      if (mContentHeight != contentH || mForceLoadmoreNextTime) {
        fireEvent(Constants.Event.LOADMORE);
        mContentHeight = contentH;
        mForceLoadmoreNextTime = false;
      }
    }
  } catch (Exception e) {
    WXLogUtils.d("[WXScroller-onScroll] ", e);
  }

}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:34,代码来源:WXScroller.java

示例10: clearWatch

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void clearWatch(String watchId) {
  WXLogUtils.d("into--[clearWatch] mWatchId:" + watchId);
  if (mWXSDKInstance == null || mWXSDKInstance.isDestroy() || mLocationManager == null) {
    return;
  }
  if (ActivityCompat.checkSelfPermission(mWXSDKInstance.getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(mWXSDKInstance.getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
    WXLocationListener listener = mRegisterSucCallbacks.get(watchId);
    if (listener != null) {
      listener.destroy();
      mLocationManager.removeUpdates(listener);
    }
    mRegisterSucCallbacks.remove(watchId);
  }
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:16,代码来源:DefaultLocation.java

示例11: generate

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
private synchronized void generate(){
  if(WXEnvironment.isApkDebugable()) {
    WXLogUtils.d(TAG, "Generate Component:" + mClz.getSimpleName());
  }

  Pair<Map<String, Invoker>, Map<String, Invoker>> methodPair = getMethods(mClz);
  mPropertyInvokers = methodPair.first;
  mMethodInvokers = methodPair.second;
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:10,代码来源:SimpleComponentHolder.java

示例12: invokeDestroyInstance

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
private void invokeDestroyInstance(String instanceId) {
  try {
    if (WXEnvironment.isApkDebugable()) {
      WXLogUtils.d("destroyInstance >>>> instanceId:" + instanceId);
    }
    WXJSObject instanceIdObj = new WXJSObject(WXJSObject.String,
                                              instanceId);
    WXJSObject[] args = {instanceIdObj};
    invokeExecJS(instanceId, null, METHOD_DESTROY_INSTANCE, args);
  } catch (Throwable e) {
    String err = "[WXBridgeManager] invokeDestroyInstance " + e.getCause();
    commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
    WXLogUtils.e(err);
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:16,代码来源:WXBridgeManager.java

示例13: isSupport

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Deprecated
/**
 * Use {@link #isHardwareSupport()} if you want to see whether current hardware support Weex.
 */
public static boolean isSupport() {
  boolean isInitialized = WXSDKEngine.isInitialized();
  if(WXEnvironment.isApkDebugable()){
    WXLogUtils.d("WXSDKEngine.isInitialized():" + isInitialized);
  }
  return isHardwareSupport() && isInitialized;
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:12,代码来源:WXEnvironment.java

示例14: replacePageView

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void replacePageView(View oldView, View newView) {
  if (WXEnvironment.isApkDebugable()) {
    WXLogUtils.d("onPageSelected >>>> replacePageView");
  }
  if (views == null) {
    views = new ArrayList<>();
  }

  int index = views.indexOf(oldView);
  views.remove(index);
  views.add(index, newView);
  this.realCount = views.size();
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:14,代码来源:WXCirclePageAdapter.java

示例15: destroy

import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void destroy() {
  if (handler != null) {
    WXLogUtils.d(TAG, "Timer Module removeAllMessages: ");
    handler.removeCallbacksAndMessages(null);
    antiIntAutoBoxing.clear();
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:9,代码来源:WXTimerModule.java


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