android 开源项目:
android 开源项目:
https://github.com/white-cat/ThinkAndroid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | package de.greenrobot.daogenerator.gentest; import de.greenrobot.daogenerator.DaoGenerator; import de.greenrobot.daogenerator.Entity; import de.greenrobot.daogenerator.Property; import de.greenrobot.daogenerator.Schema; import de.greenrobot.daogenerator.ToMany; /** * Generates entities and DAOs for the example project DaoExample. * * Run it as a Java application (not Android). * * @author Markus */ public class ExampleDaoGenerator { public static void main(String[] args) throws Exception { Schema schema = new Schema( 3 , "de.greenrobot.daoexample" ); addNote(schema); addCustomerOrder(schema); new DaoGenerator().generateAll(schema, "../DaoExample/src-gen" ); } private static void addNote(Schema schema) { Entity note = schema.addEntity( "Note" ); note.addIdProperty(); note.addStringProperty( "text" ).notNull(); note.addStringProperty( "comment" ); note.addDateProperty( "date" ); } private static void addCustomerOrder(Schema schema) { Entity customer = schema.addEntity( "Customer" ); customer.addIdProperty(); customer.addStringProperty( "name" ).notNull(); Entity order = schema.addEntity( "Order" ); order.setTableName( "ORDERS" ); // "ORDER" is a reserved keyword order.addIdProperty(); Property orderDate = order.addDateProperty( "date" ).getProperty(); Property customerId = order.addLongProperty( "customerId" ).notNull().getProperty(); order.addToOne(customer, customerId); ToMany customerToOrders = customer.addToMany(order, customerId); customerToOrders.setName( "orders" ); customerToOrders.orderAsc(orderDate); } } |
1 | Schema schema = new Schema( 3 , "de.greenrobot.daoexample" ); |
1 2 3 | addNote(schema); addCustomerOrder(schema); new DaoGenerator().generateAll(schema, "../DaoExample/src-gen" ); |
1 2 3 4 5 | Exception in thread "main" java.io.FileNotFoundException: Template "dao.ftl" not found. at freemarker.template.Configuration.getTemplate(Configuration.java: 742 ) at freemarker.template.Configuration.getTemplate(Configuration.java: 665 ) at de.greenrobot.daogenerator.DaoGenerator. 68 ) at de.greenrobot.daogenerator.gentest.ExampleDaoGenerator.main(ExampleDaoGenerator.java: 41 ) |
1 2 3 4 5 6 7 8 9 10 11 12 13 | greenDAO Generator Copyright 2011 - 2013 Markus Junginger, greenrobot.de. Licensed under GPL V3. This program comes with ABSOLUTELY NO WARRANTY Processing schema version 3 ... Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\NoteDao.java Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\Note.java Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\CustomerDao.java Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\Customer.java Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\OrderDao.java Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\Order.java Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\DaoMaster.java Written F:\Android_Ex\work_10\DaoExample\src-gen\de\greenrobot\daoexample\DaoSession.java Processed 3 entities in 204ms |
1 | Entity note = schema.addEntity( "Note" ); |
1 | dao.setTableName( "NoteList" ); |
1 | dao.addIdProperty().primaryKey().autoincrement(); |
1 2 3 | dao.addIntProperty( "cityId" ); dao.addStringProperty( "infoType" ).notNull(); //非null字段 dao.addDoubleProperty( "Id" ); |
1 | java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String |
1 2 3 4 5 6 7 | public boolean isSaved( int ID) { QueryBuilder qb.where(Properties.Id.eq(ID)); qb.buildCount().count(); return qb.buildCount().count() > 0 ? true : false ; } |
1 2 3 4 | public List { return photoGalleryDao.loadAll(); // 获取图片相册 } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /** 通过图片id查找其目录id */ public int getTypeId( int picId) { QueryBuilder qb.where(Properties.Id.eq(picId)); if (qb.list().size() > 0 ) { return qb.list().get( 0 ).getTypeId(); } else { return - 1 ; } } |
1 2 3 4 | List joes = userDao.queryBuilder() .where(Properties.FirstName.eq( "Joe" )) .orderAsc(Properties.LastName) .list(); |
1 2 3 4 5 6 7 | public List int cityId) { QueryBuilder qb.where(qb.and(Properties.CityId.eq(cityId),Properties.InfoType.eq(HBContant.CITYINFO_SL))); qb.orderAsc(Properties.Id); // 排序依据 return qb.list(); } |
1 2 3 4 5 | QueryBuilder qb = userDao.queryBuilder(); qb.where(Properties.FirstName.eq( "Joe" ), qb.or(Properties.YearOfBirth.gt( 1970 ), qb.and(Properties.YearOfBirth.eq( 1970 ), Properties.MonthOfBirth.ge( 10 )))); List youngJoes = qb.list(); |
1 | picJsonDao.loadByRowId(picId); |
1 2 3 4 | public void addToPhotoTable(Photo p) { photoDao.insert(p); } |
1 2 3 4 5 6 7 | DevOpenHelper helper = new DaoMaster.DevOpenHelper( this , "notes-db" , null ); db = helper.getWritableDatabase(); daoMaster = new DaoMaster(db); daoSession = daoMaster.newSession(); noteDao = daoSession.getNoteDao(); Note note = new Note( null , noteText, comment, new Date()); noteDao.insert(note); |
1 2 | photoDao.insertOrReplace(photo); photoDao.insertInTx(photo); |
1 2 3 4 5 | /** 清空相册图片列表的数据 */ public void clearPhoto() { photoDao.deleteAll(); } |
1 2 3 4 5 6 | public void deleteCityInfo( int cityId) { QueryBuilder DeleteQuery bd.executeDeleteWithoutDetachingEntities(); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | private static DaoMaster daoMaster; private static DaoSession daoSession; /** * 取得DaoMaster * * @param context * @return */ public static DaoMaster getDaoMaster(Context context) { if (daoMaster == null ) { OpenHelper helper = new DaoMaster.DevOpenHelper(context, HBContant.DATABASE_NAME, null ); daoMaster = new DaoMaster(helper.getWritableDatabase()); } return daoMaster; } /** * 取得DaoSession * * @param context * @return */ public static DaoSession getDaoSession(Context context) { if (daoSession == null ) { if (daoMaster == null ) { daoMaster = getDaoMaster(context); } daoSession = daoMaster.newSession(); } return daoSession; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | public class DBHelper { private static Context mContext; private static DBHelper instance; private CityInfoDBDao cityInfoDao; private DBHelper() { } public static DBHelper getInstance(Context context) { if (instance == null ) { instance = new DBHelper(); if (mContext == null ) { mContext = context; } // 数据库对象 DaoSession daoSession = HBApplication.getDaoSession(mContext); instance.cityInfoDao = daoSession.getCityInfoDBDao(); } return instance; } /** 添加数据 */ public void addToCityInfoTable(CityInfo item) { cityInfoDao.insert(item); } /** 查询 */ public List { QueryBuilder return qb.list(); } /** 查询 */ public List { return cityInfoDao.loadAll(); // 查找图片相册 } /** 查询 */ public boolean isSaved( int Id) { QueryBuilder qb.where(Properties.Id.eq(Id)); qb.buildCount().count(); return qb.buildCount().count() > 0 ? true : false ; // 查找收藏表 } /** 删除 */ public void deleteCityInfoList( int Id) { QueryBuilder DeleteQuery bd.executeDeleteWithoutDetachingEntities(); } /** 删除 */ public void clearCityInfo() { cityInfoDao.deleteAll(); } /** 通过城市id查找其类型id */ public int getTypeId( int cityId) { QueryBuilder qb.where(Properties.Id.eq(cityId)); if (qb.list().size() > 0 ) { return qb.list().get( 0 ).getTypeId(); } else { return 0 ; } } /** 多重查询 */ public List int cityId) { QueryBuilder qb.where(qb.and(Properties.CityId.eq(cityId), Properties.InfoType.eq(HBContant.CITYINFO_IR))); qb.orderAsc(Properties.Id); // 排序依据 return qb.list(); } } |
转自:https://github.com/Trinea/android-open-project
目前包括:
Android开源项目第一篇——个性化控件(View)篇
包括ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar、其他
Android开源项目第二篇——工具库篇
包括依赖注入、图片缓存、网络相关、数据库ORM工具包、Android公共库、高版本向低版本兼容库、多媒体、事件总线、传感器、安全、其他
Android开源项目第三篇——优秀项目篇
比较有意思的完整的Android项目
Android开源项目第四篇——开发及测试工具篇
包括开发效率工具、开发自测相关、测试工具、开发及编译环境、其他
Android开源项目第五篇——优秀个人和团体篇
乐于分享并且有一些很不错的开源项目的个人和组织,包括JakeWharton、Chris Banes、Koushik Dutta等大牛
感谢xalexchen youxiachai stormzhang补充
第一部分 个性化控件(View)
主要介绍那些不错个性化的View,包括ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar及其他如Dialog、Toast、EditText、TableView、Activity Animation等等。
一、ListView
-
android-pulltorefresh 一个强大的拉动刷新开源项目,支持各种控件下拉刷新
ListView、ViewPager、WevView、ExpandableListView、GridView、(Horizontal
)ScrollView、Fragment上下左右拉动刷新,比下面johannilsson那个只支持ListView的强大的多。并且他实现的下拉刷新ListView在item不足一屏情况下也不会显示刷新提示,体验更好。
项目地址:https://github.com/chrisbanes/Android-PullToRefresh
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refreshview-demo.apk?raw=true
APP示例:新浪微博各个页面 -
android-pulltorefresh-listview 下拉刷新ListView
项目地址:https://github.com/johannilsson/android-pulltorefresh
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refresh-listview-demo.apk?raw=true
PS:这个被很多人使用的项目实际有不少bug,推荐使用上面的android-pulltorefresh -
DropDownListView 下拉刷新及滑动到底部加载更多ListView
项目地址:https://github.com/Trinea/AndroidCommon
Demo地址:https://play.google.com/store/apps/details?id=cn.trinea.android.demo
文档介绍:http://www.trinea.cn/?p=523 -
DragSortListView 拖动排序的ListView
同时支持ListView滑动item删除,各个Item高度不一、单选、复选、CursorAdapter做为适配器、拖动背景变化等
项目地址:https://github.com/bauerca/drag-sort-listview
Demo地址:https://play.google.com/store/apps/details?id=com.mobeta.android.demodslv
APP示例:Wordpress Android -
SwipeListView 支持定义ListView左右滑动事件,支持左右滑动位移,支持定义动画时间
项目地址:https://github.com/47deg/android-swipelistview
Demo地址:https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview
APP示例:微信 -
Android-SwipeToDismiss 滑动Item消失ListView
项目地址:https://github.com/romannurik/Android-SwipeToDismiss
支持3.0以下版本见:https://github.com/JakeWharton/SwipeToDismissNOA
Demo地址:https://github.com/JakeWharton/SwipeToDismissNOA/SwipeToDismissNOA.apk/qr_code -
StickyListHeaders GroupName滑动到顶端时会固定不动直到另外一个GroupName到达顶端的ExpandListView,支持快速滑动,支持Android2.3及以上
项目地址:https://github.com/emilsjolander/StickyListHeaders
APP示例:Android 4.0联系人
效果图: -
pinned-section-listview GroupName滑动到顶端时会固定不动直到另外一个GroupName到达顶端的ExpandListView
项目地址:https://github.com/beworker/pinned-section-listview
效果图: -
PinnedHeaderListView GroupName滑动到顶端时会固定不动直到另外一个GroupName到达顶端的ExpandListView
项目地址:https://github.com/JimiSmith/PinnedHeaderListView -
QuickReturnHeader ListView/ScrollView的header或footer,当向下滚动时消失,向上滚动时出现
项目地址:https://github.com/ManuelPeinado/QuickReturnHeader
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/quick-return-header-demo.apk?raw=true
APP示例:google plus -
IndexableListView ListView右侧会显示item首字母快捷索引,点击可快速滑动到某个item
项目地址:https://github.com/woozzu/IndexableListView
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/indexable-listview.apk?raw=true
APP示例:微信通讯录、小米联系人 -
CustomFastScrollView ListView快速滑动,同时屏幕中间PopupWindows显示滑动到的item内容或首字母
项目地址:https://github.com/nolanlawson/CustomFastScrollViewDemo
效果图: -
Android-ScrollBarPanel ListView滑动时固定的Panel指示显示在scrollbar旁边
项目地址:https://github.com/rno/Android-ScrollBarPanel
效果展示:https://github.com/rno/Android-ScrollBarPanel/raw/master/demo_capture.png -
SlideExpandableListView 用户点击listView item滑出固定区域,其他item的区域收缩
项目地址:https://github.com/tjerkw/Android-SlideExpandableListView
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/slide-expandable-listView-demo.apk?raw=true -
JazzyListView ListView及GridView item以特殊动画效果进入屏幕,效果包括grow、cards、curl、wave、flip、fly等等
项目地址:https://github.com/twotoasters/JazzyListView
Demo地址:https://play.google.com/store/apps/details?id=com.twotoasters.jazzylistview.sample
效果展示:http://lab.hakim.se/scroll-effects/ -
ListViewAnimations 带Item显示动画的ListView,动画包括底部飞入、其他方向斜飞入、下层飞入、渐变消失、滑动删除等
项目地址:https://github.com/nhaarman/ListViewAnimations
Demo地址:https://play.google.com/store/apps/details?id=com.haarman.listviewanimations
APP示例:Google plus、Google Now卡片式进入、小米系统中应用商店、联系人、游戏中心、音乐、文件管理器的ListView、Ultimate、Light Flow Lite、TreinVerkeer、Running Coach、Pearl Jam Lyrics、Calorie Chart、Car Hire、Super BART、DK FlashCards、Counter Plus、Voorlees Verhaaltjes 2.0 -
DevsmartLib-Android 横向ListView
项目地址:https://github.com/dinocore1/DevsmartLib-Android
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/horizontal-listview-demo.apk?raw=true -
HorizontalVariableListView 支持Item宽度不一致的ListView
项目地址:https://github.com/sephiroth74/HorizontalVariableListView
二、ActionBar
-
ActionBarSherlock 为Android所有版本提供统一的ActionBar,解决4.0以下ActionBar的适配问题
项目地址:https://github.com/JakeWharton/ActionBarSherlock
Demo地址:https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos
APP示例:太多了。。现在连google都在用 -
ActionBar-PullToRefresh 下拉刷新,ActionBar出现加载中提示
项目地址:https://github.com/chrisbanes/ActionBar-PullToRefresh
Demo地址:https://play.google.com/store/apps/details?id=uk.co.senab.actionbarpulltorefresh.samples.stock
APP示例:Gmail,Google plus,知乎等 -
FadingActionBar ListView向下滚动逐渐显现的ActionBar
项目地址:https://github.com/ManuelPeinado/FadingActionBar
Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.fadingactionbar.demo
APP示例:google music,知乎 -
NotBoringActionBar google music下拉收缩的ActionBar
项目地址:https://github.com/flavienlaurent/NotBoringActionBar
Demo地址:http://flavienlaurent.com/blog/2013/11/20/making-your-action-bar-not-boring/
APP示例:Google音乐 -
RefreshActionItem 带进度显示和刷新按钮的ActionBar
项目地址:https://github.com/ManuelPeinado/RefreshActionItem
Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.refreshactionitem.demo
APP示例:The New York Times,DevAppsDirect. -
GlassActionBar 类似玻璃的有一定透明度的ActionBar
项目地址:https://github.com/ManuelPeinado/GlassActionBar
Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.glassactionbardemo
APP示例:google music
三、Menu
-
MenuDrawer 滑出式菜单,通过拖动屏幕边缘滑出菜单,支持屏幕上下左右划出,支持当前View处于上下层,支持Windows边缘、ListView边缘、ViewPager变化划出菜单等。
项目地址:https://github.com/SimonVT/android-menudrawer
Demo地址:http://simonvt.github.io/android-menudrawer/
APP示例:Gmail、Google Music等大部分google app -
SlidingMenu 滑出式菜单,通过拖动屏幕边缘滑出菜单,支持屏幕左右划出,支持菜单zoom、scale、slide up三种动画样式出现。
项目地址:https://github.com/jfeinstein10/SlidingMenu
Demo地址:https://play.google.com/store/apps/details?id=com.slidingmenu.example
APP示例:Foursquare, LinkedIn, Zappos, Rdio, Evernote Food, Plume, VLC for Android, ESPN ScoreCenter, MLS MatchDay, 9GAG, Wunderlist 2, The Verge, MTG Familiar, Mantano Reader, Falcon Pro (BETA), MW3 Barracks
MenuDrawer和SlidingMenu比较:SlidingMenu支持菜单动画样式出现,MenuDrawer支持菜单view处于内容的上下层 -
ArcMenu 支持类似Path的左下角动画旋转菜单及横向划出菜单、圆心弹出菜单
项目地址:https://github.com/daCapricorn/ArcMenu
APP示例:Path
效果图:
https://dl.dropboxusercontent.com/u/11369687/preview1.png
https://dl.dropboxusercontent.com/u/11369687/raymenu.png -
android-satellite-menu 类似Path的左下角动画旋转菜单
项目地址:https://github.com/siyamed/android-satellite-menu
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/satellite-menu-demo.apk?raw=true
APP示例:Path -
radial-menu-widget 圆形菜单,支持二级菜单
项目地址:https://code.google.com/p/radial-menu-widget/
效果图:http://farm8.staticflickr.com/7377/11621125154_d1773c2dcc_o.jpg -
Android Wheel Menu 圆形旋转选取菜单
项目地址:https://github.com/anupcowkur/Android-Wheel-Menu
效果图: -
FoldingNavigationDrawer滑动并以折叠方式打开菜单
项目地址:https://github.com/tibi1712/FoldingNavigationDrawer-Android
使用介绍:https://play.google.com/store/apps/details?id=com.ptr.folding.sample
效果图:
四、ViewPager 、Gallery
-
Android-ViewPagerIndicator 配合ViewPager使用的Indicator,支持各种位置和样式
项目地址:https://github.com/JakeWharton/Android-ViewPagerIndicator
Demo地址:https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample
APP示例:太多了。。 -
JazzyViewPager 支持Fragment切换动画的ViewPager,动画包括转盘、淡入淡出、翻页、层叠、旋转、方块、翻转、放大缩小等
项目地址:https://github.com/jfeinstein10/JazzyViewPager
Demo地址:https://github.com/jfeinstein10/JazzyViewPager/blob/master/JazzyViewPager.apk?raw=true
效果类似桌面左右切换的各种效果,不过桌面并非用ViewPager实现而已 -
Android-DirectionalViewPager 支持横向和纵向(垂直)的ViewPager
项目地址:https://github.com/JakeWharton/Android-DirectionalViewPager
Demo地址:https://market.android.com/details?id=com.directionalviewpager.sample -
android-pulltorefresh 支持下拉刷新的ViewPager
项目地址:https://github.com/chrisbanes/Android-PullToRefresh
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refreshview-demo.apk?raw=true
APP示例:新浪微博各个页面 -
FancyCoverFlow支持Item切换动画效果的类似Gallery View
项目地址:https://github.com/davidschreiber/FancyCoverFlow
Demo地址:https://play.google.com/store/apps/details?id=at.technikum.mti.fancycoverflow.samples
效果图: -
AndroidTouchGallery 支持双击或双指缩放的Gallery(用ViewPager实现)
相比下面的PhotoView,在被放大后依然能滑到下一个item,并且支持直接从url和文件中获取图片,
项目地址:https://github.com/Dreddik/AndroidTouchGallery
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/touch-gallery-demo.apk?raw=true
APP示例:类似微信中查看聊天记录图片时可双击放大,并且放大情况下能正常左右滑动到前后图片 -
Salvage view 带View缓存的Viewpager PagerAdapter,很方便使用
项目地址:https://github.com/JakeWharton/salvage -
Android PagerSlidingTabStrip 配合ViewPager使用的Indicator,支持ViewPager Scroll时Indicator联动
项目地址:https://github.com/astuetz/PagerSlidingTabStrip
Demo地址:https://play.google.com/store/apps/details?id=com.astuetz.viewpager.extensions.sample
五、GridView
-
StaggeredGridView 允许非对齐行的GridView
类似Pinterest的瀑布流,并且跟ListView一样自带View缓存,继承自ViewGroup
项目地址:https://github.com/maurycyw/StaggeredGridView
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/staggered-gridview-demo.apk?raw=true
APP示例:Pinterest等 -
AndroidStaggeredGrid 允许非对齐行的GridView
类似Pinterest的瀑布流,继承自AbsListView
项目地址:https://github.com/etsy/AndroidStaggeredGrid
APP示例:Pinterest等 -
PinterestLikeAdapterView 允许非对齐行的GridView
类似Pinterest的瀑布流,允许下拉刷新
项目地址:https://github.com/GDG-Korea/PinterestLikeAdapterView
APP示例:Pinterest等 -
DraggableGridView Item可拖动交换位置的GridView
实际是自己继承ViewGroup实现,类似桌面的单屏效果,可屏幕自动上下滚动进行Item移动交换,多屏效果见下面6. Android-DraggableGridViewPager
项目地址:https://github.com/thquinn/DraggableGridView
Demo地址:https://github.com/thquinn/DraggableGridView/blob/master/bin/DraggableGridViewSample.apk?raw=true -
StickyGridHeaders GroupName滑动到顶端时会固定不动直到另外一个GroupName到达顶端的GridView
项目地址:https://github.com/TonicArtos/StickyGridHeaders
效果图: -
Android-DraggableGridViewPager Item可拖动交换位置的GridView
实际是自己继承ViewGroup实现,类似桌面的多屏效果,可屏幕自动左右滚动进行Item移动交换,单屏效果见上面4. DraggableGridView
项目地址:https://github.com/zzhouj/Android-DraggableGridViewPager
Demo地址:https://github.com/Trinea/trinea-download/blob/master/draggable-grid-viewpager-demo.apk?raw=true
六、ImageView
-
PhotoView 支持双击或双指缩放的ImageView
在ViewPager等Scrolling view中正常使用,相比上面的AndroidTouchGallery,不仅支持ViewPager,同时支持单个ImageView
项目地址:https://github.com/chrisbanes/PhotoView
Demo地址:https://play.google.com/store/apps/details?id=uk.co.senab.photoview.sample
APP示例:photup -
android-gif-drawable 支持gif显示的view
项目地址:https://github.com/koral--/android-gif-drawable
用jni实现的,编译生成so库后直接xml定义view即可,而且本身不依赖于其他开源项目所以相对下面的ImageViewEx简单的多 -
ImageViewEx 支持Gif显示的ImageView
项目地址:https://github.com/frapontillo/ImageViewEx
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/imageviewex-demo.apk?raw=true
依赖很多,编译过程很繁琐!|_|! -
RoundedImageView 带圆角的ImageView
项目地址:https://github.com/vinc3m1/RoundedImageView
效果图: -
ColorArt 根据图片的均色设置背景色显示文字和图片,类似itune11中效果
项目地址:https://github.com/MichaelEvans/ColorArt
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/color-art-demo.apk?raw=true -
CircleImageView 圆形的ImageView
项目地址:https://github.com/hdodenhof/CircleImageView
效果图: -
ImageViewZoom 支持放大和平移的ImageView
项目地址:https://github.com/sephiroth74/ImageViewZoom
APP示例:https://play.google.com/store/apps/details?id=com.aviary.android.feather
七、ProgressBar
-
SmoothProgressBar 水平进度条
项目地址:https://github.com/castorflex/SmoothProgressBar
Demo地址:https://play.google.com/store/apps/details?id=fr.castorflex.android.smoothprogressbar.sample -
ProgressWheel 支持进度显示的圆形ProgressBar
项目地址:https://github.com/Todd-Davies/ProgressWheel
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/progress-wheel-demo.apk?raw=true -
android-square-progressbar 在图片周围显示进度
项目地址:https://github.com/mrwonderman/android-square-progressbar
Demo地址:https://play.google.com/store/apps/details?id=net.yscs.android.square_pr
更多相关文章
- Android(安卓)Retrofit 框架上传多张图片解决方案
- Android获取网络图片应用示例
- Logger android日志工具
- 初探Android中的请求服务器并解析返回的json数据
- android 2.2 获取联系人,电话,并拨号
- Android(安卓)Studio使用说明
- 在Ubuntu12.10-32bit上构建、测试WebRTC之Android示例WebRTCDemo
- 飞凌ok6410开发板 android 有线配置
- Android(安卓)ApiDemos示例解析(183):Views->Progress Bar->2. S