本文整理汇总了Java中com.taobao.weex.utils.WXLogUtils.w方法的典型用法代码示例。如果您正苦于以下问题:Java WXLogUtils.w方法的具体用法?Java WXLogUtils.w怎么用?Java WXLogUtils.w使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.weex.utils.WXLogUtils
的用法示例。
在下文中一共展示了WXLogUtils.w方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onActivityCreate
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**Hook Activity life cycle callback begin***/
public static void onActivityCreate(String instanceId){
Map<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
module.onActivityCreate();
} else {
WXLogUtils.w("onActivityCreate can not find the " + key + " module");
}
}
}
}
示例2: onActivityCreate
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**Hook Activity life cycle callback begin***/
public static void onActivityCreate(String instanceId){
HashMap<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
module.onActivityCreate();
} else {
WXLogUtils.w("onActivityCreate can not find the " + key + " module");
}
}
}
}
示例3: getNaturalWidth
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public int getNaturalWidth() {
Drawable drawable = getDrawable();
if (drawable != null) {
if (drawable instanceof ImageDrawable) {
return ((ImageDrawable) drawable).getBitmapWidth();
} else if (drawable instanceof BitmapDrawable) {
Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap();
if (bitmap != null) {
return bitmap.getWidth();
} else {
WXLogUtils.w("WXImageView", "Bitmap on " + drawable.toString() + " is null");
}
} else {
WXLogUtils.w("WXImageView", "Not supported drawable type: " + drawable.getClass().getSimpleName());
}
}
return -1;
}
示例4: onMessage
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void onMessage(BufferedSource payload, WebSocket.PayloadType type)
throws IOException {
if (type != WebSocket.PayloadType.TEXT) {
WXLogUtils.w(
"Websocket received unexpected message with payload of type "
+ type);
return;
}
for (JSDebuggerCallback callback : mCallbacks.values()) {
callback.onMessage(payload, type);
}
String message = null;
try {
message = payload.readUtf8();
JSONObject jsonObject = JSONObject.parseObject(message);
Object name = jsonObject.get("method");
Object value = jsonObject.get("arguments");
if (name == null || value == null) {
return;
}
if (TextUtils.equals(name.toString(), "setLogLevel")) {
JSONArray jsonArray = JSONObject.parseArray(value.toString());
String level = jsonArray.get(0).toString();
WXEnvironment.sLogLevel = LogLevel.valueOf(level.toUpperCase());
WXLogUtils.v("into--[onMessage]setLogLevel");
}
} catch (Exception e) {
} finally {
payload.close();
}
}
示例5: 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()){
e.printStackTrace();
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;
}
示例6: onActivityBack
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public boolean onActivityBack() {
WXModuleManager.onActivityBack(getInstanceId());
if(mRootComp != null) {
return mRootComp.onActivityBack();
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityBack can not be call!");
}
return false;
}
示例7: onActivityStop
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static void onActivityStop(String instanceId){
HashMap<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
module.onActivityStop();
} else {
WXLogUtils.w("onActivityStop can not find the " + key + " module");
}
}
}
}
示例8: onRequestPermissionsResult
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static void onRequestPermissionsResult(String instanceId ,int requestCode, String[] permissions, int[] grantResults) {
HashMap<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
module.onRequestPermissionsResult(requestCode, permissions, grantResults);
} else {
WXLogUtils.w("onActivityResult can not find the " + key + " module");
}
}
}
}
示例9: onActivityResult
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void onActivityResult(int requestCode, int resultCode, Intent data){
WXModuleManager.onActivityResult(getInstanceId(),requestCode,resultCode,data);
if(mRootComp != null) {
mRootComp.onActivityResult(requestCode,requestCode,data);
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityResult can not be call!");
}
}
示例10: onCreateOptionsMenu
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public boolean onCreateOptionsMenu(Menu menu) {
WXModuleManager.onCreateOptionsMenu(getInstanceId(),menu);
if(mRootComp != null) {
mRootComp.onCreateOptionsMenu(menu);
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityStart can not be call!");
}
return true;
}
示例11: onActivityResume
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static void onActivityResume(String instanceId){
HashMap<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
module.onActivityResume();
} else {
WXLogUtils.w("onActivityResume can not find the " + key + " module");
}
}
}
}
示例12: onActivityDestroy
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static void onActivityDestroy(String instanceId){
Map<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
module.onActivityDestroy();
} else {
WXLogUtils.w("onActivityDestroy can not find the " + key + " module");
}
}
}
}
示例13: onActivityBack
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static boolean onActivityBack(String instanceId){
Map<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
return module.onActivityBack();
} else {
WXLogUtils.w("onActivityCreate can not find the " + key + " module");
}
}
}
return false;
}
示例14: onActivityStart
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public static void onActivityStart(String instanceId){
HashMap<String, WXModule> modules = sInstanceModuleMap.get(instanceId);
if(modules!=null) {
for (String key : modules.keySet()) {
WXModule module = modules.get(key);
if (module != null) {
module.onActivityStart();
} else {
WXLogUtils.w("onActivityStart can not find the " + key + " module");
}
}
}
}
示例15: onActivityStart
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void onActivityStart() {
// module listen Activity onActivityCreate
WXModuleManager.onActivityStart(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityStart();
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityStart can not be call!");
}
}