Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hendyyou/xUtils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Springws/xUtils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Jul 28, 2013

  1. update test code and readme

    wyouflf committed Jul 28, 2013
    Copy the full SHA
    503ed38 View commit details
  2. update readme

    wyouflf committed Jul 28, 2013
    Copy the full SHA
    c82dd68 View commit details
  3. update test code and readme

    wyouflf committed Jul 28, 2013
    Copy the full SHA
    6f849b1 View commit details

Commits on Jul 29, 2013

  1. Copy the full SHA
    b261bd9 View commit details
  2. Copy the full SHA
    98698b2 View commit details
  3. Copy the full SHA
    ac4bb3e View commit details
  4. Copy the full SHA
    ad2c113 View commit details
  5. update readme

    wyouflf committed Jul 29, 2013
    Copy the full SHA
    ce1b1f2 View commit details
  6. Copy the full SHA
    2de7c38 View commit details

Commits on Jul 30, 2013

  1. Copy the full SHA
    5b302ff View commit details
  2. update test code and readme

    wyouflf committed Jul 30, 2013
    Copy the full SHA
    5931eb4 View commit details
  3. Copy the full SHA
    0b91e83 View commit details
  4. update readme

    wyouflf committed Jul 30, 2013
    Copy the full SHA
    39e015e View commit details
  5. update readme

    wyouflf committed Jul 30, 2013
    Copy the full SHA
    97aa1da View commit details
  6. Copy the full SHA
    1dce1c2 View commit details
  7. Copy the full SHA
    3a01f29 View commit details
  8. update test code

    wyouflf committed Jul 30, 2013
    Copy the full SHA
    c027e34 View commit details

Commits on Jul 31, 2013

  1. 优化http模块异常捕获

    wyouflf committed Jul 31, 2013
    Copy the full SHA
    d9417f8 View commit details
  2. 重构http同步请求

    wyouflf committed Jul 31, 2013
    Copy the full SHA
    2a1e0d7 View commit details
  3. 优化DbUtils错误捕获

    wyouflf committed Jul 31, 2013
    Copy the full SHA
    c220a20 View commit details
  4. 优化DaoConfig

    wyouflf committed Jul 31, 2013
    Copy the full SHA
    0ee157d View commit details
  5. update SimpleHttpDownloader

    wyouflf committed Jul 31, 2013
    Copy the full SHA
    ac0ac94 View commit details
  6. update http client

    wyouflf committed Jul 31, 2013
    Copy the full SHA
    abaa989 View commit details
  7. 优化bitmap模块

    wyouflf committed Jul 31, 2013
    Copy the full SHA
    02156f0 View commit details

Commits on Aug 1, 2013

  1. update BitmapUtils

    wyouflf committed Aug 1, 2013
    Copy the full SHA
    4fe6e1c View commit details
  2. Copy the full SHA
    b740e70 View commit details
  3. Copy the full SHA
    15d3cb3 View commit details
  4. update test code

    wyouflf committed Aug 1, 2013
    Copy the full SHA
    aff4f7b View commit details
  5. update HttpUtils

    wyouflf committed Aug 1, 2013
    Copy the full SHA
    44809d1 View commit details
  6. update readme

    wyouflf committed Aug 1, 2013
    Copy the full SHA
    d378579 View commit details
  7. update readme

    wyouflf committed Aug 1, 2013
    Copy the full SHA
    79cd470 View commit details
  8. update readme

    wyouflf committed Aug 1, 2013
    Copy the full SHA
    8c26797 View commit details
  9. Copy the full SHA
    fc31394 View commit details

Commits on Aug 2, 2013

  1. update MIME to public

    wyouflf committed Aug 2, 2013
    Copy the full SHA
    b637c5f View commit details
  2. Copy the full SHA
    6462991 View commit details
  3. ViewUtils add inject(Object, Activity) and inject(Object, View) metho…

    …ds for fragment or other views.
    wyouflf committed Aug 2, 2013
    Copy the full SHA
    f8aab0a View commit details
  4. update RetryHandler

    wyouflf committed Aug 2, 2013
    Copy the full SHA
    bf06a7d View commit details

Commits on Aug 3, 2013

  1. update some fields name

    wyouflf committed Aug 3, 2013
    Copy the full SHA
    c6487dc View commit details

Commits on Aug 5, 2013

  1. update ViewUtils

    wyouflf committed Aug 5, 2013
    Copy the full SHA
    e1614d5 View commit details
  2. update ResponseStream

    wyouflf committed Aug 5, 2013
    Copy the full SHA
    cc71201 View commit details
  3. update HttpGetCache

    wyouflf committed Aug 5, 2013
    Copy the full SHA
    9fc3389 View commit details
  4. update HttpUtils

    wyouflf committed Aug 5, 2013
    Copy the full SHA
    c880033 View commit details

Commits on Aug 7, 2013

  1. ViewInject添加更多常用事件绑定支持:RadioGroup.OnCheckedChangeListener,CompoundBut…

    …ton.OnCheckedChangeListener,Preference.OnPreferenceChangeListener,TabHost.OnTabChangeListener,ViewTreeObserver.OnScrollChangedListener,SeekBar.OnSeekBarChangeListener
    wyouflf committed Aug 7, 2013
    Copy the full SHA
    b666c25 View commit details
  2. Copy the full SHA
    903b62c View commit details

