Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Schiffe/AndroidBucket

Open more actions menu
 
 

Repository files navigation

AndroidBucket

###Android开发常用整理(不断扩充中)
包含各种工具类、线程池、日志、自定义的控件、程序崩溃捕捉处理、默认的Application配置、常用的Adapter等

###注意:

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

###使用方法
clone代码,并在项目中引入AndroidBucket。

###线程池、日志、程序崩溃捕捉处理等配置方法
新建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());
        }

    }

About

Android开发常用整理

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.