Git Product home page Git Product logo

android-common-toolkits's Introduction

android-common-tookit

  • A common tookit package for android.

  • 适用于Android项目的通用工具类的集合。

使用

大部分是工具类,以静态方法方式调用。详细见各个包的说明及示例。

工具包说明

Library需要添加Android support v4 jar包。

Adapter

Android各个组件使用的Adapter都包含大量需要实现的接口。
本类包内的Adapter对这些接口进行简化,并将Adapter的View创建过程通过ViewBuilder代理接口转移到Adapter类外实现,实现组件逻辑与界面创建分离。
ConverViewAdapter
使用convertView作View缓存的Adapter实现。
Convert View的相关知识,可参考 http://www.cnblogs.com/over140/archive/2011/03/23/1991100.html
HolderAdapter
实现HolderView缓存方法的Adapter。这个类并没完全实现Holder模式,只对顶级View进行Holder缓存。
HolderViewFiller
快速填充GridView或者ListView的辅助类
NoCachedAdapter
没有使用任务View缓存的Adapter。
SimpleCursorAdapter
游标适配器

Common

通用工具类
InputStreamUtil
输入流转换工具。可将InputStream转换成Bitmap,BitmapDrawable,String,StringBuffer,Byte数组等。
JSONAbility
可将Java Bean的各个属性输出成JSON格式字符串。
RandomUtil
生成最大值范围的随机数,指定长度的随机字符串。
ReflectUtility
反射工具类
RegexUtil
一些常用正则表达式
UnitUtil
数量单位生成
ViewDoubleClick
View双击处理。

database

数据库辅助工具类
AsynchronousCursorQueryTask
执行一个异步查询任务,查询完成后,对Adapter更换Cursor。
AsynchronousCursorTreeQueryTask
执行一个异步查询任务,适用于树形控件,查询完成后,对Adapter更换Cursor。

Encrypt

加密处理
Base64
Base64 加密解密
HashEncrypt
Hash类加密:MD5,SHA-1, SHA-256

Resource

BitmapFillet
图片圆角处理
BitmapScale
图片缩放处理
FileUtility
文件处理工具类。如复制、移动、创建文件,获取文件名,文件后缀等。
ResourceReader
对Android资源的读取处理。如,将Assets内的图片文件读取成图片,文本内容等。
SDCard
SDCard处理

Fragment

InnerFragment
继承自support v4的Fragment,扩展了View创建功能。
FragmentUtility
隐藏指定Fragment

System

ActivityUtility
使用最多的工具类,包含Activity常用设置方法。如全屏,去掉标题栏,显示Toast,隐藏/显示输入法,计算px与dp等方法。
ApkUtility
Apk文件检测是否存在,安装指定APK文件
DoubleClickExit
双击退出应用
Exlog
调试必备!可以输入调试信息在哪一个类哪一行的辅助工具类。包括:取得当前代码所在方法名、输出调用方法链等方法。
NetworkUtility
网络工具类
PhoneUtility
电话

View

DelaySwitchActivity
延时跳转Activity,用于启动界面。
ViewController
就是ViewController
ViewPagerScheduler
如果你需要类似JQuery slideshow等图片轮播组件,在Android上你可能会自己实现一个。
但是,ViewPager不就是一个现成的SlideShow组件么?只需要添加自动轮播功能即可。
那么,ViewPagerScheduler就可以为你自动轮播ViewPager啦!

捐助

开源是一种态度,不是义务。

如果您觉得本开源项目对你有帮助,您可以对作者捐助 1 元以示支持。

支付宝捐助地址: 桥下一粒砂

开源协议 Apache License 2.0

The code of this project is released under the Apache License 2.0, see LICENSE

android-common-toolkits's People

Contributors

cfuture-team avatar

Watchers

 avatar  avatar

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.