Commits on Aug 8, 2013

  1. Copy the full SHA
    6c89b3a View commit details

Commits on Aug 11, 2013

  1. Copy the full SHA
    cadeb63 View commit details
  2. update demo and readme

    wyouflf committed Aug 11, 2013
    Copy the full SHA
    ce87741 View commit details
  3. update DbUtils

    wyouflf committed Aug 11, 2013
    Copy the full SHA
    f9646d4 View commit details
  4. update DbUtils and readme

    wyouflf committed Aug 11, 2013
    Copy the full SHA
    dc38b67 View commit details
  5. Copy the full SHA
    25ec2a7 View commit details
Showing with 15,773 additions and 6,211 deletions.
  1. +5 −1 .gitignore
  2. +0 −8 AndroidManifest.xml
  3. +164 −45 README.md
  4. +8 −0 library/AndroidManifest.xml
  5. +15 −0 library/project.properties
  6. +513 −0 library/src/com/lidroid/xutils/BitmapUtils.java
  7. +885 −0 library/src/com/lidroid/xutils/DbUtils.java
  8. +338 −0 library/src/com/lidroid/xutils/HttpUtils.java
  9. +172 −0 library/src/com/lidroid/xutils/ViewUtils.java
  10. +29 −0 library/src/com/lidroid/xutils/bitmap/BitmapCacheListener.java
  11. +90 −0 library/src/com/lidroid/xutils/bitmap/BitmapCommonUtils.java
  12. +132 −0 library/src/com/lidroid/xutils/bitmap/BitmapDisplayConfig.java
  13. +389 −0 library/src/com/lidroid/xutils/bitmap/BitmapGlobalConfig.java
  14. +86 −0 library/src/com/lidroid/xutils/bitmap/PauseOnScrollListener.java
  15. +113 −0 library/src/com/lidroid/xutils/bitmap/callback/BitmapLoadCallBack.java
  16. +10 −0 library/src/com/lidroid/xutils/bitmap/callback/BitmapLoadFrom.java
  17. +18 −0 library/src/com/lidroid/xutils/bitmap/callback/BitmapSetter.java
  18. +51 −0 library/src/com/lidroid/xutils/bitmap/callback/DefaultBitmapLoadCallBack.java
  19. +198 −0 library/src/com/lidroid/xutils/bitmap/core/AsyncDrawable.java
  20. +486 −0 library/src/com/lidroid/xutils/bitmap/core/BitmapCache.java
  21. +194 −0 library/src/com/lidroid/xutils/bitmap/core/BitmapDecoder.java
  22. +46 −0 library/src/com/lidroid/xutils/bitmap/core/BitmapSize.java
  23. +92 −0 library/src/com/lidroid/xutils/bitmap/download/DefaultDownloader.java
  24. +70 −0 library/src/com/lidroid/xutils/bitmap/download/Downloader.java
  25. +16 −0 library/src/com/lidroid/xutils/bitmap/factory/BitmapFactory.java
  26. +10 −0 library/src/com/lidroid/xutils/cache/FileNameGenerator.java
  27. +88 −0 library/src/com/lidroid/xutils/cache/KeyExpiryMap.java
  28. +1,224 −0 library/src/com/lidroid/xutils/cache/LruDiskCache.java
  29. +42 −8 {src/com/lidroid/xutils/bitmap/core → library/src/com/lidroid/xutils/cache}/LruMemoryCache.java
  30. +38 −0 library/src/com/lidroid/xutils/cache/MD5FileNameGenerator.java
  31. +32 −0 library/src/com/lidroid/xutils/db/annotation/Check.java
  32. +3 −2 { → library}/src/com/lidroid/xutils/db/annotation/Column.java
  33. +20 −0 library/src/com/lidroid/xutils/db/annotation/Finder.java
  34. +30 −0 library/src/com/lidroid/xutils/db/annotation/Foreign.java
  35. +1 −1 { → library}/src/com/lidroid/xutils/db/annotation/Id.java
  36. +16 −0 library/src/com/lidroid/xutils/db/annotation/NoAutoIncrement.java
  37. +31 −0 library/src/com/lidroid/xutils/db/annotation/NotNull.java
  38. +4 −1 { → library}/src/com/lidroid/xutils/db/annotation/Table.java
  39. +0 −1 { → library}/src/com/lidroid/xutils/db/annotation/Transient.java
  40. +31 −0 library/src/com/lidroid/xutils/db/annotation/Unique.java
  41. +34 −0 library/src/com/lidroid/xutils/db/converter/BooleanColumnConverter.java
  42. +31 −0 library/src/com/lidroid/xutils/db/converter/ByteArrayColumnConverter.java
  43. +33 −0 library/src/com/lidroid/xutils/db/converter/ByteColumnConverter.java
  44. +34 −0 library/src/com/lidroid/xutils/db/converter/CharColumnConverter.java
  45. +20 −0 library/src/com/lidroid/xutils/db/converter/ColumnConverter.java
  46. +111 −0 library/src/com/lidroid/xutils/db/converter/ColumnConverterFactory.java
  47. +36 −0 library/src/com/lidroid/xutils/db/converter/DateColumnConverter.java
  48. +33 −0 library/src/com/lidroid/xutils/db/converter/DoubleColumnConverter.java
  49. +33 −0 library/src/com/lidroid/xutils/db/converter/FloatColumnConverter.java
  50. +33 −0 library/src/com/lidroid/xutils/db/converter/IntegerColumnConverter.java
  51. +33 −0 library/src/com/lidroid/xutils/db/converter/LongColumnConverter.java
  52. +33 −0 library/src/com/lidroid/xutils/db/converter/ShortColumnConverter.java
  53. +34 −0 library/src/com/lidroid/xutils/db/converter/SqlDateColumnConverter.java
  54. +31 −0 library/src/com/lidroid/xutils/db/converter/StringColumnConverter.java
  55. +20 −0 library/src/com/lidroid/xutils/db/sqlite/ColumnDbType.java
  56. +123 −0 library/src/com/lidroid/xutils/db/sqlite/CursorUtils.java
  57. +168 −0 library/src/com/lidroid/xutils/db/sqlite/DbModelSelector.java
  58. +47 −0 library/src/com/lidroid/xutils/db/sqlite/FinderLazyLoader.java
  59. +65 −0 library/src/com/lidroid/xutils/db/sqlite/ForeignLazyLoader.java
  60. +170 −0 library/src/com/lidroid/xutils/db/sqlite/Selector.java
  61. +94 −0 library/src/com/lidroid/xutils/db/sqlite/SqlInfo.java
  62. +301 −0 library/src/com/lidroid/xutils/db/sqlite/SqlInfoBuilder.java
  63. +239 −0 library/src/com/lidroid/xutils/db/sqlite/WhereBuilder.java
  64. +140 −0 library/src/com/lidroid/xutils/db/table/Column.java
  65. +251 −0 library/src/com/lidroid/xutils/db/table/ColumnUtils.java
  66. +21 −7 { → library}/src/com/lidroid/xutils/db/table/DbModel.java
  67. +90 −0 library/src/com/lidroid/xutils/db/table/Finder.java
  68. +160 −0 library/src/com/lidroid/xutils/db/table/Foreign.java
  69. +90 −0 library/src/com/lidroid/xutils/db/table/Id.java
  70. +2 −12 { → library}/src/com/lidroid/xutils/db/table/KeyValue.java
  71. +105 −0 library/src/com/lidroid/xutils/db/table/Table.java
  72. +168 −0 library/src/com/lidroid/xutils/db/table/TableUtils.java
  73. 0 { → library}/src/com/lidroid/xutils/exception/BaseException.java
  74. 0 { → library}/src/com/lidroid/xutils/exception/DbException.java
  75. +79 −0 library/src/com/lidroid/xutils/exception/HttpException.java
  76. +118 −0 library/src/com/lidroid/xutils/http/HttpCache.java
  77. +357 −0 library/src/com/lidroid/xutils/http/HttpHandler.java
  78. +157 −21 {src/com/lidroid/xutils/http/client → library/src/com/lidroid/xutils/http}/RequestParams.java
  79. +95 −0 library/src/com/lidroid/xutils/http/ResponseInfo.java
  80. +200 −0 library/src/com/lidroid/xutils/http/ResponseStream.java
  81. +128 −0 library/src/com/lidroid/xutils/http/SyncHttpHandler.java
  82. +2 −2 ...directHandler.java → library/src/com/lidroid/xutils/http/callback/DefaultHttpRedirectHandler.java
  83. +94 −0 library/src/com/lidroid/xutils/http/callback/FileDownloadHandler.java
  84. +2 −2 ...nloadRedirectHandler.java → library/src/com/lidroid/xutils/http/callback/HttpRedirectHandler.java
  85. +91 −0 library/src/com/lidroid/xutils/http/callback/RequestCallBack.java
  86. +2 −3 ...id/xutils/http/client → library/src/com/lidroid/xutils/http}/callback/RequestCallBackHandler.java
  87. +63 −0 library/src/com/lidroid/xutils/http/callback/StringDownloadHandler.java
  88. +82 −0 library/src/com/lidroid/xutils/http/client/DefaultSSLSocketFactory.java
  89. +82 −21 { → library}/src/com/lidroid/xutils/http/client/HttpRequest.java
  90. +28 −17 {src/com/lidroid/xutils/http → library/src/com/lidroid/xutils/http/client}/RetryHandler.java
  91. +24 −5 ...oid/xutils/http/client → library/src/com/lidroid/xutils/http/client/entity}/BodyParamsEntity.java
  92. +127 −0 library/src/com/lidroid/xutils/http/client/entity/DecompressingEntity.java
  93. +17 −17 ...t/UploadFileEntity.java → library/src/com/lidroid/xutils/http/client/entity/FileUploadEntity.java
  94. +52 −0 library/src/com/lidroid/xutils/http/client/entity/GZipDecompressingEntity.java
  95. +19 −20 ...treamEntity.java → library/src/com/lidroid/xutils/http/client/entity/InputStreamUploadEntity.java
  96. +4 −2 ...utils/http/client/callback → library/src/com/lidroid/xutils/http/client/entity}/UploadEntity.java
  97. +23 −2 { → library}/src/com/lidroid/xutils/http/client/multipart/FormBodyPart.java
  98. +11 −7 { → library}/src/com/lidroid/xutils/http/client/multipart/HttpMultipart.java
  99. 0 { → library}/src/com/lidroid/xutils/http/client/multipart/HttpMultipartMode.java
  100. +1 −1 { → library}/src/com/lidroid/xutils/http/client/multipart/MIME.java
  101. +1 −1 { → library}/src/com/lidroid/xutils/http/client/multipart/MinimalField.java
  102. +1 −1 { → library}/src/com/lidroid/xutils/http/client/multipart/MinimalFieldHeader.java
  103. +16 −12 { → library}/src/com/lidroid/xutils/http/client/multipart/MultipartEntity.java
  104. 0 { → library}/src/com/lidroid/xutils/http/client/multipart/content/AbstractContentBody.java
  105. +1 −0 { → library}/src/com/lidroid/xutils/http/client/multipart/content/ByteArrayBody.java
  106. 0 { → library}/src/com/lidroid/xutils/http/client/multipart/content/ContentBody.java
  107. 0 { → library}/src/com/lidroid/xutils/http/client/multipart/content/ContentDescriptor.java
  108. +10 −7 { → library}/src/com/lidroid/xutils/http/client/multipart/content/FileBody.java
  109. +7 −5 { → library}/src/com/lidroid/xutils/http/client/multipart/content/InputStreamBody.java
  110. +1 −1 { → library}/src/com/lidroid/xutils/http/client/multipart/content/StringBody.java
  111. +58 −99 ...com/lidroid/xutils/http/client → library/src/com/lidroid/xutils/http/client/util}/URIBuilder.java
  112. +44 −63 ...idroid/xutils/http/client → library/src/com/lidroid/xutils/http/client/util}/URLEncodedUtils.java
  113. +16 −0 library/src/com/lidroid/xutils/task/Priority.java
  114. +405 −0 library/src/com/lidroid/xutils/task/PriorityAsyncTask.java
  115. +61 −0 library/src/com/lidroid/xutils/task/PriorityExecutor.java
  116. +17 −0 library/src/com/lidroid/xutils/task/PriorityObject.java
  117. +642 −0 library/src/com/lidroid/xutils/task/PriorityObjectBlockingQueue.java
  118. +18 −0 library/src/com/lidroid/xutils/task/PriorityRunnable.java
  119. +24 −0 library/src/com/lidroid/xutils/task/TaskHandler.java
  120. +84 −0 library/src/com/lidroid/xutils/util/CharsetUtils.java
  121. +128 −0 library/src/com/lidroid/xutils/util/DoubleKeyValueMap.java
  122. +24 −11 ...om/lidroid/xutils/exception/ViewException.java → library/src/com/lidroid/xutils/util/IOUtils.java
  123. +254 −0 library/src/com/lidroid/xutils/util/LogUtils.java
  124. +17 −11 src/com/lidroid/xutils/db/table/Id.java → library/src/com/lidroid/xutils/util/MimeTypeUtils.java
  125. +263 −0 library/src/com/lidroid/xutils/util/OtherUtils.java
  126. +28 −23 {src/com/lidroid/xutils/http → library/src/com/lidroid/xutils/util}/PreferencesCookieStore.java
  127. +119 −0 library/src/com/lidroid/xutils/view/EventListenerManager.java
  128. +54 −0 library/src/com/lidroid/xutils/view/ResLoader.java
  129. +25 −0 library/src/com/lidroid/xutils/view/ResType.java
  130. +73 −0 library/src/com/lidroid/xutils/view/ViewFinder.java
  131. +31 −0 library/src/com/lidroid/xutils/view/ViewInjectInfo.java
  132. +27 −0 library/src/com/lidroid/xutils/view/annotation/ContentView.java
  133. +17 −0 library/src/com/lidroid/xutils/view/annotation/PreferenceInject.java
  134. +5 −3 ...utils/view/annotation/Select.java → library/src/com/lidroid/xutils/view/annotation/ResInject.java
  135. +3 −9 { → library}/src/com/lidroid/xutils/view/annotation/ViewInject.java
  136. +21 −0 library/src/com/lidroid/xutils/view/annotation/event/EventBase.java
  137. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnChildClick.java
  138. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnClick.java
  139. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnCompoundButtonCheckedChange.java
  140. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnFocusChange.java
  141. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnGroupClick.java
  142. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnGroupCollapse.java
  143. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnGroupExpand.java
  144. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnItemClick.java
  145. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnItemLongClick.java
  146. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnItemSelected.java
  147. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnKey.java
  148. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnLongClick.java
  149. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnNothingSelected.java
  150. +38 −0 library/src/com/lidroid/xutils/view/annotation/event/OnPreferenceChange.java
  151. +38 −0 library/src/com/lidroid/xutils/view/annotation/event/OnPreferenceClick.java
  152. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnProgressChanged.java
  153. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnRadioGroupCheckedChange.java
  154. +25 −0 library/src/com/lidroid/xutils/view/annotation/event/OnScroll.java
  155. +25 −0 library/src/com/lidroid/xutils/view/annotation/event/OnScrollStateChanged.java
  156. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnStartTrackingTouch.java
  157. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnStopTrackingTouch.java
  158. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnTabChange.java
  159. +40 −0 library/src/com/lidroid/xutils/view/annotation/event/OnTouch.java
  160. +11 −3 {test → sample}/AndroidManifest.xml
  161. BIN sample/assets/img/wallpaper.jpg
  162. BIN sample/libs/android-support-v4.jar
  163. +23 −0 sample/proguard-project.txt
  164. +15 −0 sample/project.properties
  165. BIN {test → sample}/res/drawable-hdpi/ic_launcher.png
  166. BIN {test → sample}/res/drawable-ldpi/ic_launcher.png
  167. BIN {test → sample}/res/drawable-mdpi/ic_launcher.png
  168. BIN {test → sample}/res/drawable-xhdpi/ic_launcher.png
  169. BIN sample/res/drawable/bitmap.png
  170. BIN sample/res/drawable/bitmap_press.png
  171. BIN sample/res/drawable/database.png
  172. BIN sample/res/drawable/database_press.png
  173. BIN sample/res/drawable/http.png
  174. BIN sample/res/drawable/http_press.png
  175. +7 −0 sample/res/drawable/icon_btimap.xml
  176. +7 −0 sample/res/drawable/icon_database.xml
  177. +7 −0 sample/res/drawable/icon_http.xml
  178. BIN sample/res/drawable/tab_background.9.png
  179. +6 −0 sample/res/drawable/tab_item.xml
  180. BIN sample/res/drawable/tab_item_press.9.png
  181. +10 −0 sample/res/layout/bitmap_fragment.xml
  182. +16 −0 sample/res/layout/bitmap_item.xml
  183. +16 −0 sample/res/layout/db_fragment.xml
  184. +51 −0 sample/res/layout/download_item.xml
  185. +15 −0 sample/res/layout/download_list.xml
  186. +28 −0 sample/res/layout/http_fragment.xml
  187. +12 −0 sample/res/layout/image.xml
  188. +31 −0 sample/res/layout/main.xml
  189. +26 −0 sample/res/layout/tab_bottom_nav.xml
  190. +11 −0 sample/res/values-zh-rCN/strings.xml
  191. +11 −0 sample/res/values/strings.xml
  192. +29 −0 sample/src/com/lidroid/xutils/sample/BitmapHelp.java
  193. +265 −0 sample/src/com/lidroid/xutils/sample/DownloadListActivity.java
  194. +68 −0 sample/src/com/lidroid/xutils/sample/ImageActivity.java
  195. +76 −0 sample/src/com/lidroid/xutils/sample/MyActivity.java
  196. +136 −0 sample/src/com/lidroid/xutils/sample/download/DownloadInfo.java
  197. +289 −0 sample/src/com/lidroid/xutils/sample/download/DownloadManager.java
  198. +85 −0 sample/src/com/lidroid/xutils/sample/download/DownloadService.java
  199. +80 −0 sample/src/com/lidroid/xutils/sample/entities/Child.java
  200. +14 −12 ...tils/exception/HttpException.java → sample/src/com/lidroid/xutils/sample/entities/EntityBase.java
  201. +84 −0 sample/src/com/lidroid/xutils/sample/entities/Parent.java
  202. +246 −0 sample/src/com/lidroid/xutils/sample/fragment/BitmapFragment.java
  203. +131 −0 sample/src/com/lidroid/xutils/sample/fragment/DbFragment.java
  204. +255 −0 sample/src/com/lidroid/xutils/sample/fragment/HttpFragment.java
  205. +0 −752 src/com/lidroid/xutils/BitmapUtils.java
  206. +0 −440 src/com/lidroid/xutils/DbUtils.java
  207. +0 −210 src/com/lidroid/xutils/HttpUtils.java
  208. +0 −175 src/com/lidroid/xutils/ViewUtils.java
  209. +0 −41 src/com/lidroid/xutils/bitmap/callback/ImageLoadCallBack.java
  210. +0 −66 src/com/lidroid/xutils/bitmap/callback/SimpleImageLoadCallBack.java
  211. +0 −390 src/com/lidroid/xutils/bitmap/core/BitmapCache.java
  212. +0 −81 src/com/lidroid/xutils/bitmap/core/BitmapCommonUtils.java
  213. +0 −99 src/com/lidroid/xutils/bitmap/core/BitmapDecoder.java
  214. +0 −88 src/com/lidroid/xutils/bitmap/core/BitmapDisplayConfig.java
  215. +0 −177 src/com/lidroid/xutils/bitmap/core/BitmapDownloadProcess.java
  216. +0 −47 src/com/lidroid/xutils/bitmap/core/FileNameGenerator.java
  217. +0 −931 src/com/lidroid/xutils/bitmap/core/LruDiskCache.java
  218. +0 −22 src/com/lidroid/xutils/bitmap/download/Downloader.java
  219. +0 −96 src/com/lidroid/xutils/bitmap/download/SimpleHttpDownloader.java
  220. +0 −61 src/com/lidroid/xutils/db/sqlite/CursorUtils.java
  221. +0 −302 src/com/lidroid/xutils/db/sqlite/SqlBuilder.java
  222. +0 −79 src/com/lidroid/xutils/db/sqlite/SqlInfo.java
  223. +0 −121 src/com/lidroid/xutils/db/table/Column.java
  224. +0 −164 src/com/lidroid/xutils/db/table/ColumnUtils.java
  225. +0 −82 src/com/lidroid/xutils/db/table/Table.java
  226. +0 −96 src/com/lidroid/xutils/db/table/TableUtils.java
  227. +0 −249 src/com/lidroid/xutils/http/HttpHandler.java
  228. +0 −61 src/com/lidroid/xutils/http/RequestCallBack.java
  229. +0 −82 src/com/lidroid/xutils/http/SyncHttpHandler.java
  230. +0 −84 src/com/lidroid/xutils/http/client/callback/FileDownloadHandler.java
  231. +0 −53 src/com/lidroid/xutils/http/client/callback/StringDownloadHandler.java
  232. +0 −123 src/com/lidroid/xutils/util/LogUtils.java
  233. +0 −24 src/com/lidroid/xutils/util/MimeTypeUtils.java
  234. +0 −83 src/com/lidroid/xutils/util/ReflectUtils.java
  235. +0 −212 src/com/lidroid/xutils/view/event/ViewCommonEventListener.java
  236. +0 −24 test/res/layout/main.xml
  237. +0 −4 test/res/values/strings.xml
  238. +0 −148 test/src/com/example/test/MyActivity.java
  239. +0 −77 test/src/com/example/test/TestEntity.java
  240. BIN xUtils-2.6.14.jar
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
*.class

# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
@@ -22,3 +21,8 @@ local.properties
# IDEA project files
*.iml
.idea/

# others
ant.properties
build.xml
META-INF
8 changes: 0 additions & 8 deletions AndroidManifest.xml

This file was deleted.

209 changes: 164 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
## xUtils简介
* xUtils3 api变化较多, 已转至 https://github.com/wyouflf/xUtils3
* xUtils 2.x对Android 6.0兼容不是很好, 请尽快升级至xUtils3.
* xUtils 包含了很多实用的android工具。
* xUtils 源于Afinal框架,对Afinal进行了适当的精简,和一些适度的扩展和重构。
* xUtils 具有Afinal的一些特性如:无需考虑bitmap在android中加载的时候oom的问题和快速滑动的时候图片加载位置错位等问题;
简洁,约定大于配置...

* xUtils 支持大文件上传,更全面的http请求协议支持(10种谓词),拥有更加灵活的ORM,更多的事件注解支持且不受混淆影响...
* xUitls 最低兼容android 2.2 (api level 8)

## 目前xUtils主要有四大模块:

* DbUtils模块:android中的orm框架,一行代码就可以进行增删改查。

* ViewUtils模块:android中的ioc框架,完全注解方式就可以进行UI绑定和事件绑定。

* HttpUtils模块:支持同步,异步方式的请求,支持大文件上传;支持GET,POST,PUT,MOVE,COPY,DELETE,HEAD请求,支持multipart上传设置subtype如related。

