android自定义控件崩溃,AndroidBucket: Android开发常用整理(不断扩充中) 包含各种工具类、安全、线程池、日志、自定义的控件、程序崩溃捕捉处理、默认的Application配...

AndroidBucket

###Android开发常用整理(不断扩充中)

包含各种工具类、线程池、日志、自定义的控件、程序崩溃捕捉处理、默认的Application配置、常用的Adapter等

###注意:

如果需要使用FragmentTabAdapter,则需要android-support-v4.jar的支持(以兼容低版本)

###使用方法

clone代码,并在项目中引入AndroidBucket。

###Gradle(Check newest version)

compile 'com.github.wangjiegulu:AndroidBucket:x.x.x'

###Maven(Check newest version)

com.github.wangjiegulu

AndroidBucket

x.x.x

aar

###线程池、日志、程序崩溃捕捉处理等配置方法

新建MyApplication,继承ABApplication,根据需要实现里面的方法

initThreadPool(); // 初始化线程池

initLogger(); // 初始化日志工具

initImageLoader(); // 初始化图片加载器

initCrashHandler(); // 初始化程序崩溃捕捉处理

注意:除了图片加载器外,其他的初始化操作ABApplication都提供了默认的初始化支持。

图片加载器推荐使用ImageLoaderSample项目。

MyApplication:

public class ABApplication extends Application{

@Override

public void onCreate() {

super.onCreate();

}

/**

* 初始化线程池

*/

protected void initThreadPool(){

ThreadPool.initThreadPool(7);

}

/**

* 初始化日志

*/

protected void initLogger(){

Logger.initLogger(null);

}

/**

* 初始化图片加载器

*/

protected void initImageLoader(){

}

/**

* 初始化程序崩溃捕捉处理

*/

protected void initCrashHandler(){

ABCrashHandler.init(getApplicationContext());

}

}

License

Copyright 2013 Wang Jie

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing blacklist and

limitations under the License.

Android%20Arsenal-AndroidBucket-brightgreen.svg?style=flat

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值