本文整理汇总了Java中com.taobao.weex.utils.WXLogUtils.eTag方法的典型用法代码示例。如果您正苦于以下问题:Java WXLogUtils.eTag方法的具体用法?Java WXLogUtils.eTag怎么用?Java WXLogUtils.eTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.weex.utils.WXLogUtils
的用法示例。
在下文中一共展示了WXLogUtils.eTag方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateViewType
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
* generate viewtype by component
* @param component
* @return
*/
private int generateViewType(WXComponent component) {
long id;
try {
id = Integer.parseInt(component.getDomObject().getRef());
String type = component.getDomObject().getAttrs().getScope();
if (!TextUtils.isEmpty(type)) {
if (mRefToViewType == null) {
mRefToViewType = new ArrayMap<>();
}
if (!mRefToViewType.containsKey(type)) {
mRefToViewType.put(type, id);
}
id = mRefToViewType.get(type);
}
} catch (RuntimeException e) {
WXLogUtils.eTag(TAG, e);
id = RecyclerView.NO_ID;
WXLogUtils.e(TAG, "getItemViewType: NO ID, this will crash the whole render system of WXListRecyclerView");
}
return (int) id;
}
示例2: generateViewType
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
* generate viewtype by component
*
* @param component
* @return
*/
private int generateViewType(WXComponent component) {
long id;
try {
id = Integer.parseInt(component.getDomObject().getRef());
String type = component.getDomObject().getAttrs().getScope();
if (!TextUtils.isEmpty(type)) {
if (mRefToViewType == null) {
mRefToViewType = new ArrayMap<>();
}
if (!mRefToViewType.containsKey(type)) {
mRefToViewType.put(type, id);
}
id = mRefToViewType.get(type);
}
} catch (RuntimeException e) {
WXLogUtils.eTag(TAG, e);
id = RecyclerView.NO_ID;
WXLogUtils.e(TAG, "getItemViewType: NO ID, this will crash the whole render system of WXListRecyclerView");
}
return (int) id;
}
示例3: push
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@WXModuleAnno
public void push(String param, final String callbackId) {
if (!TextUtils.isEmpty(param)) {
if (WXSDKEngine.getActivityNavBarSetter() != null) {
if (WXSDKEngine.getActivityNavBarSetter().push(param)) {
WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
MSG_SUCCESS);
return;
}
}
try {
JSONObject jsonObject = new JSONObject(param);
String url = jsonObject.optString(URL, "");
if (!TextUtils.isEmpty(url)) {
Uri rawUri = Uri.parse(url);
String scheme = rawUri.getScheme();
Uri.Builder builder = rawUri.buildUpon();
if (TextUtils.isEmpty(scheme)) {
builder.scheme("http");
}
Intent intent = new Intent(Intent.ACTION_VIEW, builder.build());
intent.addCategory(WEEX);
intent.putExtra(INSTANCE_ID, mWXSDKInstance.getInstanceId());
mWXSDKInstance.getContext().startActivity(intent);
WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
MSG_SUCCESS);
}
} catch (Exception e) {
WXLogUtils.eTag(TAG, e);
WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
MSG_FAILED);
}
}
WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
MSG_FAILED);
}
示例4: warmUpTextLayoutCache
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
* As warming up TextLayoutCache done in the DOM thread may manipulate UI operation,
there may be some exception, in which case the exception is ignored. After all,
this is just a warm up operation.
* @return false for warm up failure, otherwise returns true.
*/
private boolean warmUpTextLayoutCache(Layout layout) {
boolean result;
try {
layout.draw(DUMMY_CANVAS);
result = true;
} catch (Exception e) {
WXLogUtils.eTag(TAG, e);
result = false;
}
return result;
}
示例5: push
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@JSMethod(uiThread = true)
public void push(String param, JSCallback callback) {
if (!TextUtils.isEmpty(param)) {
if (WXSDKEngine.getActivityNavBarSetter() != null) {
if (WXSDKEngine.getActivityNavBarSetter().push(param)) {
callback.invoke(MSG_SUCCESS);
return;
}
}
try {
JSONObject jsonObject = JSON.parseObject(param);
String url = jsonObject.getString(URL);
if (!TextUtils.isEmpty(url)) {
Uri rawUri = Uri.parse(url);
String scheme = rawUri.getScheme();
Uri.Builder builder = rawUri.buildUpon();
if (TextUtils.isEmpty(scheme)) {
builder.scheme(Constants.Scheme.HTTP);
}
Intent intent = new Intent(Intent.ACTION_VIEW, builder.build());
intent.addCategory(WEEX);
intent.putExtra(INSTANCE_ID, mWXSDKInstance.getInstanceId());
mWXSDKInstance.getContext().startActivity(intent);
callback.invoke(MSG_SUCCESS);
}
} catch (Exception e) {
WXLogUtils.eTag(TAG, e);
callback.invoke(MSG_FAILED);
}
}
callback.invoke(MSG_FAILED);
}
示例6: push
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@JSMethod(uiThread = true)
public void push(String param, JSCallback callback) {
if (!TextUtils.isEmpty(param)) {
if (WXSDKEngine.getActivityNavBarSetter() != null) {
if (WXSDKEngine.getActivityNavBarSetter().push(param)) {
if (callback != null) {
callback.invoke(MSG_SUCCESS);
}
return;
}
}
try {
JSONObject jsonObject = JSON.parseObject(param);
String url = jsonObject.getString(URL);
if (!TextUtils.isEmpty(url)) {
Uri rawUri = Uri.parse(url);
String scheme = rawUri.getScheme();
Uri.Builder builder = rawUri.buildUpon();
if (TextUtils.isEmpty(scheme)) {
builder.scheme(Constants.Scheme.HTTP);
}
Intent intent = new Intent(Intent.ACTION_VIEW, builder.build());
intent.addCategory(WEEX);
intent.putExtra(INSTANCE_ID, mWXSDKInstance.getInstanceId());
mWXSDKInstance.getContext().startActivity(intent);
if (callback != null) {
callback.invoke(MSG_SUCCESS);
}
}
} catch (Exception e) {
WXLogUtils.eTag(TAG, e);
if (callback != null) {
callback.invoke(MSG_FAILED);
}
}
} else if (callback != null) {
callback.invoke(MSG_FAILED);
}
}
示例7: pushNative
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@JSMethod
public void pushNative(String encodeParam, JSCallback callback) {
if (TextUtils.isEmpty(encodeParam)) {
return;
}
try {
JSONObject options = JSON.parseObject(encodeParam);
String url = "";
UWXTheme.NavBar navBar = null;
JSONObject param = null;
if (options.containsKey(UWXBundleInfo.KEY_URL)) {
url = options.getString(UWXBundleInfo.KEY_URL);
}
if (options.containsKey(UWXBundleInfo.KEY_NAV_BAR)) {
String _navBar = options.getString(UWXBundleInfo.KEY_NAV_BAR);
if (!TextUtils.isEmpty(_navBar)) {
navBar = JSON.parseObject(_navBar, UWXTheme.NavBar.class);
}
}
if (options.containsKey(UWXBundleInfo.KEY_PARAM)) {
param = options.getJSONObject(UWXBundleInfo.KEY_PARAM);
}
UWLog.v("params=" + encodeParam);
if (!TextUtils.isEmpty(url)) {
UWXNavigatorAdapter navigatorAdapter = UWXSDKManager.getInstance().getNavigatorAdapter();
if (navigatorAdapter != null) {
navigatorAdapter.pushNative((Activity) mWXSDKInstance.getContext(),url ,param);
if (callback != null) {
callback.invoke(MSG_SUCCESS);
}
}
} else {
callback.invoke(MSG_FAILED);
}
} catch (Exception e) {
WXLogUtils.eTag(TAG, e);
if (callback != null) {
callback.invoke(MSG_FAILED);
}
}
}
示例8: push
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@JSMethod
public void push(String encodeParam, JSCallback callback) {
if (TextUtils.isEmpty(encodeParam)) {
return;
}
try {
JSONObject options = JSON.parseObject(encodeParam);
String url = "";
UWXTheme.NavBar navBar = null;
JSONObject param = null;
boolean animated = false;
if (options.containsKey(UWXBundleInfo.KEY_URL)) {
url = options.getString(UWXBundleInfo.KEY_URL);
}
if (options.containsKey(UWXBundleInfo.KEY_NAV_BAR)) {
String _navBar = options.getString(UWXBundleInfo.KEY_NAV_BAR);
if (!TextUtils.isEmpty(_navBar)) {
navBar = JSON.parseObject(_navBar, UWXTheme.NavBar.class);
}
}
if (options.containsKey(UWXBundleInfo.KEY_PARAM)) {
param = options.getJSONObject(UWXBundleInfo.KEY_PARAM);
}
if (options.containsKey(UWXBundleInfo.KEY_SCENE_CONFIGS)) {
animated = options.getBoolean(UWXBundleInfo.KEY_SCENE_CONFIGS);
}
UWLog.v("params=" + encodeParam);
UWXTheme theme = null;
if (navBar == null) {
theme = UWXThemeManager.getInstance().getPageTheme();
} else {
UWXThemeManager.getInstance().getPageTheme().setNavBar(navBar);
theme = UWXThemeManager.getInstance().getPageTheme();
}
if (!TextUtils.isEmpty(url)) {
UWXJumpUtil.openPageByUrl((Activity) mWXSDKInstance.getContext(), url, param, theme);
if (callback != null) {
callback.invoke(MSG_SUCCESS);
}
} else {
callback.invoke(MSG_FAILED);
}
} catch (Exception e) {
WXLogUtils.eTag(TAG, e);
if (callback != null) {
callback.invoke(MSG_FAILED);
}
}
}