* BitmapUtils模块:加载bitmap的时候无需考虑bitmap加载过程中出现的oom和android容器快速滑动时候出现的图片错位等现象;内存管理使用lru算法,更好的管理bitmap内存;可配置线程加载线程数量,缓存大小,缓存路径,加载显示动画等...
* DbUtils模块:
> * android中的orm框架,一行代码就可以进行增删改查;
> * 支持事务,默认关闭;
> * 可通过注解自定义表名,列名,外键,唯一性约束,NOT NULL约束,CHECK约束等(需要混淆的时候请注解表名和列名);
> * 支持绑定外键,保存实体时外键关联实体自动保存或更新;
> * 自动加载外键关联实体,支持延时加载;
> * 支持链式表达查询,更直观的查询语义,参考下面的介绍或sample中的例子。
* ViewUtils模块:
> * android中的ioc框架,完全注解方式就可以进行UI,资源和事件绑定;
> * 新的事件绑定方式,使用混淆工具混淆后仍可正常工作;
> * 目前支持常用的20种事件绑定,参见ViewCommonEventListener类和包com.lidroid.xutils.view.annotation.event。
* HttpUtils模块:
> * 支持同步,异步方式的请求;
> * 支持大文件上传,上传大文件不会oom;
> * 支持GET,POST,PUT,MOVE,COPY,DELETE,HEAD,OPTIONS,TRACE,CONNECT请求;
> * 下载支持301/302重定向,支持设置是否根据Content-Disposition重命名下载的文件;
> * 返回文本内容的请求(默认只启用了GET请求)支持缓存,可设置默认过期时间和针对当前请求的过期时间。
* BitmapUtils模块:
> * 加载bitmap的时候无需考虑bitmap加载过程中出现的oom和android容器快速滑动时候出现的图片错位等现象;
> * 支持加载网络图片和本地图片;
> * 内存管理使用lru算法,更好的管理bitmap内存;
> * 可配置线程加载线程数量,缓存大小,缓存路径,加载显示动画等...

