- 博客(10)
- 收藏
- 关注
原创 2345android面试
1.sleep()方法是Thread类的,而wait()方法是Object类的,调用sleep()不会释放对象锁,调用wait()会丢弃放弃锁,只有notify方法通知后本线程才进入对象锁定池准备。2.Thread没有exit方法。3.adb shell monkey -v -p com.packageName 1004.IntentService用于处理耗时操作,onCreate开了
2017-05-24 20:48:11
489
转载 3d旋转 android
/** * An animation that rotates the view on the Y axis between two specified angles. * This animation also adds a translation on the Z axis (depth) to improve the effect. */public class Rotate3dAn
2017-05-18 02:56:15
257
原创 android .9图边角模糊
上图边角模糊。google新建项目,图片放在mipmap下面,9位图放在drawable下面,默认只新建了一个drawable文件夹,需要新建drawable-xxhdpi文件夹,把9位图放到这个文件夹就可以解决边角模糊的问题。
2017-01-12 16:02:45
970
原创 android app异常捕获
import java.lang.Thread.UncaughtExceptionHandler;import android.content.Context;import android.content.pm.PackageInfo;import com.ddsc.fincar.util.AppInfoUtils;/** * * @ClassName AppException * @De
2017-01-03 11:36:31
694
原创 Toast封装,避免多次toast提示
package com.ddsc.fincar.util;import android.content.Context;import android.text.TextUtils;import android.widget.Toast;/** * Create by Xinwee * Toast工具类 */public class ToastUtil { private stat
2016-12-27 14:33:37
511
原创 BaseActivity
package com.ddsc.fincar.ui.base;import android.os.Build;import android.os.Bundle;import android.support.annotation.Nullable;import android.support.v7.app.AppCompatActivity;import android.support.v7
2016-12-27 11:15:28
375
原创 Android studio电脑意外关机
今天电脑意外关机了,刚好可以看看as保存代码的效果如何,果然,掉了一段代码,估计五分钟吧,as保存代码很明显是隔一段时间存一下代码的。
2016-12-02 15:39:38
1044
转载 Gradle根据日期自动生成build号
// 根据日期自动生成build号 def calendar = Calendar.getInstance(); def time = String.format(“%d%02d%02d”, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, calendar.get(Calendar.DAY_OF_MONTH)); a
2016-07-19 23:41:29
1287
原创 Vector和Stack分析
Vector与ArrayList作为底层都是采用动态数组作为实现基础的类,Vector和ArrayList在很多方面都是大同小异的。在阅读之前本文之前可以先阅读ArrayList的源码解析,然后Vector基本就一目了然了。 说下他们的主要区别: 1. Vector里面的方法都是同步的,线程安全的。 2. Vector的扩容大小与ArrayList不同,Vector1.6和1.7中都是
2016-07-02 12:33:07
931
原创 接口回调的例子
定义点击事件接口: public interface OnClickListener { public void OnClick(); } 按钮: public class Button { OnClickListener onClickListener; public void onClick(){ onClickListener.OnCli
2016-06-02 22:40:59
392
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人