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


Java LogUtils.e方法代码示例

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


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

示例1: decodeSampledBitmapFromResource

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeSampledBitmapFromResource(Resources res, int resId, BitmapSize maxSize, Bitmap.Config config) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        options.inPurgeable = true;
        options.inInputShareable = true;
        BitmapFactory.decodeResource(res, resId, options);
        options.inSampleSize = calculateInSampleSize(options, maxSize.getWidth(), maxSize.getHeight());
        options.inJustDecodeBounds = false;
        if (config != null) {
            options.inPreferredConfig = config;
        }
        try {
            return BitmapFactory.decodeResource(res, resId, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:21,代码来源:BitmapDecoder.java

示例2: decodeSampledBitmapFromFile

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeSampledBitmapFromFile(String filename, BitmapSize maxSize, Bitmap.Config config) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        options.inPurgeable = true;
        options.inInputShareable = true;
        BitmapFactory.decodeFile(filename, options);
        options.inSampleSize = calculateInSampleSize(options, maxSize.getWidth(), maxSize.getHeight());
        options.inJustDecodeBounds = false;
        if (config != null) {
            options.inPreferredConfig = config;
        }
        try {
            return BitmapFactory.decodeFile(filename, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:21,代码来源:BitmapDecoder.java

示例3: decodeSampledBitmapFromDescriptor

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeSampledBitmapFromDescriptor(FileDescriptor fileDescriptor, BitmapSize maxSize, Bitmap.Config config) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true; // 只读头信息
        options.inPurgeable = true;
        options.inInputShareable = true;
        BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options);
        //这个就是图片压缩倍数的参数
        options.inSampleSize = calculateInSampleSize(options, maxSize.getWidth(), maxSize.getHeight());
        options.inJustDecodeBounds = false;
        if (config != null) {
            options.inPreferredConfig = config;
        }
        try {
            return BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:22,代码来源:BitmapDecoder.java

示例4: decodeSampledBitmapFromByteArray

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeSampledBitmapFromByteArray(byte[] data, BitmapSize maxSize, Bitmap.Config config) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        options.inPurgeable = true;
        options.inInputShareable = true;
        BitmapFactory.decodeByteArray(data, 0, data.length, options);
        options.inSampleSize = calculateInSampleSize(options, maxSize.getWidth(), maxSize.getHeight());
        options.inJustDecodeBounds = false;
        if (config != null) {
            options.inPreferredConfig = config;
        }
        try {
            return BitmapFactory.decodeByteArray(data, 0, data.length, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:21,代码来源:BitmapDecoder.java

示例5: initDiskCache

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
/**
 * Initializes the disk cache.  Note that this includes disk access so this should not be
 * executed on the main/UI thread. By default an ImageCache does not initialize the disk
 * cache when it is created, instead you should call initDiskCache() to initialize it on a
 * background thread.
 */
public void initDiskCache() {
    // Set up disk cache
    synchronized (mDiskCacheLock) {
        if (globalConfig.isDiskCacheEnabled() && (mDiskLruCache == null || mDiskLruCache.isClosed())) {
            File diskCacheDir = new File(globalConfig.getDiskCachePath());
            if (diskCacheDir.exists() || diskCacheDir.mkdirs()) {
                long availableSpace = OtherUtils.getAvailableSpace(diskCacheDir);
                long diskCacheSize = globalConfig.getDiskCacheSize();
                diskCacheSize = availableSpace > diskCacheSize ? diskCacheSize : availableSpace;
                try {
                    mDiskLruCache = LruDiskCache.open(diskCacheDir, 1, 1, diskCacheSize);
                    mDiskLruCache.setFileNameGenerator(globalConfig.getFileNameGenerator());
                    LogUtils.d("create disk cache success");
                } catch (Throwable e) {
                    mDiskLruCache = null;
                    LogUtils.e("create disk cache error", e);
                }
            }
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:28,代码来源:BitmapCache.java

示例6: decodeSampledBitmapFromDescriptor

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeSampledBitmapFromDescriptor(FileDescriptor fileDescriptor, BitmapSize maxSize, Bitmap.Config config) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        options.inPurgeable = true;
        options.inInputShareable = true;
        BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options);
        options.inSampleSize = calculateInSampleSize(options, maxSize.getWidth(), maxSize.getHeight());
        options.inJustDecodeBounds = false;
        if (config != null) {
            options.inPreferredConfig = config;
        }
        try {
            return BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:justingboy,项目名称:CouldBooks,代码行数:21,代码来源:BitmapDecoder.java

示例7: BookDownloadManager

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public BookDownloadManager(Context appContext) {
	FileUtils fileUtils = new FileUtils(appContext);
	bookSavePath = fileUtils.getStorageDirectory();
	// ColumnConverterFactory.registerColumnConverter(HttpHandler.State.class,
	// new HttpHandlerStateConverter());
	mContext = appContext;
	db = DbUtils.create(mContext, "Book");
	db.configAllowTransaction(true);
	try {
		downloadInfoList = (ArrayList<BookDownloadInfo>) db
				.findAll(BookDownloadInfo.class);
	} catch (DbException e) {
		LogUtils.e(e.getMessage(), e);
	}
	if (downloadInfoList == null) {
		downloadInfoList = new ArrayList<BookDownloadInfo>();
	}
}
 
开发者ID:justingboy,项目名称:CouldBooks,代码行数:19,代码来源:BookDownloadManager.java

示例8: onLoading

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
@Override
public void onLoading(long total, long current, boolean isUploading) {
    HttpHandler<File> handler = downloadInfo.getHandler();
    if (handler != null) {
        downloadInfo.setState(handler.getState());
    }
    downloadInfo.setFileLength(total);
    downloadInfo.setProgress(current);
    try {
        db.saveOrUpdate(downloadInfo);
    } catch (DbException e) {
        LogUtils.e(e.getMessage(), e);
    }
    if (baseCallBack != null) {
        baseCallBack.onLoading(total, current, isUploading);
    }
}
 
开发者ID:Frank-Zhu,项目名称:AndroidAppCodeFramework,代码行数:18,代码来源:DownloadManager.java

示例9: initUsbMuxd

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public void initUsbMuxd(final Context context){
    if(!RootTools.isProcessRunning(usbmuxdd)){
        IDeviceHelper.getInstance().installBinary(context);

        CommandCapture command = new CommandCapture(0,
                exportLib(context),
                getBinPath(context, usbmuxdd + " -v")){
            @Override
            protected void output(int id, String line) {
                super.output(id, line);
                LogUtils.e(line);
            }
        };
        runCommand(command);
    }else{
        LogUtils.e("usbmuxd is running...");
    }
}
 
开发者ID:olunx,项目名称:xMan,代码行数:19,代码来源:IDeviceHelper.java

示例10: getDeviceId

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public StringBuffer getDeviceId(final Context context){
    final StringBuffer sb = new StringBuffer();
    CommandCapture command = new CommandCapture(0,
            exportLib(context),
            getBinPath(context, ideviceid + " -l")){
        @Override
        protected void output(int id, String line) {
            super.output(id, line);
            sb.append(line);
            sb.append("\n");
        }
    };
    runCommand(command);
    LogUtils.e(sb.toString());
    return sb;
}
 
开发者ID:olunx,项目名称:xMan,代码行数:17,代码来源:IDeviceHelper.java

示例11: commandWait

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
private void commandWait(Command cmd) {
    int waitTill = 50;
    int waitTillMultiplier = 2;
    int waitTillLimit = 3200; //7 tries, 6350 msec

    while (!cmd.isFinished() && waitTill<=waitTillLimit) {
        synchronized (cmd) {
            try {
                if (!cmd.isFinished()) {
                    cmd.wait(waitTill);
                    waitTill *= waitTillMultiplier;
                }
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
    if (!cmd.isFinished()){
        LogUtils.e("Could not finish root command in " + (waitTill/waitTillMultiplier));
    }
}
 
开发者ID:olunx,项目名称:xMan,代码行数:22,代码来源:IDeviceHelper.java

示例12: decodeResource

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeResource(Resources res, int resId) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inPurgeable = true;
        options.inInputShareable = true;
        try {
            return BitmapFactory.decodeResource(res, resId, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:14,代码来源:BitmapDecoder.java

示例13: decodeFile

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeFile(String filename) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inPurgeable = true;
        options.inInputShareable = true;
        try {
            return BitmapFactory.decodeFile(filename, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:14,代码来源:BitmapDecoder.java

示例14: decodeFileDescriptor

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeFileDescriptor(FileDescriptor fileDescriptor) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inPurgeable = true;
        options.inInputShareable = true;
        try {
            return BitmapFactory.decodeFileDescriptor(fileDescriptor, null, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:14,代码来源:BitmapDecoder.java

示例15: decodeByteArray

import com.lidroid.xutils.util.LogUtils; //导入方法依赖的package包/类
public static Bitmap decodeByteArray(byte[] data) {
    synchronized (lock) {
        final BitmapFactory.Options options = new BitmapFactory.Options();
        options.inPurgeable = true;
        options.inInputShareable = true;
        try {
            return BitmapFactory.decodeByteArray(data, 0, data.length, options);
        } catch (Throwable e) {
            LogUtils.e(e.getMessage(), e);
            return null;
        }
    }
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:14,代码来源:BitmapDecoder.java


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