----
@@ -24,6 +42,13 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
```

----
## 混淆时注意事项:

* 添加Android默认混淆配置${sdk.dir}/tools/proguard/proguard-android.txt
* 不要混淆xUtils中的注解类型,添加混淆配置:-keep class * extends java.lang.annotation.Annotation { *; }
* 对使用DbUtils模块持久化的实体类不要混淆,或者注解所有表和列名称@Table(name="xxx"),@Id(column="xxx"),@Column(column="xxx"),@Foreign(column="xxx",foreign="xxx");

----
## DbUtils使用方法:

@@ -33,30 +58,98 @@ User user = new User(); //这里需要注意的是User对象必须有id属性,
user.setEmail("wyouflf@qq.com");
user.setName("wyouflf");
db.save(user); // 使用saveBindingId保存实体时会为实体的id赋值

...
// 查找
Parent entity = db.findById(Parent.class, parent.getId());
List<Parent> list = db.findAll(Parent.class);//通过类型查找

Parent Parent = db.findFirst(Selector.from(Parent.class).where("name","=","test"));

// IS NULL
Parent Parent = db.findFirst(Selector.from(Parent.class).where("name","=", null));
// IS NOT NULL
Parent Parent = db.findFirst(Selector.from(Parent.class).where("name","!=", null));

// WHERE id<54 AND (age>20 OR age<30) ORDER BY id LIMIT pageSize OFFSET pageOffset
List<Parent> list = db.findAll(Selector.from(Parent.class)
.where("id" ,"<", 54)
.and(WhereBuilder.b("age", ">", 20).or("age", " < ", 30))
.orderBy("id")
.limit(pageSize)
.offset(pageSize * pageIndex));

// op为"in"时,最后一个参数必须是数组或Iterable的实现类(例如List等)
Parent test = db.findFirst(Selector.from(Parent.class).where("id", "in", new int[]{1, 2, 3}));
// op为"between"时,最后一个参数必须是数组或Iterable的实现类(例如List等)
Parent test = db.findFirst(Selector.from(Parent.class).where("id", "between", new String[]{"1", "5"}));

DbModel dbModel = db.findDbModelAll(Selector.from(Parent.class).select("name"));//select("name")只取出name列
List<DbModel> dbModels = db.findDbModelAll(Selector.from(Parent.class).groupBy("name").select("name", "count(name)"));
...

List<DbModel> dbModels = db.findDbModelAll(sql); // 自定义sql查询
db.execNonQuery(sql) // 执行自定义sql
...

```

