Android中不错的开源库

jopen 9年前


1、图片下载(带内存和本地缓存管理,功能很强大,定制性强)
https://github.com/nostra13/Android-Universal-Image-Loader

2、支持各种控件的下拉刷新、上拉加载更多
https://github.com/chrisbanes/Android-PullToRefresh

3、功能性强的http
http://loopj.com/android-async-http/
Used in Production By Top Apps and Developers

Instagram
Instagram is the #1 photo app on android, with over 10million users
Pinterest
Popular online pinboard. Organize and share things you love.
Frontline Commando (Glu Games)
#1 first person shooting game on Android, by Glu Games.
Heyzap
Social game discovery app with millions of users
Pose
Pose is the #1 fashion app for sharing and discovering new styles
Thousands more apps…
Async HTTP is used in production by thousands of top apps.

4、范围的seekbar
https://code.google.com/p/range-seek-bar/

5、仿ios滚轮
http://code.google.com/p/android-wheel/downloads/list

6、可以替代webview的chrome内核的chromeview
https://github.com/pwnall/chromeview

7、用于viewpager的tabstrip
https://github.com/astuetz/PagerSlidingTabStrip

8、带section效果的listview
https://github.com/emilsjolander/StickyListHeaders

9、带section效果的gridview
https://github.com/TonicArtos/StickyGridHeaders

10、带特殊动画效果的viewpager
https://github.com/jfeinstein10/JazzyViewPager

11、holo主题
https://github.com/Prototik/HoloEverywhere

12、可拖拽的listview
https://github.com/bauerca/drag-sort-listview
http://blog.csdn.net/jj120522/article/details/8240407

13、带手势操作和双击缩放的imageview
https://github.com/chrisbanes/PhotoView

14、滑动开关 高仿ios
https://github.com/IssacWang/SwitchButton

15、仿path左下角的菜单
http://www.androidviews.net/2012/12/arcmenu/
https://github.com/siyamed/android-satellite-menu

16、google-gson
https://code.google.com/p/google-gson/

17、瀑布流
https://github.com/maurycyw/StaggeredGridView

18、rss
https://github.com/ahorn/android-rss

19、各种图片效果
https://github.com/daizhenjun/ImageFilterForAndroid

20、代理服务器
https://github.com/madeye/proxydroid

21、android系统自带截屏
https://github.com/julianshen/ScreenCap

22、界面带滑动返回交互效果
https://github.com/Issacw0ng/SwipeBackLayout

23、gallery在API level 16(Android 4.1)就过期了,也就是谷歌不在维护这个类了。谷歌还推荐了可以用HorizontalScrollView 或者ViewPager 来代替它。Gallery过期的原因是因为它的适配器不能合适的转换视图,它每次切换图片时都要新建视图造成浪费太多的资源。所以还可以使用第三方开源库来替代:
EcoGallery项目github地址:https://github.com/falnatsheh/EcoGallery/
EcoGallery是继承了viewgroup实现的gallery 基本特性跟gallery一样 解决了gallery不回收视图资源的性能问题 还有额外的特性 如可以设置未选中项的半透明效果等 但依然存在与gallery同样的几个问题就是左右存在边距空白区域以及默认不会居左对齐(选中项为第一项)等
HorizontalListView:https://github.com/MeetMe/Android-HorizontalListView


24、仿刮奖效果的控件
Android-WScratchView:
https://github.com/winsontan520/Android-WScratchView


一个收集android开源控件和类库的网站:http://www.androidviews.net/
国内类似的android开源控件和类库的网站:http://a.code4app.com/

Log4j

官方网站



做软件开发, 没有个日志组件是不行的。 Android原生的日志服务太简陋了, 连输出的文件都没有。

android-log4j配置稍微有些麻烦, 需要下载多个jar包, 包括log4j, android-log4j等。 我自己用proguard封了一个包, 用来输出日志到文件没有问题, 提供给大家。下载地址

final LogConfigurator lc = new LogConfigurator();
lc.setFileName(PATH_LOGGER_FILE);//日志文件路径
lc.setFilePattern("%d - [%-6p-%c] - %m%n");//日志输出格式
lc.setMaxBackupSize(2);//最多的文件备份个数, 超过后log4j将自行删除
lc.setMaxFileSize(1024 * 1024);//最大的日志大小, 超过后log4j将备份下来, 再新建一个文件。
lc.setRootLevel(Level.DEBUG);
// Set log level of a specific logger
lc.setLevel("org.apache", Level.DEBUG);
lc.configure();
把上述代码, 放在程序初始化的过程中。

private Logger logger = Logger.getLogger("LoggerName");
logger.debug("Log text");
就可以输出日志到文件了。



25、magic textview

http://qwerjk.com/magic-text



26、插件化开发框架

友盟的:https://github.com/umeng/apf

http://apkplug.com/



27、文件下载

友盟的:https://github.com/umeng/android_download_manager

https://github.com/yingyixu/android-download-manager