Code Monkey home page Code Monkey logo

androidbucket's Introduction

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());
        }

    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.