----
## ViewUtils使用方法
* 修改自原来的FinalActivity, 但没有使用继承式的实用方式。
* 完全注解方式就可以进行UI绑定和事件绑定。
* 无需findViewById和setClickListener等。

```java
@ViewInject(id=R.id.button,click="btnClick") Button button;
@ViewInject(id=R.id.textView) TextView textView;
// xUtils的view注解要求必须提供id,以使代码混淆不受影响。
@ViewInject(R.id.textView)
TextView textView;

//@ViewInject(vale=R.id.textView, parentId=R.id.parentView)
//TextView textView;

@ResInject(id = R.string.label, type = ResType.String)
private String label;

// 取消了之前使用方法名绑定事件的方式,使用id绑定不受混淆影响
// 支持绑定多个id @OnClick({R.id.id1, R.id.id2, R.id.id3})
// or @OnClick(value={R.id.id1, R.id.id2, R.id.id3}, parentId={R.id.pid1, R.id.pid2, R.id.pid3})
// 更多事件支持参见ViewCommonEventListener类和包com.lidroid.xutils.view.annotation.event。
@OnClick(R.id.test_button)
public void testButtonClick(View v) { // 方法签名必须和接口中的要求一致
...
}
...
//在使用注解对象之前调用(如onCreate中)
//在Activity中注入
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

ViewUtils.inject(this);

ViewUtils.inject(this); //注入view和事件
...
textView.setText("some text...");
...
}
//在Fragment中注入:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.bitmap_fragment, container, false); // 加载fragment布局
ViewUtils.inject(this, view); //注入view和事件
...
}
//在PreferenceFragment中注入:
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
ViewUtils.inject(this, getPreferenceScreen()); //注入view和事件
...
}
// 其他重载
// inject(View view);
// inject(Activity activity)
// inject(PreferenceActivity preferenceActivity)
// inject(Object handler, View view)
// inject(Object handler, Activity activity)
// inject(Object handler, PreferenceGroup preferenceGroup)
// inject(Object handler, PreferenceActivity preferenceActivity)
```

