AndroidBucket

Additional

Language
Java
Version
2.1 (Sep 22, 2014)
Created
Mar 26, 2014
Updated
Dec 14, 2017 (Retired)
Owner
WangJie (wangjiegulu)
Contributors
WangJie (wangjiegulu)
zoeice525
HubertHe
timatoe
4
Activity
Badge
Generate
Download
Source code

Advertisement

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.