本文整理汇总了Java中com.blankj.utilcode.util.LogUtils.e方法的典型用法代码示例。如果您正苦于以下问题:Java LogUtils.e方法的具体用法?Java LogUtils.e怎么用?Java LogUtils.e使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.blankj.utilcode.util.LogUtils
的用法示例。
在下文中一共展示了LogUtils.e方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPostExecute
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
@Override
protected void onPostExecute (Throwable param) {
getRootActivity().showProgress(false, null);
if (param != null) {
LogUtils.e(TAG, param);
if (BuildConfig.DEBUG) param.printStackTrace();
getRootActivity().setTextColor(Color.RED);
getRootActivity().setText(getString(R.string.workspace_init_error));
return;
}
if (screen == null || !hasXml) {
getRootActivity().setTextColor(Color.BLACK);
getRootActivity().setText(getString(R.string.empty));
} else {
setPreferenceScreen(screen);
}
}
示例2: run
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
@Override
public void run() {
LogUtils.v("verbose");
LogUtils.d("debug");
LogUtils.i("info");
LogUtils.w("warn");
LogUtils.e("初始化成功");
LogUtils.a("assert");
}
示例3: run
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
@Override
public void run() {
LogUtils.v("verbose");
LogUtils.d("debug");
LogUtils.i("info");
LogUtils.w("warn");
LogUtils.e("error");
LogUtils.a("assert");
}
示例4: onPostExecute
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
@Override
protected void onPostExecute (Throwable param) {
if (param != null) {
LogUtils.e(TAG, param);
if (BuildConfig.DEBUG) param.printStackTrace();
return;
}
setupUI();
}
示例5: camera
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
/**
* 拍照
*/
private void camera() {
LogUtils.e(SDCardUtils.getSDCardPaths().get(0));
File file = new File(mFilepath, System.currentTimeMillis() + ".jpg");
LogUtils.e(file.getPath());
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
//Android7.0以上URI
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
//通过FileProvider创建一个content类型的Uri
mProviderUri = FileProvider.getUriForFile(this, "com.sdwfqin.sample.fileprovider", file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, mProviderUri);
//添加这一句表示对目标应用临时授权该Uri所代表的文件
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
} else {
mUri = Uri.fromFile(file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, mUri);
}
try {
startActivityForResult(intent, RESULT_CODE_1);
} catch (ActivityNotFoundException anf) {
ToastUtils.showShort("摄像头未准备好!");
}
}
示例6: smoothScrollTo
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
/**
* 弹性滑动,只滑动内容,不改变位置(destX正左负右,destY正上负下)
* @param destX
* @param destY
*/
private void smoothScrollTo(int destX, int destY) {
LogUtils.e("smoothScrollTo: ");
// scrollX,scrollY对应原始位置左上角,水平与竖直方向
int scrollX = getScrollX();
int scrollY = getScrollY();
int delta = destX - scrollX;
int deltb = destY - scrollY;
// 1000ms内滑向destX
scroller.startScroll(scrollX, scrollY, delta, deltb, 1000);
// 调用computeScroll方法
invalidate();
}
示例7: onTouchEvent
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) {
LogUtils.e("getX: " + event.getX());
LogUtils.e("getY: " + event.getY());
return true;
}
示例8: draw
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
private void draw() {
try {
// 获取Canvas对象
mCanvas = mHolder.lockCanvas();
} catch (Exception e) {
LogUtils.e("draw: ", e);
} finally {
if (mCanvas != null) {
// 提交画布内容
mHolder.unlockCanvasAndPost(mCanvas);
}
}
}
示例9: onCreate
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rx_java2);
Observable<Integer> observable = Observable.create(emitter -> {
LogUtils.e("Observable thread is : " + Thread.currentThread().getName());
LogUtils.e("emit 1");
emitter.onNext(1);
});
// Consumer(消费者)表示只关心onNext事件
Consumer<Integer> consumer = integer -> {
LogUtils.e("Observer thread is :" + Thread.currentThread().getName());
LogUtils.e("onNext: " + integer);
};
/**
* subscribeOn: 指定Observable发送事件的线程
* observeOn: 指定Observer接收事件的线程
*
* Schedulers.io() 代表io操作的线程, 通常用于网络,读写文件等io密集型的操作
* Schedulers.computation() 代表CPU计算密集型的操作, 例如需要大量计算的操作
* Schedulers.newThread() 代表一个常规的新线程
* AndroidSchedulers.mainThread() 代表Android的主线程
*/
observable.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(consumer);
}
示例10: setText
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
/**
* 设置TextView
* @param s
*/
private void setText(String s) {
try {
mRetrofit2Tv.setText(s);
} catch (Exception e) {
LogUtils.e("setText: ", e);
}
}
示例11: setText
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
/**
* 设置TextView
* @param s 要设置的字符
*/
private void setText(String s) {
try {
mRetrofit1Tv.setText(s);
} catch (Exception e) {
LogUtils.e("setText: ", e);
}
}
示例12: setText
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
/**
* 设置TextView
*
* @param s
*/
private void setText(String s) {
try {
mRetrofit3Tv.setText(s);
} catch (Exception e) {
LogUtils.e("setText: ", e);
}
}
示例13: init
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
public void init () throws IOException {
final String TAG = "init";
LogUtils.i(TAG, "init workspace. ", id);
// Step 1, Check and delete exists workspace
if (workspaceDir.exists()) {
LogUtils.i(TAG, "Workspace exists, deleting");
if (!workspaceDir.delete()) {
LogUtils.w(TAG, "Delete using root");
ShellUtils.CommandResult result =
ShellUtils.execCmd("rm -rf " + workspaceDir.getAbsolutePath()
, true, true);
if (result.result != 0) {
LogUtils.e(TAG, "delete exists workspace", result.successMsg,
result.errorMsg, result.result);
throw new IOException("Unable to delete exists workspace");
} else {
LogUtils.i(TAG, "Delete successful use root");
}
} else {
LogUtils.i(TAG, "Delete successful use file.delete()");
}
}
// Step 2, Make workspace dir
LogUtils.i(TAG, "Make workspace dir");
if (!workspaceDir.mkdirs()) {
LogUtils.e(TAG, "Unable to make workspace dir");
throw new IOException("Unable to make workspace dir");
} else {
LogUtils.i(TAG, "Make workspace dir successful");
}
// Step 3, Make rule dir
ruleDir = new File(workspaceDir.getAbsolutePath() + "/rule/");
if (!ruleDir.mkdir()) {
LogUtils.e(TAG, "Unable to make rule dir");
throw new IOException("Unable to make rule dir");
} else {
LogUtils.i(TAG, "Make rule dir successful");
}
LogUtils.i(TAG, "Workspace init successful.");
/*
File test = new File(workspace.getRuleDir() + "/1a.txt");
try {
if (!test.createNewFile()) throw new Exception("Return false");
} catch (Exception e) {
throw new RuntimeException(e);
}
*/
}
示例14: order
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
public void order() {
LogUtils.e("order" + s);
}
示例15: MyIntentService
import com.blankj.utilcode.util.LogUtils; //导入方法依赖的package包/类
/**
* 需要注意构造方法
*/
public MyIntentService() {
super("name");
LogUtils.e("MyIntentService: ");
}