----
@@ -69,21 +162,21 @@ http.send(HttpRequest.HttpMethod.GET,
"http://www.lidroid.com",
new RequestCallBack<String>(){
@Override
public void onLoading(long total, long current) {
public void onLoading(long total, long current, boolean isUploading) {
testTextView.setText(current + "/" + total);
}

@Override
public void onSuccess(String result) {
textView.setText(result);
public void onSuccess(ResponseInfo<String> responseInfo) {
textView.setText(responseInfo.result);
}

@Override
public void onStart() {
}

@Override
public void onFailure((Throwable error, String msg) {
public void onFailure(HttpException error, String msg) {
}
});
```
@@ -95,13 +188,22 @@ http.send(HttpRequest.HttpMethod.GET,
RequestParams params = new RequestParams();
params.addHeader("name", "value");
params.addQueryStringParameter("name", "value");

// 只包含字符串参数时默认使用BodyParamsEntity,
// 类似于UrlEncodedFormEntity("application/x-www-form-urlencoded")。
params.addBodyParameter("name", "value");

// 加入文件参数后默认使用MultipartEntity("multipart/form-data"),
// 如需"multipart/related",xUtils中提供的MultipartEntity支持设置subType为"related"。
// 使用params.setBodyEntity(httpEntity)可设置更多类型的HttpEntity(如:
// MultipartEntity,BodyParamsEntity,FileUploadEntity,InputStreamUploadEntity,StringEntity)。
// 例如发送json参数:params.setBodyEntity(new StringEntity(jsonStr,charset));
params.addBodyParameter("file", new File("path"));
...

HttpUtils http = new HttpUtils();
http.send(HttpRequest.HttpMethod.POST,
"updloadurl....",
"uploadUrl....",
params,
new RequestCallBack<String>() {

@@ -111,18 +213,22 @@ http.send(HttpRequest.HttpMethod.POST,
}

@Override
public void onLoading(long total, long current) {
testTextView.setText(current + "/" + total);
public void onLoading(long total, long current, boolean isUploading) {
if (isUploading) {
testTextView.setText("upload: " + current + "/" + total);
} else {
testTextView.setText("reply: " + current + "/" + total);
}
}

@Override
public void onSuccess(String result) {
testTextView.setText("downloaded:" + result.getPath());
public void onSuccess(ResponseInfo<String> responseInfo) {
testTextView.setText("reply: " + responseInfo.result);
}

@Override
public void onFailure(Throwable error, String msg) {
testTextView.setText(msg);
public void onFailure(HttpException error, String msg) {
testTextView.setText(error.getExceptionCode() + ":" + msg);
}
});
```
@@ -135,6 +241,8 @@ http.send(HttpRequest.HttpMethod.POST,
HttpUtils http = new HttpUtils();
HttpHandler handler = http.download("http://apache.dataguru.cn/httpcomponents/httpclient/source/httpcomponents-client-4.2.5-src.zip",
"/sdcard/httpcomponents-client-4.2.5-src.zip",
true, // 如果目标文件存在,接着未完成的部分继续下载。服务器不支持RANGE时将从新下载。
true, // 如果从请求返回信息中获取到文件名,下载完成后自动重命名。
new RequestCallBack<File>() {

@Override
@@ -143,49 +251,60 @@ HttpHandler handler = http.download("http://apache.dataguru.cn/httpcomponents/ht
}

@Override
public void onLoading(long total, long current) {
public void onLoading(long total, long current, boolean isUploading) {
testTextView.setText(current + "/" + total);
}

@Override
public void onSuccess(File result) {
testTextView.setText("downloaded:" + result.getPath());
public void onSuccess(ResponseInfo<File> responseInfo) {
testTextView.setText("downloaded:" + responseInfo.result.getPath());
}


@Override
public void onFailure(Throwable error, String msg) {
public void onFailure(HttpException error, String msg) {
testTextView.setText(msg);
}
});

...
//调用stop()方法停止下载
handler.stop();
//调用cancel()方法停止下载
handler.cancel();
...
```

----
## BitmapUtils 使用方法

```java
BitmapUtils.create(this).display(testImageView, "http://bbs.lidroid.com/static/image/common/logo.png");
BitmapUtils bitmapUtils = new BitmapUtils(this);

// 加载网络图片
bitmapUtils.display(testImageView, "http://bbs.lidroid.com/static/image/common/logo.png");

// 加载本地图片(路径以/开头, 绝对路径)
bitmapUtils.display(testImageView, "/sdcard/test.jpg");

// 加载assets中的图片(路径以assets开头)
bitmapUtils.display(testImageView, "assets/img/wallpaper.jpg");

// 使用ListView等容器展示图片时可通过PauseOnScrollListener控制滑动和快速滑动过程中时候暂停加载图片
listView.setOnScrollListener(new PauseOnScrollListener(bitmapUtils, false, true));
listView.setOnScrollListener(new PauseOnScrollListener(bitmapUtils, false, true, customListener));
```

----
## 其他
## 其他***更多示例代码见sample文件夹中的代码***
### 输出日志 LogUtils

```java
LogUtils.d("wyouflf"); // 自动添加TAG,格式: className[methodName, lineNumber]
// 自动添加TAG,格式: className.methodName(L:lineNumber)
// 可设置全局的LogUtils.allowD = false,LogUtils.allowI = false...,控制是否输出log。
// 自定义log输出LogUtils.customLogger = new xxxLogger();
LogUtils.d("wyouflf");
```

----
# 关于作者
* Email: <wyouflf@gmail.com>
* 有问题可以给我发邮件

# 关于Afinal
* <https://github.com/yangfuhai/afinal>


* Email: <wyouflf@qq.com>, <wyouflf@gmail.com>
* 有任何建议或者使用中遇到问题都可以给我发邮件, 你也可以加入QQ群:330445659(已满), 275967695, 257323060,技术交流,idea分享 *_*
8 changes: 8 additions & 0 deletions library/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lidroid.xutils"
android:versionCode="2606"
android:versionName="2.6.6">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/>
<application/>
</manifest>
15 changes: 15 additions & 0 deletions library/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

android.library=true
# Project target.
target=android-8
Loading