diff --git a/个人任务分工表_之前那个传错了.png b/个人任务分工表_之前那个传错了.png new file mode 100644 index 0000000..338edc1 Binary files /dev/null and b/个人任务分工表_之前那个传错了.png differ diff --git a/代码/在这里3.0/bin/Shop.apk b/代码/在这里3.0/bin/Shop.apk index 239ce25..aa60ed3 100644 Binary files a/代码/在这里3.0/bin/Shop.apk and b/代码/在这里3.0/bin/Shop.apk differ diff --git a/代码/在这里3.0/bin/classes.dex b/代码/在这里3.0/bin/classes.dex index e429af8..9071149 100644 Binary files a/代码/在这里3.0/bin/classes.dex and b/代码/在这里3.0/bin/classes.dex differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/BXTListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/BXTListAdapter.class index c0376dc..e10b4fc 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/BXTListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/BXTListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter$ViewHolder.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter$ViewHolder.class index de38d75..f269e16 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter$ViewHolder.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter$ViewHolder.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter.class index afbc9f4..519fb97 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ClassroomAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GoodsListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GoodsListAdapter.class index a1a8702..bac6ae6 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GoodsListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GoodsListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GridAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GridAdapter.class index 765820f..d51bdb3 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GridAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/GridAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InfoNewsListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InfoNewsListAdapter.class index f03fe80..86beded 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InfoNewsListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InfoNewsListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InformationListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InformationListAdapter.class index 7638c87..c072602 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InformationListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/InformationListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineListAdapter.class index 9bbd907..07cfae2 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineSoftAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineSoftAdapter.class index 40eb1d2..98a1a16 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineSoftAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/MineSoftAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/NewsListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/NewsListAdapter.class index 8497753..cde5f5e 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/NewsListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/NewsListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/OrderInfoListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/OrderInfoListAdapter.class index ea00fcb..7582ca3 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/OrderInfoListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/OrderInfoListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/SCommentAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/SCommentAdapter.class index a491b51..6278967 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/SCommentAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/SCommentAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ShopListAdapter.class b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ShopListAdapter.class index a4729c6..4a267ea 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ShopListAdapter.class and b/代码/在这里3.0/bin/classes/com/stone/shop/adapter/ShopListAdapter.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/model/BXTNews.class b/代码/在这里3.0/bin/classes/com/stone/shop/model/BXTNews.class index d6e8093..86cdc99 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/model/BXTNews.class and b/代码/在这里3.0/bin/classes/com/stone/shop/model/BXTNews.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/model/Good.class b/代码/在这里3.0/bin/classes/com/stone/shop/model/Good.class index 64769d9..86d57b1 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/model/Good.class and b/代码/在这里3.0/bin/classes/com/stone/shop/model/Good.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/model/News.class b/代码/在这里3.0/bin/classes/com/stone/shop/model/News.class index d206387..9ea95b1 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/model/News.class and b/代码/在这里3.0/bin/classes/com/stone/shop/model/News.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/model/SComment.class b/代码/在这里3.0/bin/classes/com/stone/shop/model/SComment.class index be7ff20..9e86c65 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/model/SComment.class and b/代码/在这里3.0/bin/classes/com/stone/shop/model/SComment.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/model/Shop.class b/代码/在这里3.0/bin/classes/com/stone/shop/model/Shop.class index 469f145..ece843d 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/model/Shop.class and b/代码/在这里3.0/bin/classes/com/stone/shop/model/Shop.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/model/User.class b/代码/在这里3.0/bin/classes/com/stone/shop/model/User.class index c272efb..c140d66 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/model/User.class and b/代码/在这里3.0/bin/classes/com/stone/shop/model/User.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$1.class index c1231d8..5aaf2ac 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$2.class index ad536f7..243feb0 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$3.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$3.class index ebafc2c..5a75215 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$3.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity$3.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity.class index 8d9e1d4..eba9fb9 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/AwardActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity$1.class index 1af107c..fa5b32f 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity.class index a318a1d..496c8ec 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTNewsActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTNewsActivity.class index 3363456..64079bd 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTNewsActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/BXTNewsActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/BaseActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/BaseActivity.class index 4599b36..e36ab8b 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/BaseActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/BaseActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity$1.class index 5ef6ff6..a07cd1e 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity.class index 09a7b5f..e4f0f4c 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ClassroomActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$1.class index a8f650b..1222170 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$2.class index abf49aa..eca2c67 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3$1.class index a82e5ed..a562b12 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3.class index 5c4d4ba..452a270 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$3.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$4.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$4.class index a80af3b..b972d9b 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$4.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$4.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$5.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$5.class index edf5ae9..7c9c1b0 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$5.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity$5.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity.class index 4cb012a..b24b8e4 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/CommentActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity$1.class index 229ff2f..2e468d6 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity.class index f37d8f1..cee70b1 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/FeedBackActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity$1.class index ea9875b..47b49c2 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity.class index 7be5539..800d44e 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/HomeActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoContentActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoContentActivity.class index 8446c9d..6b0f013 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoContentActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoContentActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoNewsContentActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoNewsContentActivity.class index 5b1b8c2..db96747 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoNewsContentActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/InfoNewsContentActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity$1.class index 8a757a5..4aa38a9 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity.class index 85e846c..04055fb 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/InformationActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryActivity.class index b24a37a..d84375b 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$1.class index 142204e..fc7edb2 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1$1.class index 2b69c52..3c9ec6d 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1.class index fa7f84e..fa27442 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2.class index 6b02aa9..efb8011 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity.class index 890a669..6f3ad50 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LibraryReservationActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$1.class index 6be525c..13c7193 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$2.class index 24e7476..9cf2561 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$3.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$3.class index bbefb4f..9c65419 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$3.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$3.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4$1.class index 8d23700..2f40aa5 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4.class index 4b82473..c68d858 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$4.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$BaseUiListener.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$BaseUiListener.class index 6f8f43a..035a1cb 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$BaseUiListener.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity$BaseUiListener.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity.class index c9231b2..778d87e 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/LoginActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$1.class index 32158be..858af0f 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$2.class index 784b166..6bd99a6 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity.class index 51bbe18..c6a424b 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoActivity.class index 6dae258..099c0c4 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$1.class index 7a78ecb..d0ae0ab 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$2.class index bc4a35c..d93a0a8 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$3.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$3.class index e4b5cf8..079974e 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$3.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity$3.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity.class index 5df6219..14cbd73 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MineInfoEditActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiScreenActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiScreenActivity.class index 4b61705..ef553b3 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiScreenActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiScreenActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiViewGroup.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiViewGroup.class index d53bd2b..ba88716 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiViewGroup.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/MultiViewGroup.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/NewsActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/NewsActivity.class index a37c84c..bef67fc 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/NewsActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/NewsActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$1.class index 0415ea2..0ab4111 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$2.class index 18ff9f8..a73fffc 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity.class index 6c5f543..af1465b 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$1.class index 2146936..7b359b8 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$2.class index 4df351b..1920a25 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity.class index f111a48..32bb86f 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/OrderInfoActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity$1.class index 3e752d4..1db7471 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity.class index ebf24b7..48820bd 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/RegisterActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$1.class index 5244fb4..23c3338 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1$1.class index 004ab0c..b0d9444 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1.class index 02934e8..36b18fd 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2.class index 1673255..fa35b95 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity.class index 776abdd..23ec261 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ReservationActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopActivity.class index ed54296..90d1f67 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity$1.class index fb11778..6d201df 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity.class index a468c05..566cf96 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopAllActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity$1.class index f355493..9b1b460 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity.class index 94f3f55..98abd78 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/ShopItemActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity$1.class index 56d7d00..1dfe8aa 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity.class index c44312b..f1d0e71 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/WsqActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity$1.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity$1.class index a05db6c..7804c8b 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity$1.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity.class b/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity.class index 469e35b..28ef2a5 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity.class and b/代码/在这里3.0/bin/classes/com/stone/shop/view/old/OldMineActivity.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager$MyHandler.class b/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager$MyHandler.class index 75e985d..1e096e1 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager$MyHandler.class and b/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager$MyHandler.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager.class b/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager.class index 3c31662..09e1cd1 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager.class and b/代码/在这里3.0/bin/classes/com/stone/ui/AutoScrollViewPager.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/ui/CustomDurationScroller.class b/代码/在这里3.0/bin/classes/com/stone/ui/CustomDurationScroller.class index cb8dd98..04ced10 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/ui/CustomDurationScroller.class and b/代码/在这里3.0/bin/classes/com/stone/ui/CustomDurationScroller.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$1.class b/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$1.class index dd4d7e1..2650c7e 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$1.class and b/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$2.class b/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$2.class index ecdb945..82c0e7b 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$2.class and b/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil$2.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil.class b/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil.class index d6a6e5b..8076767 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil.class and b/代码/在这里3.0/bin/classes/com/stone/ui/DateTimePickDialogUtil.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/ui/ViewPagerCompat.class b/代码/在这里3.0/bin/classes/com/stone/ui/ViewPagerCompat.class index 7aa7bd4..1540878 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/ui/ViewPagerCompat.class and b/代码/在这里3.0/bin/classes/com/stone/ui/ViewPagerCompat.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/util/ToastFactory.class b/代码/在这里3.0/bin/classes/com/stone/util/ToastFactory.class index ed1e7d1..8b29df8 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/util/ToastFactory.class and b/代码/在这里3.0/bin/classes/com/stone/util/ToastFactory.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/util/Util$1.class b/代码/在这里3.0/bin/classes/com/stone/util/Util$1.class index db560d7..e1c38f2 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/util/Util$1.class and b/代码/在这里3.0/bin/classes/com/stone/util/Util$1.class differ diff --git a/代码/在这里3.0/bin/classes/com/stone/util/Util.class b/代码/在这里3.0/bin/classes/com/stone/util/Util.class index 3c5a93c..0b125ae 100644 Binary files a/代码/在这里3.0/bin/classes/com/stone/util/Util.class and b/代码/在这里3.0/bin/classes/com/stone/util/Util.class differ diff --git a/代码/在这里3.0/bin/dexedLibs/BmobSDK_V3.3.4_0310-959d491faede09877edd4bca7e87b2f3.jar b/代码/在这里3.0/bin/dexedLibs/BmobSDK_V3.3.4_0310-959d491faede09877edd4bca7e87b2f3.jar new file mode 100644 index 0000000..0318bb4 Binary files /dev/null and b/代码/在这里3.0/bin/dexedLibs/BmobSDK_V3.3.4_0310-959d491faede09877edd4bca7e87b2f3.jar differ diff --git a/代码/在这里3.0/bin/dexedLibs/android-support-v4-8aa32c063ffa95f41612c8459081d1bc.jar b/代码/在这里3.0/bin/dexedLibs/android-support-v4-8aa32c063ffa95f41612c8459081d1bc.jar new file mode 100644 index 0000000..420ac4e Binary files /dev/null and b/代码/在这里3.0/bin/dexedLibs/android-support-v4-8aa32c063ffa95f41612c8459081d1bc.jar differ diff --git a/代码/在这里3.0/bin/dexedLibs/bmobPush_0.1beta-58692f8f0e90f48a557b18c38e886d35.jar b/代码/在这里3.0/bin/dexedLibs/bmobPush_0.1beta-58692f8f0e90f48a557b18c38e886d35.jar new file mode 100644 index 0000000..d08da4a Binary files /dev/null and b/代码/在这里3.0/bin/dexedLibs/bmobPush_0.1beta-58692f8f0e90f48a557b18c38e886d35.jar differ diff --git a/代码/在这里3.0/bin/dexedLibs/mta-sdk-1.6.2-f81962e36934419d90510c8fe39a2ebc.jar b/代码/在这里3.0/bin/dexedLibs/mta-sdk-1.6.2-f81962e36934419d90510c8fe39a2ebc.jar new file mode 100644 index 0000000..976b87d Binary files /dev/null and b/代码/在这里3.0/bin/dexedLibs/mta-sdk-1.6.2-f81962e36934419d90510c8fe39a2ebc.jar differ diff --git a/代码/在这里3.0/bin/dexedLibs/open_sdk_r5756-66959d2f52ef990d4727d4580369efa1.jar b/代码/在这里3.0/bin/dexedLibs/open_sdk_r5756-66959d2f52ef990d4727d4580369efa1.jar new file mode 100644 index 0000000..254199d Binary files /dev/null and b/代码/在这里3.0/bin/dexedLibs/open_sdk_r5756-66959d2f52ef990d4727d4580369efa1.jar differ diff --git a/代码/在这里3.0/bin/resources.ap_ b/代码/在这里3.0/bin/resources.ap_ index f57f93f..2a8052d 100644 Binary files a/代码/在这里3.0/bin/resources.ap_ and b/代码/在这里3.0/bin/resources.ap_ differ diff --git a/代码/在这里3.0/project.properties b/代码/在这里3.0/project.properties index 5c5f4c7..17bdc51 100644 --- a/代码/在这里3.0/project.properties +++ b/代码/在这里3.0/project.properties @@ -11,5 +11,5 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-20 +target=android-18 proguard.config=proguard.cfg diff --git a/代码/在这里3.0/project.properties~HEAD b/代码/在这里3.0/project.properties~HEAD new file mode 100644 index 0000000..5c5f4c7 --- /dev/null +++ b/代码/在这里3.0/project.properties~HEAD @@ -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 + +# Project target. +target=android-20 +proguard.config=proguard.cfg diff --git a/代码/在这里3.0/project.properties~qinjiaming_branch b/代码/在这里3.0/project.properties~qinjiaming_branch new file mode 100644 index 0000000..17bdc51 --- /dev/null +++ b/代码/在这里3.0/project.properties~qinjiaming_branch @@ -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 + +# Project target. +target=android-18 +proguard.config=proguard.cfg diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/BXTListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/BXTListAdapter.java index df02860..656c523 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/BXTListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/BXTListAdapter.java @@ -1,11 +1,9 @@ package com.stone.shop.adapter; -import java.util.Iterator; import java.util.List; import com.stone.shop.R; import com.stone.shop.model.BXTNews; -import com.stone.shop.model.Good; import android.content.Context; import android.util.Log; @@ -13,7 +11,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; -import android.widget.Button; import android.widget.TextView; /** @@ -24,12 +21,10 @@ import android.widget.TextView; */ public class BXTListAdapter extends BaseAdapter { - private Context mContext; private List mNewsList; // 商品列表信息 private LayoutInflater mInflater = null; public BXTListAdapter(Context context, List newsList) { - mContext = context; mNewsList = newsList; mInflater = LayoutInflater.from(context); } diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/ClassroomAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/ClassroomAdapter.java index 7deb441..4862b6d 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/ClassroomAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/ClassroomAdapter.java @@ -14,12 +14,10 @@ import android.widget.TextView; public class ClassroomAdapter extends BaseAdapter { - private Context mContext; private List mNewsList; // 商品列表信息 private LayoutInflater mInflater = null; public ClassroomAdapter(Context context, List newsList) { - mContext = context; mNewsList = newsList; mInflater = LayoutInflater.from(context); } diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/GoodsListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/GoodsListAdapter.java index 0befe9a..0c3b611 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/GoodsListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/GoodsListAdapter.java @@ -7,7 +7,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; -import android.widget.Button; import android.widget.TextView; import com.stone.shop.R; @@ -15,12 +14,11 @@ import com.stone.shop.model.Good; public class GoodsListAdapter extends BaseAdapter { - private Context mContext; + private List mGoodsList; // 商品列表信息 private LayoutInflater mInflater = null; public GoodsListAdapter(Context context, List goodsList) { - mContext = context; mGoodsList = goodsList; mInflater = LayoutInflater.from(context); } diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/GridAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/GridAdapter.java index 7b8e023..3fc0aed 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/GridAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/GridAdapter.java @@ -1,6 +1,5 @@ package com.stone.shop.adapter; -import android.R.integer; import android.content.Context; import android.view.View; import android.view.ViewGroup; @@ -23,21 +22,21 @@ public class GridAdapter extends BaseAdapter { private int mIndex = 0; // 代表当前需要适配页面中第几个GridView //学习小菜 - public static String[] mSchoolTexts = TypeDef.typeSonList1; + public static final String[] mSchoolTexts = TypeDef.typeSonList1; private int[] mSchoolImages = { R.drawable.ic_8, R.drawable.ic_8, R.drawable.ic_8 }; //吃饭小菜 - public static String[] mFoodTexts = TypeDef.typeSonList2; + public static final String[] mFoodTexts = TypeDef.typeSonList2; private int[] mFoodImages = { R.drawable.ic_41, R.drawable.ic_42}; //购物小菜 - public static String[] mGiftTexts = TypeDef.typeSonList3; + public static final String[] mGiftTexts = TypeDef.typeSonList3; private int[] mGiftImages = { R.drawable.ic_7, R.drawable.ic_7, R.drawable.ic_7, R.drawable.ic_7, R.drawable.ic_7, R.drawable.ic_7, R.drawable.ic_7}; //疯狂小菜 - public static String[] mOutTexts = TypeDef.typeSonList4; + public static final String[] mOutTexts = TypeDef.typeSonList4; private int[] mOutImages = { R.drawable.ic_3, R.drawable.ic_3, R.drawable.ic_3, R.drawable.ic_3, R.drawable.ic_3, R.drawable.ic_3, R.drawable.ic_3 }; @@ -82,8 +81,6 @@ public class GridAdapter extends BaseAdapter { @Override public View getView(int position, View convertView, ViewGroup parent) { View view = View.inflate(mContext, R.layout.shop_grid_item, null); - // RelativeLayout rl = (RelativeLayout) - // view.findViewById(R.id.relaGrid); ImageView image = (ImageView) view.findViewById(R.id.img_chooseImage); TextView text = (TextView) view.findViewById(R.id.tv_chooseText); diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/InfoNewsListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/InfoNewsListAdapter.java index 266551b..f1965cc 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/InfoNewsListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/InfoNewsListAdapter.java @@ -1,15 +1,11 @@ package com.stone.shop.adapter; -import java.util.ArrayList; import java.util.List; import com.stone.shop.R; import com.stone.shop.model.Information; -import com.stone.shop.model.News; -import android.R.integer; import android.content.Context; -//import android.graphics.pdf.PdfDocument.Page; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -24,12 +20,10 @@ import android.widget.TextView; */ public class InfoNewsListAdapter extends BaseAdapter { - private Context mContext; private LayoutInflater mInflater = null; private List mInfoNewsList = null; public InfoNewsListAdapter(Context context, List infonewsList) { - mContext = context; mInfoNewsList = infonewsList; mInflater = LayoutInflater.from(context); } @@ -72,7 +66,7 @@ public class InfoNewsListAdapter extends BaseAdapter { newsHolder = (NewsHolder) convertView.getTag(); } //拆分字符串,只取年月日 - String[] ss = new String[2]; + String[] ss; ss = mInfoNewsList.get(position).getCreatedAt().split(" "); newsHolder.tvNewsType.setText(mInfoNewsList.get(position).getHolder()); //新闻单位 newsHolder.tvNewsTitle.setText(mInfoNewsList.get(position).getTitle()); //新闻标题 diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/InformationListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/InformationListAdapter.java index 8c6909e..7fac847 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/InformationListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/InformationListAdapter.java @@ -3,7 +3,6 @@ package com.stone.shop.adapter; import java.util.List; import com.stone.shop.R; -import com.stone.shop.model.BXTNews; import com.stone.shop.model.Information; import android.content.Context; @@ -22,31 +21,26 @@ import android.widget.TextView; */ public class InformationListAdapter extends BaseAdapter { - private Context mContext; private List mInfoList; // 商品列表信息 private LayoutInflater mInflater = null; public InformationListAdapter(Context context, List infoList) { - mContext = context; mInfoList = infoList; mInflater = LayoutInflater.from(context); } @Override public int getCount() { - // TODO Auto-generated method stub return mInfoList.size(); } @Override public Object getItem(int position) { - // TODO Auto-generated method stub return mInfoList.get(position); } @Override public long getItemId(int position) { - // TODO Auto-generated method stub return position; } @@ -59,7 +53,6 @@ public class InformationListAdapter extends BaseAdapter { @Override public View getView(int position, View convertView, ViewGroup parent) { - // TODO Auto-generated method stub BXTNewsHolder newsHolder; if (convertView == null) { convertView = mInflater.inflate(R.layout.info_list_item, null); diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/MineListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/MineListAdapter.java index 29a2f69..fbb4a70 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/MineListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/MineListAdapter.java @@ -17,14 +17,12 @@ import com.stone.shop.R; */ public class MineListAdapter extends BaseAdapter { - private Context mContext; private String[] mItemNames; // 项目列表名称 private String[] mItemContents; //项目列表的备注值 private int[] mItemImgIds; // 项目列表Icon private LayoutInflater mInflater = null; public MineListAdapter(Context context, String[] names, String[] contents, int[] imgIds) { - mContext = context; mItemNames = names; mItemContents = contents; mItemImgIds = imgIds; diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/MineSoftAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/MineSoftAdapter.java index 9dae107..aedeecf 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/MineSoftAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/MineSoftAdapter.java @@ -5,7 +5,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; -import android.widget.ImageView; import android.widget.TextView; import com.stone.shop.R; @@ -17,13 +16,11 @@ import com.stone.shop.R; */ public class MineSoftAdapter extends BaseAdapter { - private Context mContext; private String[] mItemNames; // 项目列表名称 private String[] mItemContents; //项目列表的备注值 private LayoutInflater mInflater = null; public MineSoftAdapter(Context context, String[] names, String[] contents) { - mContext = context; mItemNames = names; mItemContents = contents; mInflater = LayoutInflater.from(context); diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java index 92264ca..272608d 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java @@ -6,9 +6,7 @@ import java.util.List; import com.stone.shop.R; import com.stone.shop.model.News; -import android.R.integer; import android.content.Context; -import android.graphics.pdf.PdfDocument.Page; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -23,12 +21,10 @@ import android.widget.TextView; */ public class NewsListAdapter extends BaseAdapter { - private Context mContext; private LayoutInflater mInflater = null; private List mNewsList = null; // 所选分类下的所有店铺列表 public NewsListAdapter(Context context, List newsList) { - mContext = context; mNewsList = newsList; mInflater = LayoutInflater.from(context); } @@ -49,7 +45,7 @@ public class NewsListAdapter extends BaseAdapter { } // 刷新列表中的数据 - public void refresh(ArrayList list) { + public void refresh(List list) { mNewsList = list; notifyDataSetChanged(); } @@ -71,7 +67,7 @@ public class NewsListAdapter extends BaseAdapter { newsHolder = (NewsHolder) convertView.getTag(); } //拆分字符串,只取年月日 - String[] ss = new String[2]; + String[] ss; ss = mNewsList.get(position).getCreatedAt().split(" "); newsHolder.tvNewsType.setText(mNewsList.get(position).getType()); //新闻类型 newsHolder.tvNewsTitle.setText(mNewsList.get(position).getTitle()); //新闻标题 diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java~HEAD b/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java~HEAD new file mode 100644 index 0000000..92264ca --- /dev/null +++ b/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java~HEAD @@ -0,0 +1,82 @@ +package com.stone.shop.adapter; + +import java.util.ArrayList; +import java.util.List; + +import com.stone.shop.R; +import com.stone.shop.model.News; + +import android.R.integer; +import android.content.Context; +import android.graphics.pdf.PdfDocument.Page; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + +/** + * 新闻列表适配器 + * + * @date 2014-5-3 + * @author Stone + */ +public class NewsListAdapter extends BaseAdapter { + + private Context mContext; + private LayoutInflater mInflater = null; + private List mNewsList = null; // 所选分类下的所有店铺列表 + + public NewsListAdapter(Context context, List newsList) { + mContext = context; + mNewsList = newsList; + mInflater = LayoutInflater.from(context); + } + + @Override + public int getCount() { + return mNewsList.size(); + } + + @Override + public Object getItem(int position) { + return mNewsList.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + // 刷新列表中的数据 + public void refresh(ArrayList list) { + mNewsList = list; + notifyDataSetChanged(); + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + NewsHolder newsHolder; + if (convertView == null) { + convertView = mInflater.inflate(R.layout.news_list_item, null); + newsHolder = new NewsHolder(); + newsHolder.tvNewsType = (TextView) convertView + .findViewById(R.id.tv_news_type); + newsHolder.tvNewsTitle = (TextView) convertView + .findViewById(R.id.tv_news_title); + newsHolder.tvNewsDate = (TextView) convertView + .findViewById(R.id.tv_news_date); + convertView.setTag(newsHolder); + } else { + newsHolder = (NewsHolder) convertView.getTag(); + } + //拆分字符串,只取年月日 + String[] ss = new String[2]; + ss = mNewsList.get(position).getCreatedAt().split(" "); + newsHolder.tvNewsType.setText(mNewsList.get(position).getType()); //新闻类型 + newsHolder.tvNewsTitle.setText(mNewsList.get(position).getTitle()); //新闻标题 + newsHolder.tvNewsDate.setText(ss[0]); //新闻发布日期 + return convertView; + } + +} diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java~qinjiaming_branch b/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java~qinjiaming_branch new file mode 100644 index 0000000..98c82f2 --- /dev/null +++ b/代码/在这里3.0/src/com/stone/shop/adapter/NewsListAdapter.java~qinjiaming_branch @@ -0,0 +1,81 @@ +package com.stone.shop.adapter; + +import java.util.ArrayList; +import java.util.List; + +import com.stone.shop.R; +import com.stone.shop.model.News; + +import android.R.integer; +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + +/** + * 新闻列表适配器 + * + * @date 2014-5-3 + * @author Stone + */ +public class NewsListAdapter extends BaseAdapter { + + private Context mContext; + private LayoutInflater mInflater = null; + private List mNewsList = null; // 所选分类下的所有店铺列表 + + public NewsListAdapter(Context context, List newsList) { + mContext = context; + mNewsList = newsList; + mInflater = LayoutInflater.from(context); + } + + @Override + public int getCount() { + return mNewsList.size(); + } + + @Override + public Object getItem(int position) { + return mNewsList.get(position); + } + + @Override + public long getItemId(int position) { + return position; + } + + // 刷新列表中的数据 + public void refresh(ArrayList list) { + mNewsList = list; + notifyDataSetChanged(); + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + NewsHolder newsHolder; + if (convertView == null) { + convertView = mInflater.inflate(R.layout.news_list_item, null); + newsHolder = new NewsHolder(); + newsHolder.tvNewsType = (TextView) convertView + .findViewById(R.id.tv_news_type); + newsHolder.tvNewsTitle = (TextView) convertView + .findViewById(R.id.tv_news_title); + newsHolder.tvNewsDate = (TextView) convertView + .findViewById(R.id.tv_news_date); + convertView.setTag(newsHolder); + } else { + newsHolder = (NewsHolder) convertView.getTag(); + } + //拆分字符串,只取年月日 + String[] ss = new String[2]; + ss = mNewsList.get(position).getCreatedAt().split(" "); + newsHolder.tvNewsType.setText(mNewsList.get(position).getType()); //新闻类型 + newsHolder.tvNewsTitle.setText(mNewsList.get(position).getTitle()); //新闻标题 + newsHolder.tvNewsDate.setText(ss[0]); //新闻发布日期 + return convertView; + } + +} diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/OrderInfoListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/OrderInfoListAdapter.java index 35c9294..12fe42e 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/OrderInfoListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/OrderInfoListAdapter.java @@ -1,7 +1,5 @@ package com.stone.shop.adapter; -import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import android.content.Context; @@ -11,15 +9,10 @@ import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; -import cn.bmob.v3.BmobQuery; -import cn.bmob.v3.listener.GetListener; -import com.stone.date.TypeDef; import com.stone.shop.R; -import com.stone.shop.model.Good; import com.stone.shop.model.Order; -import com.stone.shop.model.Shop; -import com.stone.shop.view.OrderInfoActivity; + /** * 适配器--适配订单列表中的数据 @@ -29,13 +22,10 @@ import com.stone.shop.view.OrderInfoActivity; */ public class OrderInfoListAdapter extends BaseAdapter { - private Context mContext; private LayoutInflater mInflater = null; private List mOrderList = null; // 所选分类下的所有店铺列表 - private String mType; // 商店的分类 public OrderInfoListAdapter(Context context, List orderList) { - mContext = context; mOrderList = orderList; mInflater = LayoutInflater.from(context); } diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/SCommentAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/SCommentAdapter.java index 98cf470..c3d48c9 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/SCommentAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/SCommentAdapter.java @@ -19,12 +19,10 @@ import android.widget.TextView; */ public class SCommentAdapter extends BaseAdapter { - private Context mContext; private LayoutInflater mInflater = null; private List mSComList = null; // 所选分类下的所有店铺列表 public SCommentAdapter(Context context, List list) { - mContext = context; mSComList = list; mInflater = LayoutInflater.from(context); } diff --git a/代码/在这里3.0/src/com/stone/shop/adapter/ShopListAdapter.java b/代码/在这里3.0/src/com/stone/shop/adapter/ShopListAdapter.java index 539a17f..cd23303 100644 --- a/代码/在这里3.0/src/com/stone/shop/adapter/ShopListAdapter.java +++ b/代码/在这里3.0/src/com/stone/shop/adapter/ShopListAdapter.java @@ -2,7 +2,6 @@ package com.stone.shop.adapter; import java.util.ArrayList; import java.util.Iterator; -import java.util.List; import android.content.Context; import android.view.LayoutInflater; @@ -23,14 +22,12 @@ import com.stone.shop.model.Shop; */ public class ShopListAdapter extends BaseAdapter { - private Context mContext; private LayoutInflater mInflater = null; private ArrayList mShopList = null; // 所选分类下的所有店铺列表 private String mType; // 商店的分类 public ShopListAdapter(Context context, ArrayList shopList, String type) { - mContext = context; mShopList = shopList; mType = type; mInflater = LayoutInflater.from(context); diff --git a/代码/在这里3.0/src/com/stone/shop/model/BXTNews.java b/代码/在这里3.0/src/com/stone/shop/model/BXTNews.java index fb8f926..2137fb2 100644 --- a/代码/在这里3.0/src/com/stone/shop/model/BXTNews.java +++ b/代码/在这里3.0/src/com/stone/shop/model/BXTNews.java @@ -9,8 +9,6 @@ import cn.bmob.v3.BmobObject; */ public class BXTNews extends BmobObject{ - //private String id; - private String title; //标题 private String topic; //讲座主题 private String speaker; //主 讲 人 diff --git a/代码/在这里3.0/src/com/stone/shop/model/Good.java b/代码/在这里3.0/src/com/stone/shop/model/Good.java index b0a9ac8..dde7f69 100644 --- a/代码/在这里3.0/src/com/stone/shop/model/Good.java +++ b/代码/在这里3.0/src/com/stone/shop/model/Good.java @@ -17,11 +17,9 @@ public class Good extends BmobObject implements Serializable{ //private String id; 商品ID, 默认 private String shopID = ""; // 商店ID - private String shopName = ""; //商店名称 private String type = ""; // 类型 private String name = ""; // 名称 private String price = ""; // 价格 - private BmobFile picGood = null; // 商品主图 public Good(String name, String price) { this.name = name; diff --git a/代码/在这里3.0/src/com/stone/shop/model/News.java b/代码/在这里3.0/src/com/stone/shop/model/News.java index b169779..d9dfbce 100644 --- a/代码/在这里3.0/src/com/stone/shop/model/News.java +++ b/代码/在这里3.0/src/com/stone/shop/model/News.java @@ -10,9 +10,6 @@ import cn.bmob.v3.BmobObject; */ public class News extends BmobObject { - // private String id; - // private String time; - private String type; // 新闻类型 private String title; // 新闻标题 private String author; // 新闻作者 diff --git a/代码/在这里3.0/src/com/stone/shop/model/SComment.java b/代码/在这里3.0/src/com/stone/shop/model/SComment.java index 7abf4ae..002c9e3 100644 --- a/代码/在这里3.0/src/com/stone/shop/model/SComment.java +++ b/代码/在这里3.0/src/com/stone/shop/model/SComment.java @@ -9,9 +9,6 @@ import cn.bmob.v3.BmobObject; */ public class SComment extends BmobObject { - // private String id; - // private String time; - private String shopID; private String shopName; private String userID; diff --git a/代码/在这里3.0/src/com/stone/shop/model/Shop.java b/代码/在这里3.0/src/com/stone/shop/model/Shop.java index 5e22bde..9cac20a 100644 --- a/代码/在这里3.0/src/com/stone/shop/model/Shop.java +++ b/代码/在这里3.0/src/com/stone/shop/model/Shop.java @@ -21,8 +21,6 @@ public class Shop extends BmobObject implements Serializable{ private String phone; // 联系电话 private String info; // 简介 private String sale; // 促销信息 - private BmobFile picShop; // 商店主图 - public String getUserID() { return userID; } diff --git a/代码/在这里3.0/src/com/stone/shop/model/User.java b/代码/在这里3.0/src/com/stone/shop/model/User.java index 511703e..61988d7 100644 --- a/代码/在这里3.0/src/com/stone/shop/model/User.java +++ b/代码/在这里3.0/src/com/stone/shop/model/User.java @@ -14,11 +14,7 @@ public class User extends BmobUser { public static String userId; // 父类中已经存在的属性 - // private String id; - // private String username; - // private String password; - // private String email; - // private String regTime; + private String sex; // 性别 private String phone; // 电话 @@ -29,7 +25,6 @@ public class User extends BmobUser { private String dorNum; // 寝室号 private String state = "未登陆"; // 登录状态 private String type = "普通用户"; // 用户类型(普通用户、黑名单、中奖者) - //private BmobFile picUser; // 头像 public String getType() { return type; diff --git a/代码/在这里3.0/src/com/stone/shop/view/AwardActivity.java b/代码/在这里3.0/src/com/stone/shop/view/AwardActivity.java index 3a16359..599a17b 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/AwardActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/AwardActivity.java @@ -40,7 +40,6 @@ public class AwardActivity extends Activity { @Override public void onClick(View v) { - // TODO Auto-generated method stub startActivityForResult(new Intent(AwardActivity.this, EditActivity.class), 1024); } }); @@ -53,8 +52,6 @@ public class AwardActivity extends Activity { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - // TODO Auto-generated method stub - // MyApplication.getInstance().setCurrentQiangYu(mListItems.get(position-1)); Intent intent = new Intent(); intent.setClass(AwardActivity.this, CommentActivity.class); intent.putExtra("data", mListItems.get(position)); @@ -81,18 +78,14 @@ public class AwardActivity extends Activity { private void fetchData() { BmobQuery query = new BmobQuery(); query.order("-createdAt"); - // query.setCachePolicy(CachePolicy.NETWORK_ONLY); - // query.setLimit(Constant.NUMBERS_PER_PAGE); query.setLimit(1000); BmobDate date = new BmobDate(new Date(System.currentTimeMillis())); query.addWhereLessThan("createdAt", date); - // query.setSkip(Constant.NUMBERS_PER_PAGE*(pageNum++)); query.include("author"); query.findObjects(this, new FindListener() { @Override public void onSuccess(List list) { - // TODO Auto-generated method stub if (list != null) { mListItems.clear(); mListItems.addAll(list); @@ -103,7 +96,6 @@ public class AwardActivity extends Activity { @Override public void onError(int arg0, String arg1) { - // TODO Auto-generated method stub toast(arg1); } }); @@ -111,7 +103,6 @@ public class AwardActivity extends Activity { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { - // TODO Auto-generated method stub super.onActivityResult(requestCode, resultCode, data); if (requestCode == 1024 && resultCode == RESULT_OK) { fetchData(); diff --git a/代码/在这里3.0/src/com/stone/shop/view/BXTActivity.java b/代码/在这里3.0/src/com/stone/shop/view/BXTActivity.java index b2fcb93..c4b7ef5 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/BXTActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/BXTActivity.java @@ -9,13 +9,10 @@ import cn.bmob.v3.listener.FindListener; import com.stone.shop.R; import com.stone.shop.adapter.BXTListAdapter; import com.stone.shop.model.BXTNews; -import com.stone.shop.model.Classroom; -import com.stone.shop.model.BXTNews; import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import android.renderscript.Element; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; @@ -28,7 +25,6 @@ import android.widget.Toast; */ public class BXTActivity extends Activity implements OnItemClickListener{ - private static final String TAG = "BXTActivity"; private ListView lvBXTNews; private BXTListAdapter mBxtListAdapter; @@ -55,11 +51,9 @@ public class BXTActivity extends Activity implements OnItemClickListener{ private void initData() { BmobQuery query = new BmobQuery(); query.findObjects(this, new FindListener() { - @Override public void onSuccess(List newsList) { - //toast("查询商品成功, 共" + newsList.size()); - if(newsList.size()==0) + if(newsList.isEmpty()) toast("亲, 暂时还木有讲座哦"); else { mBXTNewsList = newsList; diff --git a/代码/在这里3.0/src/com/stone/shop/view/BXTNewsActivity.java b/代码/在这里3.0/src/com/stone/shop/view/BXTNewsActivity.java index a39c090..b40d7f5 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/BXTNewsActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/BXTNewsActivity.java @@ -1,7 +1,6 @@ package com.stone.shop.view; import com.stone.shop.R; -import com.stone.shop.model.BXTNews; import android.app.Activity; import android.os.Bundle; @@ -14,9 +13,6 @@ import android.widget.TextView; */ public class BXTNewsActivity extends Activity { - private static final String TAG = "BXTNewsActivity"; - - private BXTNews news; private TextView tvBXTNewsTitle; private TextView tvBXTNewsTopic; private TextView tvBXTNewsSpeaker; diff --git a/代码/在这里3.0/src/com/stone/shop/view/BaseActivity.java b/代码/在这里3.0/src/com/stone/shop/view/BaseActivity.java index e5b4bc6..f70686f 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/BaseActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/BaseActivity.java @@ -1,20 +1,14 @@ package com.stone.shop.view; -import cn.bmob.v3.Bmob; import com.stone.shop.R; -import com.stone.shop.view.old.OldMineActivity; import android.os.Bundle; import android.app.TabActivity; -import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; -import android.content.SharedPreferences.Editor; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; -import android.widget.Space; import android.widget.TabHost; import android.widget.TextView; import android.widget.Toast; @@ -27,8 +21,6 @@ import android.widget.Toast; @SuppressWarnings("deprecation") public class BaseActivity extends TabActivity { - private static final String TAG = "BaseActivity"; - private TabHost tabHost; private LayoutInflater layoutInflater; @@ -48,7 +40,6 @@ public class BaseActivity extends TabActivity { } public View getTabItemView(int i) { - // TODO Auto-generated method stub View view = layoutInflater.inflate(R.layout.tab_widget_item, null); ImageView imageView = (ImageView) view.findViewById(R.id.imageview); imageView.setImageResource(mIcon[i]); @@ -80,16 +71,7 @@ public class BaseActivity extends TabActivity { Intent intent3 = new Intent(this, MineActivity.class); spec = tabHost.newTabSpec(mTitle[2]).setIndicator( getTabItemView(2) ).setContent(intent3); - tabHost.addTab(spec); - - /* - Intent intent3 = new Intent(this, WsqActivity.class); - spec = tabHost.newTabSpec(mTitle[2]).setIndicator( getTabItemView(2) ).setContent(intent3); - tabHost.addTab(spec); - - Intent intent4 = new Intent(this, OldMineActivity.class); - spec = tabHost.newTabSpec(mTitle[3]).setIndicator( getTabItemView(3) ).setContent(intent4); - tabHost.addTab(spec); */ + tabHost.addTab(spec); tabHost.setCurrentTab(0); } @@ -97,7 +79,6 @@ public class BaseActivity extends TabActivity { @Override public void onBackPressed() { Toast.makeText(this, "确定要退出在这里么?", Toast.LENGTH_LONG).show(); - //super.onBackPressed(); } diff --git a/代码/在这里3.0/src/com/stone/shop/view/ClassroomActivity.java b/代码/在这里3.0/src/com/stone/shop/view/ClassroomActivity.java index 417200b..e042691 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/ClassroomActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/ClassroomActivity.java @@ -7,7 +7,6 @@ import cn.bmob.v3.BmobQuery; import cn.bmob.v3.listener.FindListener; import com.stone.shop.R; -import com.stone.shop.adapter.BXTListAdapter; import com.stone.shop.adapter.ClassroomAdapter; import com.stone.shop.model.Classroom; @@ -18,14 +17,11 @@ import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.GridView; -import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; public class ClassroomActivity extends Activity implements OnItemClickListener { - private static final String TAG = "BXTActivity"; - private GridView lvBXTNews; private ClassroomAdapter mBxtListAdapter; private List mBXTNewsList; @@ -55,11 +51,9 @@ public class ClassroomActivity extends Activity implements OnItemClickListener { BmobQuery query = new BmobQuery(); query.addWhereEqualTo("type", "教室"); query.findObjects(this, new FindListener() { - @Override public void onSuccess(List newsList) { - // toast("查询商品成功, 共" + newsList.size()); - if (newsList.size() == 0) + if (newsList.isEmpty()) toast("亲, 暂时还木有教室哦"); else { mBXTNewsList = newsList; diff --git a/代码/在这里3.0/src/com/stone/shop/view/CommentActivity.java b/代码/在这里3.0/src/com/stone/shop/view/CommentActivity.java index d098d4b..2829fc8 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/CommentActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/CommentActivity.java @@ -14,8 +14,6 @@ import com.stone.util.ToastFactory; import android.app.Activity; import android.content.Context; -import android.content.Intent; -import android.graphics.Bitmap; import android.graphics.Color; import android.os.Bundle; import android.text.TextUtils; @@ -32,12 +30,10 @@ import android.widget.EditText; import android.widget.ImageView; import android.widget.ListAdapter; import android.widget.ListView; -import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import cn.bmob.v3.BmobQuery; import cn.bmob.v3.BmobUser; -import cn.bmob.v3.datatype.BmobFile; import cn.bmob.v3.datatype.BmobPointer; import cn.bmob.v3.datatype.BmobRelation; import cn.bmob.v3.listener.FindListener; @@ -75,7 +71,6 @@ public class CommentActivity extends Activity implements OnClickListener { @Override protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_comment); @@ -87,7 +82,6 @@ public class CommentActivity extends Activity implements OnClickListener { } private void findViews() { - // TODO Auto-generated method stub commentList = (ListView) findViewById(R.id.comment_list); footer = (TextView) findViewById(R.id.loadmore); @@ -110,10 +104,9 @@ public class CommentActivity extends Activity implements OnClickListener { } private void setupViews() { - // TODO Auto-generated method stub getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE | WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); - qiangYu = (Discuss) getIntent().getSerializableExtra("data");// MyApplication.getInstance().getCurrentQiangYu(); + qiangYu = (Discuss) getIntent().getSerializableExtra("data"); pageNum = 0; mAdapter = new CommentAdapter(this, comments); @@ -123,7 +116,6 @@ public class CommentActivity extends Activity implements OnClickListener { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - // TODO Auto-generated method stub } }); commentList.setCacheColorHint(0); @@ -136,7 +128,6 @@ public class CommentActivity extends Activity implements OnClickListener { } private void initMoodView(Discuss mood2) { - // TODO Auto-generated method stub if (mood2 == null) { return; } @@ -161,7 +152,6 @@ public class CommentActivity extends Activity implements OnClickListener { } private void setListener() { - // TODO Auto-generated method stub footer.setOnClickListener(this); commentCommit.setOnClickListener(this); @@ -173,7 +163,6 @@ public class CommentActivity extends Activity implements OnClickListener { } private void fetchData() { - // TODO Auto-generated method stub fetchComment(); } @@ -185,42 +174,29 @@ public class CommentActivity extends Activity implements OnClickListener { query.setLimit(Constant.NUMBERS_PER_PAGE); query.setSkip(Constant.NUMBERS_PER_PAGE * (pageNum++)); query.findObjects(this, new FindListener() { - @Override public void onSuccess(List data) { - // TODO Auto-generated method stub - if (data.size() != 0 && data.get(data.size() - 1) != null) { - + if (!data.isEmpty()&& data.get(data.size() - 1) != null) { if (data.size() < Constant.NUMBERS_PER_PAGE) { toast("已加载完所有评论~"); - footer.setText("暂无更多评论~"); - } - + footer.setText("暂无更多评论~");} mAdapter.getDataList().addAll(data); mAdapter.notifyDataSetChanged(); setListViewHeightBasedOnChildren(commentList); } else { toast("暂无更多评论~"); footer.setText("暂无更多评论~"); - pageNum--; - } - } - + pageNum--; } } @Override public void onError(int arg0, String arg1) { - // TODO Auto-generated method stub toast("获取评论失败。请检查网络~"); pageNum--; } - }); - } - + });} @Override public void onClick(View v) { - // TODO Auto-generated method stub switch (v.getId()) { case R.id.user_logo: - // onClickUserLogo(); break; case R.id.loadmore: onClickLoadMore(); @@ -235,7 +211,6 @@ public class CommentActivity extends Activity implements OnClickListener { onClickHate(); break; case R.id.item_action_share: -// onClickShare(); break; case R.id.item_action_comment: onClickComment(); @@ -246,12 +221,10 @@ public class CommentActivity extends Activity implements OnClickListener { } private void onClickLoadMore() { - // TODO Auto-generated method stub fetchData(); } private void onClickCommit() { - // TODO Auto-generated method stub User currentUser = BmobUser.getCurrentUser(this, User.class); if (currentUser != null) {// 已登录 commentEdit = commentContent.getText().toString().trim(); @@ -274,10 +247,8 @@ public class CommentActivity extends Activity implements OnClickListener { comment.setUser(user); comment.setCommentContent(content); comment.save(this, new SaveListener() { - @Override public void onSuccess() { - // TODO Auto-generated method stub toast("评论成功。"); if (mAdapter.getDataList().size() < Constant.NUMBERS_PER_PAGE) { mAdapter.getDataList().add(comment); @@ -286,40 +257,27 @@ public class CommentActivity extends Activity implements OnClickListener { } commentContent.setText(""); hideSoftInput(); - // 将该评论与强语绑定到一起 BmobRelation relation = new BmobRelation(); relation.add(comment); qiangYu.setRelation(relation); qiangYu.update(CommentActivity.this, new UpdateListener() { + @Override + public void onSuccess() {/* fetchData*/} @Override - public void onSuccess() { - // TODO Auto-generated method stub - // fetchData(); - } - - @Override - public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub - } + public void onFailure(int arg0, String arg1) {/*do nothing*/} }); - } - @Override public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub toast("评论失败。请检查网络~"); } }); } - - boolean isFav = false; private void onClickLove() { - // TODO Auto-generated method stub User user = BmobUser.getCurrentUser(this, User.class); if (user == null) { // 前往登录注册界面 @@ -342,22 +300,16 @@ public class CommentActivity extends Activity implements OnClickListener { @Override public void onSuccess() { - // TODO Auto-generated method stub qiangYu.setMyLove(true); qiangYu.setMyFav(isFav); - ActivityUtil.show(CommentActivity.this, "点赞成功~"); } - @Override - public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub - } + public void onFailure(int arg0, String arg1) {/*do nothing*/} }); } private void onClickHate() { - // TODO Auto-generated method stub qiangYu.setHate(qiangYu.getHate() + 1); hate.setText(qiangYu.getHate() + ""); qiangYu.increment("hate", 1); @@ -365,21 +317,18 @@ public class CommentActivity extends Activity implements OnClickListener { @Override public void onSuccess() { - // TODO Auto-generated method stub ActivityUtil.show(CommentActivity.this, "点踩成功~"); } @Override public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub - + /*do nothing*/ } }); } private void onClickComment() { - // TODO Auto-generated method stub commentContent.requestFocus(); InputMethodManager imm = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE); diff --git a/代码/在这里3.0/src/com/stone/shop/view/FeedBackActivity.java b/代码/在这里3.0/src/com/stone/shop/view/FeedBackActivity.java index af75344..0da1d90 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/FeedBackActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/FeedBackActivity.java @@ -5,10 +5,8 @@ import cn.bmob.v3.listener.SaveListener; import com.stone.shop.R; import com.stone.shop.model.FeedBack; -import com.stone.shop.model.User; import android.app.Activity; -import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; @@ -24,8 +22,6 @@ import android.widget.Toast; */ public class FeedBackActivity extends Activity implements OnClickListener { - private static final String TAG = "FeedBackActivity"; - private EditText etContent; private Button btnSubmit; @@ -48,7 +44,7 @@ public class FeedBackActivity extends Activity implements OnClickListener { */ private void submit() { String content = etContent.getText().toString(); - if (content.equals("")) { + if ("".equals(content)) { toast("亲,请先写点东西吧"); } else { BmobUser user = BmobUser.getCurrentUser(this); @@ -60,14 +56,12 @@ public class FeedBackActivity extends Activity implements OnClickListener { @Override public void onSuccess() { - // TODO Auto-generated method stub toast("提交成功, 在这里会尽快回复"); back(); } @Override public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub toast("提交失败"); } }); @@ -78,13 +72,8 @@ public class FeedBackActivity extends Activity implements OnClickListener { @Override public void onClick(View v) { - switch (v.getId()) { - case R.id.btn_feedback_submit: + if(v.getId()==R.id.btn_feedback_submit) { submit(); - break; - - default: - break; } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/HomeActivity.java b/代码/在这里3.0/src/com/stone/shop/view/HomeActivity.java index ef4e9c5..d6a828d 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/HomeActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/HomeActivity.java @@ -1,17 +1,12 @@ package com.stone.shop.view; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; -import java.util.Date; import java.util.List; import android.app.Activity; -import android.content.Context; import android.content.Intent; -import android.opengl.Visibility; import android.os.Bundle; -import android.support.v4.view.ViewPager.OnPageChangeListener; import android.view.View; import android.view.View.OnClickListener; import android.widget.AdapterView; @@ -24,17 +19,14 @@ import android.widget.ImageView.ScaleType; import android.widget.TextView; import android.widget.Toast; -import cn.bmob.v3.Bmob; import cn.bmob.v3.BmobQuery; import cn.bmob.v3.listener.FindListener; -import cn.bmob.v3.listener.GetServerTimeListener; import com.stone.date.TypeDef; import com.stone.shop.R; import com.stone.shop.adapter.ImagePagerAdapter; import com.stone.shop.adapter.NewsListAdapter; import com.stone.shop.model.News; -import com.stone.shop.model.Shop; import com.stone.ui.AutoScrollViewPager; import com.stone.ui.ListScrollView; @@ -47,8 +39,6 @@ import com.stone.ui.ListScrollView; public class HomeActivity extends Activity implements OnClickListener, OnItemClickListener { - private static final String TAG = "HomeActivity"; - private ListScrollView listScrollView; // 校历 @@ -122,11 +112,11 @@ public class HomeActivity extends Activity implements OnClickListener, */ public void setTime() { Calendar calendar = Calendar.getInstance(); - String year = calendar.get(Calendar.YEAR)+""; - String month = calendar.get(Calendar.MONTH)+1+""; - String day = calendar.get(Calendar.DAY_OF_MONTH)+""; - String week = calendar.get(Calendar.WEEK_OF_YEAR)-9+""; - String dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK)+""; + String year = Integer.toString(calendar.get(Calendar.YEAR)); + String month = Integer.toString(calendar.get(Calendar.MONTH)+1); + String day = Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)); + String week = Integer.toString(calendar.get(Calendar.WEEK_OF_YEAR)-9); + String dayOfWeek = Integer.toString(calendar.get(Calendar.DAY_OF_WEEK)); String chDayOfWeek = TypeDef.chDayOfWeek[Integer.parseInt(dayOfWeek)-1]; toast(year+"-"+month+"-"+day+" "+" 第 "+week+" 周 "+" "+" 星期 "+chDayOfWeek); tvWeek.setText(" 第 "+week+" 周 "+" "+" 星期 "+chDayOfWeek); @@ -167,13 +157,8 @@ public class HomeActivity extends Activity implements OnClickListener, @Override public void onClick(View v) { - switch (v.getId()) { - case R.id.btn_hide_ads: + if(v.getId()==R.id.btn_hide_ads) { flImageAds.setVisibility(View.GONE); - break; - - default: - break; } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/InfoContentActivity.java b/代码/在这里3.0/src/com/stone/shop/view/InfoContentActivity.java index 83647cb..8f1b261 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/InfoContentActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/InfoContentActivity.java @@ -14,9 +14,6 @@ import android.widget.TextView; */ public class InfoContentActivity extends Activity { - private static final String TAG = "InfoContentActivity"; - - private Information info; private TextView tvInfoTitle; private TextView tvInfoTopic; private TextView tvInfoTime; diff --git a/代码/在这里3.0/src/com/stone/shop/view/InfoNewsContentActivity.java b/代码/在这里3.0/src/com/stone/shop/view/InfoNewsContentActivity.java index 6776cba..4b7f30c 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/InfoNewsContentActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/InfoNewsContentActivity.java @@ -13,8 +13,6 @@ import android.widget.TextView; * */ public class InfoNewsContentActivity extends Activity { - - private static String TAG = "InfoNewsContentActivity"; private TextView tvNewsTitle; private TextView tvNewsAuthor; @@ -46,8 +44,8 @@ public class InfoNewsContentActivity extends Activity { } private String splitString(String str) { - String[] strs = null; - if(str.equals("")){ + String[] strs; + if("".equals(str)){ return ""; } else if ( !(str.contains("【") || str.contains("】")) ) { return str; diff --git a/代码/在这里3.0/src/com/stone/shop/view/InformationActivity.java b/代码/在这里3.0/src/com/stone/shop/view/InformationActivity.java index 42090e6..4622e02 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/InformationActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/InformationActivity.java @@ -8,7 +8,6 @@ import cn.bmob.v3.listener.FindListener; import com.stone.shop.R; import com.stone.shop.adapter.InfoNewsListAdapter; -import com.stone.shop.adapter.InformationListAdapter; import com.stone.shop.model.Information; import android.app.Activity; @@ -26,9 +25,7 @@ import android.widget.Toast; * @date 2016-8-22 */ public class InformationActivity extends Activity implements OnItemClickListener{ - - private static final String TAG = "InformationActivity"; - + private ListView mlvInfoContent; private InfoNewsListAdapter mInfoNewsListAdapter; private List mInformationList; @@ -57,7 +54,7 @@ public class InformationActivity extends Activity implements OnItemClickListener @Override public void onSuccess(List infoList) { - if(infoList.size()==0) + if(infoList.isEmpty()) toast("亲, 暂时还木有通知哦"); else { mInformationList = infoList; diff --git a/代码/在这里3.0/src/com/stone/shop/view/LibraryActivity.java b/代码/在这里3.0/src/com/stone/shop/view/LibraryActivity.java index 57477cd..497450c 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/LibraryActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/LibraryActivity.java @@ -77,7 +77,7 @@ public class LibraryActivity extends Activity implements OnItemClickListener { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - Intent intent = new Intent(LibraryActivity.this, ReservationActivity.class); + Intent intent = new Intent(LibraryActivity.this, LibraryReservationActivity.class); Classroom classroom = mBXTNewsList.get(position); intent.putExtra("roomId", classroom.getObjectId()); intent.putExtra("roomName", classroom.getName()); diff --git a/代码/在这里3.0/src/com/stone/shop/view/LibraryReservationActivity.java b/代码/在这里3.0/src/com/stone/shop/view/LibraryReservationActivity.java index d7f942c..200e599 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/LibraryReservationActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/LibraryReservationActivity.java @@ -42,7 +42,7 @@ public class LibraryReservationActivity extends Activity { final String roomId = getIntent().getStringExtra("roomId"); final String roomName = getIntent().getStringExtra("roomName"); - TextView tvRoom = (TextView) findViewById(R.id.tv_room); + TextView tvRoom = (TextView) findViewById(R.id.textView1); tvRoom.setText("研修室:" + roomName); btnLogin = (Button) findViewById(R.id.btn_login); @@ -59,7 +59,7 @@ public class LibraryReservationActivity extends Activity { if (!newsList.isEmpty()) { String dateTime = newsList.get(0).getDateTime(); - Logger logger = Logger.getLogger("lavasoft"); + try { if (dateFormat.parse(dateTime).before(new Date())) { @@ -72,6 +72,7 @@ public class LibraryReservationActivity extends Activity { } } catch (ParseException e) { // TODO + Logger logger = Logger.getLogger("lavasoft"); logger.log(Level.SEVERE, "something may be wrong", e); } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/LoginActivity.java b/代码/在这里3.0/src/com/stone/shop/view/LoginActivity.java index 5993407..ea7133f 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/LoginActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/LoginActivity.java @@ -1,9 +1,5 @@ package com.stone.shop.view; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; import org.json.JSONException; import org.json.JSONObject; @@ -13,8 +9,8 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.Color; +import java.util.logging.Level; +import java.util.logging.Logger; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -35,7 +31,6 @@ import com.stone.shop.R; import com.stone.shop.model.User; import com.stone.util.Util; import com.tencent.connect.UserInfo; -import com.tencent.connect.auth.QQAuth; import com.tencent.connect.common.Constants; import com.tencent.tauth.IUiListener; import com.tencent.tauth.Tencent; @@ -64,14 +59,13 @@ public class LoginActivity extends Activity implements OnClickListener { private TextView mUserInfo; private ImageView mUserLogo; private ImageView mNewLoginButton; - private TextView backInfo; // QQ登陆 private static Tencent mTencent; - // private QQAuth mQQAuth; - + public String sthwrong="something may be wrong"; + public String lavasoft="lavasoft"; + Handler mHandler = new Handler() { - @Override public void handleMessage(Message msg) { if (msg.what == 0) { @@ -81,17 +75,15 @@ public class LoginActivity extends Activity implements OnClickListener { mUserInfo.setVisibility(android.view.View.VISIBLE); mUserInfo.setText(response.getString("nickname")); } catch (JSONException e) { - e.printStackTrace(); - } + Logger logger = Logger.getLogger(lavasoft); + logger.log(Level.SEVERE, sthwrong, e);} } - } else if (msg.what == 1) { Bitmap bitmap = (Bitmap) msg.obj; mUserLogo.setImageBitmap(bitmap); mUserLogo.setVisibility(android.view.View.VISIBLE); } } - }; @Override @@ -101,39 +93,33 @@ public class LoginActivity extends Activity implements OnClickListener { // 使用时请将第二个参数Application ID替换成你在Bmob服务器端创建的Application ID Bmob.initialize(this, "252a2c58d0dc9a78a5411501c62ce0de"); setContentView(R.layout.activity_login); - // QQ登陆, 获取实例 - // mQQAuth = QQAuth.createInstance(APP_ID, - // this.getApplicationContext()); mTencent = Tencent.createInstance(APP_ID, this.getApplicationContext()); - btnLogin = (Button) findViewById(R.id.btn_login); btnReg = (Button) findViewById(R.id.btn_register); - etUsername = (EditText) findViewById(R.id.et_username); etPassword = (EditText) findViewById(R.id.et_password); - btnLogin.setOnClickListener(this); btnReg.setOnClickListener(this); - findViewById(R.id.btn_qq).setOnClickListener(this); - mUserInfo = (TextView) findViewById(R.id.user_nickname); mUserLogo = (ImageView) findViewById(R.id.user_logo); mNewLoginButton = (ImageView) findViewById(R.id.new_login_btn); mNewLoginButton.setOnClickListener(this); - backInfo = (TextView) findViewById(R.id.user_callback); - - getUserInfo(); - + getUserInfo();} + public String getusername() + { + return username; + } + public String getpassword() + { + return password; } - private void getUserInfo() { SharedPreferences sp = getSharedPreferences("UserInfo", 0); - etUsername.setText(sp.getString("username", null)); - etPassword.setText(sp.getString("password", null)); + etUsername.setText(sp.getString(getusername(), null)); + etPassword.setText(sp.getString(getpassword(), null)); } - // 保存用户的登陆记录 private void saveUserInfo(String username, String password) { SharedPreferences sp = getSharedPreferences("UserInfo", 0); @@ -153,7 +139,6 @@ public class LoginActivity extends Activity implements OnClickListener { updateUserInfo(); } } - @Override public void onClick(View v) { switch (v.getId()) { @@ -161,10 +146,9 @@ public class LoginActivity extends Activity implements OnClickListener { case R.id.btn_login: username = etUsername.getText().toString(); password = etPassword.getText().toString(); - if (!Util.isNetworkConnected(this)) { toast("木有网络 ( ⊙ o ⊙ ) "); - } else if (username.equals("") || password.equals("")) { + } else if ("".equals(username) || "".equals(password)) { toast("请输入账号和密码"); break; } else { @@ -172,45 +156,32 @@ public class LoginActivity extends Activity implements OnClickListener { bu2.setUsername(username); bu2.setPassword(password); bu2.login(this, new SaveListener() { - @Override public void onSuccess() { - // TODO Auto-generated method stub toast("欢迎进入 在这里 服务系统"); - // 保存用户信息 - saveUserInfo(username, password); - // 跳转到主页 - User.userId = bu2.getObjectId(); + saveUserInfo(username, password); // 保存用户信息 + User.userId = bu2.getObjectId(); // 跳转到主页 Intent toHome = new Intent(LoginActivity.this, BaseActivity.class); startActivity(toHome); - finish(); - } - + finish();} @Override public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub toast("用户名或密码错误"); } }); } break; - case R.id.btn_register: Intent toReg = new Intent(LoginActivity.this, RegisterActivity.class); startActivity(toReg); break; case R.id.btn_qq: - onClickLogin(); - break; - default: break; - } } - public void toast(String toast) { Toast.makeText(this, toast, Toast.LENGTH_SHORT).show(); } @@ -233,51 +204,43 @@ public class LoginActivity extends Activity implements OnClickListener { return; } JSONObject jsonResponse = (JSONObject) response; - if (null != jsonResponse && jsonResponse.length() == 0) { + if (jsonResponse.length() == 0) { Util.showResultDialog(LoginActivity.this, "返回为空", "登录失败"); return; } - // Util.showResultDialog(LoginActivity.this, response.toString(), - // "登录成功"); + doComplete((JSONObject) response); try { User.userId = jsonResponse.getString("openid"); } catch (JSONException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + // TODO + Logger logger = Logger.getLogger(lavasoft); + logger.log(Level.SEVERE, sthwrong, e); } Intent toHome = new Intent(LoginActivity.this, BaseActivity.class); startActivity(toHome); finish(); } - protected void doComplete(JSONObject values) { - + //do nothing } - @Override public void onError(UiError e) { Util.toastMessage(LoginActivity.this, "onError: " + e.errorDetail); Util.dismissDialog(); } - @Override public void onCancel() { Util.toastMessage(LoginActivity.this, "onCancel: "); Util.dismissDialog(); } } - private void updateUserInfo() { if (mTencent != null && mTencent.isSessionValid()) { IUiListener listener = new IUiListener() { - @Override - public void onError(UiError e) { - - } - + public void onError(UiError e) { /*do nothing*/ } @Override public void onComplete(final Object response) { Message msg = new Message(); @@ -285,42 +248,31 @@ public class LoginActivity extends Activity implements OnClickListener { msg.what = 0; mHandler.sendMessage(msg); new Thread() { - @Override public void run() { JSONObject json = (JSONObject) response; if (json.has("figureurl")) { Bitmap bitmap = null; - try { - bitmap = Util.getbitmap(json.getString("figureurl_qq_2")); + try {bitmap = Util.getbitmap(json.getString("figureurl_qq_2")); } catch (JSONException e) { - - } + Logger logger = Logger.getLogger(lavasoft); + logger.log(Level.SEVERE, sthwrong, e);} Message msg = new Message(); msg.obj = bitmap; msg.what = 1; - mHandler.sendMessage(msg); - } - } - - }.start(); - } - + mHandler.sendMessage(msg);}} + }.start();} @Override - public void onCancel() { - - } + public void onCancel() {/*do nothing*/} }; mInfo = new UserInfo(this, mTencent.getQQToken()); mInfo.getUserInfo(listener); - } else { mUserInfo.setText(""); mUserInfo.setVisibility(android.view.View.GONE); mUserLogo.setVisibility(android.view.View.GONE); } } - public static void initOpenidAndToken(JSONObject jsonObject) { try { String token = jsonObject.getString(Constants.PARAM_ACCESS_TOKEN); @@ -331,6 +283,8 @@ public class LoginActivity extends Activity implements OnClickListener { mTencent.setOpenId(openId); } } catch (Exception e) { + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } } @@ -340,7 +294,6 @@ public class LoginActivity extends Activity implements OnClickListener { if (requestCode == Constants.REQUEST_LOGIN || requestCode == Constants.REQUEST_APPBAR) { Tencent.onActivityResultData(requestCode, resultCode, data, loginListener); } - super.onActivityResult(requestCode, resultCode, data); } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/MineActivity.java b/代码/在这里3.0/src/com/stone/shop/view/MineActivity.java index 5e612f4..0bd2437 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/MineActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/MineActivity.java @@ -24,9 +24,7 @@ import com.stone.shop.model.Order; * @date 2014-4-24 * @author Stone */ -public class MineActivity extends Activity implements OnItemClickListener{ - - private static final String TAG = "MineActivity" ; +public class MineActivity extends Activity implements OnItemClickListener{ private String[] userItemNames = {"stonekity"} ; private String[] userItemContents = {""} ; @@ -49,13 +47,8 @@ public class MineActivity extends Activity implements OnItemClickListener{ private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { - switch (msg.what) { - case MessageDef.MINE_FINISH_LOAD_DATA: - //toast("Handler 收到数据加载完成的消息"); + if(msg.what==MessageDef.MINE_FINISH_LOAD_DATA) { orderListAdapter.notifyDataSetChanged(); - break; - default: - break; } } }; @@ -105,10 +98,10 @@ public class MineActivity extends Activity implements OnItemClickListener{ @Override public void onSuccess(int count) { - if(type.equals("未取餐")) { + if("未取餐".equals(type)) { orderItemContents[0] ="( " +count+ " )"; } - if(type.equals("已取餐")) { + if("已取餐".equals(type)) { orderItemContents[1] ="( " +count+ " )"; } Message msg = new Message(); @@ -132,7 +125,6 @@ public class MineActivity extends Activity implements OnItemClickListener{ if(parent.getId() == R.id.lv_mine_user) { switch (position) { case 0: //资料卡 - //toast("点击个人资料"); Intent toMineInfo = new Intent(MineActivity.this, MineInfoActivity.class); startActivity(toMineInfo); break; @@ -141,10 +133,8 @@ public class MineActivity extends Activity implements OnItemClickListener{ break; } } - //小菜订单 if(parent.getId() == R.id.lv_mine_order) { - //toast("点击了订单区域"); Intent toOrderInfo; switch (position) { case 0: @@ -174,8 +164,7 @@ public class MineActivity extends Activity implements OnItemClickListener{ Intent toShare = new Intent(Intent.ACTION_SEND); toShare.setType("text/plain"); toShare.putExtra(Intent.EXTRA_SUBJECT, "分享"); - toShare.putExtra(Intent.EXTRA_TEXT, "校园小菜-HBUT版" +"\n" + "针对湖工大的校园小菜测试版上线了,赶紧下载体验吧" - + "http://xiaocai.bmob.cn"); + toShare.putExtra(Intent.EXTRA_TEXT, "校园小菜-HBUT版" +"\n" + "针对湖工大的校园小菜测试版上线了,赶紧下载体验吧"+ "http://xiaocai.bmob.cn"); startActivity(Intent.createChooser(toShare, "分享到")); break; case 3: //退出当期账号 @@ -184,9 +173,7 @@ public class MineActivity extends Activity implements OnItemClickListener{ startActivity(toLogin); finish(); break; - default: - //toast("点击了通知区域"); break; } diff --git a/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java b/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java index d5ce189..fd57ca9 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java @@ -100,15 +100,7 @@ public class MineInfoActivity extends Activity { public void clickEdit(View v) { Intent toEditMineInfo = new Intent(MineInfoActivity.this, MineInfoEditActivity.class); -// Bundle bundle = new Bundle(); -// bundle.putString("username", curUser.getUsername()); -// bundle.putString("school", curUser.getSchool()); -// bundle.putString("cademy", curUser.getCademy()); -// bundle.putString("dorpart", curUser.getDorPart()); -// bundle.putString("dornum", curUser.getDorNum()); -// bundle.putString("phone", curUser.getPhone()); -// bundle.putString("qq", curUser.getQQ()); -// toEditMineInfo.putExtras(bundle); + startActivity(toEditMineInfo); } diff --git a/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java~HEAD b/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java~HEAD new file mode 100644 index 0000000..d5ce189 --- /dev/null +++ b/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java~HEAD @@ -0,0 +1,124 @@ +package com.stone.shop.view; + +import java.util.List; + +import cn.bmob.v3.BmobQuery; +import cn.bmob.v3.BmobUser; +import cn.bmob.v3.listener.FindListener; + +import com.stone.date.MessageDef; +import com.stone.shop.R; +import com.stone.shop.model.User; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.view.View; +import android.widget.TextView; +import android.widget.Toast; + +/** + * 个人资料卡 + * @date 2014-5-21 + * @author Stone + */ +public class MineInfoActivity extends Activity { + + private TextView tvUsername; + private TextView tvSchool; + private TextView tvCademy; + private TextView tvDorPart; + private TextView tvDorNum; + private TextView tvPhone; + private TextView tvQQ; + + private User curUser = new User(); + + private Handler mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MessageDef.MINE_INFO_FINISH_FIND_USER: + initView(); + break; + default: + break; + } + } + }; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_mine_info); + + getCurUser(); + } + + private void initView() { + tvUsername = (TextView) findViewById(R.id.tv_mineinfo_username); + tvSchool = (TextView) findViewById(R.id.tv_mineinfo_school); + tvCademy = (TextView) findViewById(R.id.tv_mineinfo_cademy); + tvDorPart = (TextView) findViewById(R.id.tv_mineinfo_dorpart); + tvDorNum = (TextView) findViewById(R.id.tv_mineinfo_dornum); + tvPhone = (TextView) findViewById(R.id.tv_mineinfo_phone); + tvQQ = (TextView) findViewById(R.id.tv_mineinfo_qq); + + tvUsername.setText(curUser.getUsername()); + tvSchool.setText(curUser.getSchool()); + tvCademy.setText(curUser.getCademy()); + tvDorPart.setText(curUser.getDorPart()); + tvDorNum.setText(curUser.getDorNum()); + tvPhone.setText(curUser.getPhone()); + tvQQ.setText(curUser.getQQ()); + + } + + private void getCurUser() { + BmobUser bmobUser = BmobUser.getCurrentUser(this); + BmobQuery query = new BmobQuery(); + query.addWhereEqualTo("objectId", bmobUser.getObjectId()); + query.findObjects(this, new FindListener() { + + @Override + public void onSuccess(List object) { + curUser = object.get(0); + Message msg = new Message(); + msg.what = MessageDef.MINE_INFO_FINISH_FIND_USER; + mHandler.sendMessage(msg); + } + + @Override + public void onError(int arg0, String arg1) { + toast("亲, 获取当前用户失败"); + } + }); + + } + + public void clickEdit(View v) { + Intent toEditMineInfo = new Intent(MineInfoActivity.this, MineInfoEditActivity.class); +// Bundle bundle = new Bundle(); +// bundle.putString("username", curUser.getUsername()); +// bundle.putString("school", curUser.getSchool()); +// bundle.putString("cademy", curUser.getCademy()); +// bundle.putString("dorpart", curUser.getDorPart()); +// bundle.putString("dornum", curUser.getDorNum()); +// bundle.putString("phone", curUser.getPhone()); +// bundle.putString("qq", curUser.getQQ()); +// toEditMineInfo.putExtras(bundle); + startActivity(toEditMineInfo); + } + + public void clickBack(View v) { + finish(); + } + + private void toast(String toast) { + Toast.makeText(this, toast, Toast.LENGTH_SHORT).show(); + } + + +} diff --git a/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java~qinjiaming_branch b/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java~qinjiaming_branch new file mode 100644 index 0000000..fd57ca9 --- /dev/null +++ b/代码/在这里3.0/src/com/stone/shop/view/MineInfoActivity.java~qinjiaming_branch @@ -0,0 +1,116 @@ +package com.stone.shop.view; + +import java.util.List; + +import cn.bmob.v3.BmobQuery; +import cn.bmob.v3.BmobUser; +import cn.bmob.v3.listener.FindListener; + +import com.stone.date.MessageDef; +import com.stone.shop.R; +import com.stone.shop.model.User; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.view.View; +import android.widget.TextView; +import android.widget.Toast; + +/** + * 个人资料卡 + * @date 2014-5-21 + * @author Stone + */ +public class MineInfoActivity extends Activity { + + private TextView tvUsername; + private TextView tvSchool; + private TextView tvCademy; + private TextView tvDorPart; + private TextView tvDorNum; + private TextView tvPhone; + private TextView tvQQ; + + private User curUser = new User(); + + private Handler mHandler = new Handler() { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case MessageDef.MINE_INFO_FINISH_FIND_USER: + initView(); + break; + default: + break; + } + } + }; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_mine_info); + + getCurUser(); + } + + private void initView() { + tvUsername = (TextView) findViewById(R.id.tv_mineinfo_username); + tvSchool = (TextView) findViewById(R.id.tv_mineinfo_school); + tvCademy = (TextView) findViewById(R.id.tv_mineinfo_cademy); + tvDorPart = (TextView) findViewById(R.id.tv_mineinfo_dorpart); + tvDorNum = (TextView) findViewById(R.id.tv_mineinfo_dornum); + tvPhone = (TextView) findViewById(R.id.tv_mineinfo_phone); + tvQQ = (TextView) findViewById(R.id.tv_mineinfo_qq); + + tvUsername.setText(curUser.getUsername()); + tvSchool.setText(curUser.getSchool()); + tvCademy.setText(curUser.getCademy()); + tvDorPart.setText(curUser.getDorPart()); + tvDorNum.setText(curUser.getDorNum()); + tvPhone.setText(curUser.getPhone()); + tvQQ.setText(curUser.getQQ()); + + } + + private void getCurUser() { + BmobUser bmobUser = BmobUser.getCurrentUser(this); + BmobQuery query = new BmobQuery(); + query.addWhereEqualTo("objectId", bmobUser.getObjectId()); + query.findObjects(this, new FindListener() { + + @Override + public void onSuccess(List object) { + curUser = object.get(0); + Message msg = new Message(); + msg.what = MessageDef.MINE_INFO_FINISH_FIND_USER; + mHandler.sendMessage(msg); + } + + @Override + public void onError(int arg0, String arg1) { + toast("亲, 获取当前用户失败"); + } + }); + + } + + public void clickEdit(View v) { + Intent toEditMineInfo = new Intent(MineInfoActivity.this, MineInfoEditActivity.class); + + startActivity(toEditMineInfo); + } + + public void clickBack(View v) { + finish(); + } + + private void toast(String toast) { + Toast.makeText(this, toast, Toast.LENGTH_SHORT).show(); + } + + +} diff --git a/代码/在这里3.0/src/com/stone/shop/view/MineInfoEditActivity.java b/代码/在这里3.0/src/com/stone/shop/view/MineInfoEditActivity.java index 39902ea..2f272f4 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/MineInfoEditActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/MineInfoEditActivity.java @@ -12,7 +12,6 @@ import com.stone.shop.R; import com.stone.shop.model.User; import android.app.Activity; -import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; @@ -37,16 +36,10 @@ public class MineInfoEditActivity extends Activity { private EditText etQQ; private User curUser; - private Bundle bundle; private Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { - switch (msg.what) { - case MessageDef.MINE_INFO_FINISH_FIND_USER: - initView(); - break; - default: - break; + if(msg.what==MessageDef.MINE_INFO_FINISH_FIND_USER) { } } }; @@ -86,7 +79,6 @@ public class MineInfoEditActivity extends Activity { @Override public void onSuccess(List object) { curUser = object.get(0); - //toast("查询到用户 " + object.size()); Message msg = new Message(); msg.what = MessageDef.MINE_INFO_FINISH_FIND_USER; mHandler.sendMessage(msg); diff --git a/代码/在这里3.0/src/com/stone/shop/view/MultiScreenActivity.java b/代码/在这里3.0/src/com/stone/shop/view/MultiScreenActivity.java index 989ea7f..cad6aa0 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/MultiScreenActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/MultiScreenActivity.java @@ -1,66 +1,59 @@ package com.stone.shop.view; +import java.util.logging.Logger; + import com.stone.shop.R; import android.content.Intent; import android.app.Activity; -import android.content.Intent; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; -import android.widget.TextView; -import android.widget.Toast; /** * * @author http://http://blog.csdn.net/qinjuning */ -//���п����л�����Activity public class MultiScreenActivity extends Activity implements OnClickListener { private Button bt_scrollLeft; private Button bt_scrollRight; private MultiViewGroup mulTiViewGroup ; - public static int screenWidth ; // ��Ļ��� - public static int scrrenHeight ; //��Ļ�߶� - - private int curscreen = 0; // ��ǰλ�ڵڼ���Ļ ����3��"��Ļ"�� 3��LinearLayout + public static int screenWidth ; + public static int scrrenHeight ; + protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - //�����Ļ�ֱ��ʴ�С DisplayMetrics metric = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metric); screenWidth = metric.widthPixels ; scrrenHeight = metric.heightPixels; - System.out.println("screenWidth * scrrenHeight --->" + screenWidth + " * " +scrrenHeight); - + //System.out.println("screenWidth * scrrenHeight --->" + screenWidth + " * " +scrrenHeight); + Logger logger = Logger.getLogger("lavasoft"); + logger.info("screenWidth * scrrenHeight --->" + screenWidth + " * " +scrrenHeight); setContentView(R.layout.multiview); - - //��ȡ�Զ�����ͼ�Ŀռ����� mulTiViewGroup = (MultiViewGroup)findViewById(R.id.mymultiViewGroup); - bt_scrollLeft = (Button) findViewById(R.id.bt_scrollLeft); bt_scrollRight = (Button) findViewById(R.id.bt_scrollRight); - bt_scrollLeft.setOnClickListener(this); bt_scrollRight.setOnClickListener(this); } @Override public void onClick(View v) { - // TODO Auto-generated method stub Intent intent = new Intent(MultiScreenActivity.this,LoginActivity.class); switch (v.getId()) { case R.id.bt_scrollLeft: startActivity(intent); - //mulTiViewGroup.startMove() ; //��һ�� break; case R.id.bt_scrollRight: - mulTiViewGroup.stopMove() ; //ֹͣ���� + mulTiViewGroup.stopMove() ; + break; + default: break; } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/MultiViewGroup.java b/代码/在这里3.0/src/com/stone/shop/view/MultiViewGroup.java index 6c0bf1f..09a52ea 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/MultiViewGroup.java +++ b/代码/在这里3.0/src/com/stone/shop/view/MultiViewGroup.java @@ -1,11 +1,7 @@ package com.stone.shop.view; import com.stone.shop.R; -import android.app.Activity; import android.content.Context; -import android.graphics.Canvas; -import android.graphics.Color; -import android.os.Bundle; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; @@ -13,11 +9,8 @@ import android.view.VelocityTracker; import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; -import android.view.View.OnClickListener; -import android.widget.Button; import android.widget.LinearLayout; import android.widget.Scroller; -import android.widget.TextView; //自定义ViewGroup , 包含了三个LinearLayout控件,存放在不同的布局位置,通过scrollBy或者scrollTo方法切换 public class MultiViewGroup extends ViewGroup { @@ -51,7 +44,6 @@ public class MultiViewGroup extends ViewGroup { mScroller.startScroll((curScreen-1) *getWidth(), 0, getWidth(), 0,3000); //暴力点直接到目标出 - //scrollTo(curScreen * getWidth(), 0); //其实在点击按钮的时候,就回触发View绘制流程,这儿我们在强制绘制下View invalidate(); } @@ -66,9 +58,6 @@ public class MultiViewGroup extends ViewGroup { int scrollCurX= mScroller.getCurrX() ; //判断是否达到下一屏的中间位置,如果达到就抵达下一屏,否则保持在原屏幕 - //int moveX = scrollCurX - mScroller.getStartX() ; - // Log.i(TAG, "----mScroller.is not finished ---- shouldNext" + shouldNext); - //boolean shouldNext = moveX >= getWidth() / 2 ; int descScreen = ( scrollCurX + getWidth() / 2) / getWidth() ; Log.i(TAG, "----mScroller.is not finished ---- shouldNext" + descScreen); @@ -89,7 +78,6 @@ public class MultiViewGroup extends ViewGroup { // 只有当前LAYOUT中的某个CHILD导致SCROLL发生滚动,才会致使自己的COMPUTESCROLL被调用 @Override public void computeScroll() { - // TODO Auto-generated method stub Log.e(TAG, "computeScroll"); // 如果返回true,表示动画还没有结束 // 因为前面startScroll,所以只有在startScroll完成时 才会为false @@ -115,17 +103,15 @@ public class MultiViewGroup extends ViewGroup { private int mTouchState = TOUCH_STATE_REST; //-------------------------- //处理触摸事件 ~ - public static int SNAP_VELOCITY = 600 ; + public static final int SNAP_VELOCITY = 600 ; private int mTouchSlop = 0 ; private float mLastionMotionX = 0 ; - private float mLastMotionY = 0 ; //处理触摸的速率 private VelocityTracker mVelocityTracker = null ; // 这个感觉没什么作用 不管true还是false 都是会执行onTouchEvent的 因为子view里面onTouchEvent返回false了 @Override public boolean onInterceptTouchEvent(MotionEvent ev) { - // TODO Auto-generated method stub Log.e(TAG, "onInterceptTouchEvent-slop:" + mTouchSlop); final int action = ev.getAction(); @@ -135,32 +121,27 @@ public class MultiViewGroup extends ViewGroup { } final float x = ev.getX(); - final float y = ev.getY(); switch (action) { case MotionEvent.ACTION_MOVE: Log.e(TAG, "onInterceptTouchEvent move"); final int xDiff = (int) Math.abs(mLastionMotionX - x); - //超过了最小滑动距离 - if (xDiff > mTouchSlop) { - mTouchState = TOUCH_STATE_SCROLLING; - } + if (xDiff > mTouchSlop) + {mTouchState = TOUCH_STATE_SCROLLING;} //超过了最小滑动距离 break; - case MotionEvent.ACTION_DOWN: Log.e(TAG, "onInterceptTouchEvent down"); mLastionMotionX = x; - mLastMotionY = y; Log.e(TAG, mScroller.isFinished() + ""); mTouchState = mScroller.isFinished() ? TOUCH_STATE_REST : TOUCH_STATE_SCROLLING; - break; - case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: Log.e(TAG, "onInterceptTouchEvent up or cancel"); mTouchState = TOUCH_STATE_REST; break; + default: + break; } Log.e(TAG, mTouchState + "====" + TOUCH_STATE_REST); return mTouchState != TOUCH_STATE_REST; @@ -168,8 +149,6 @@ public class MultiViewGroup extends ViewGroup { public boolean onTouchEvent(MotionEvent event){ Log.i(TAG, "--- onTouchEvent--> " ); - - // TODO Auto-generated method stub Log.e(TAG, "onTouchEvent start"); if (mVelocityTracker == null) { @@ -183,38 +162,26 @@ public class MultiViewGroup extends ViewGroup { super.onTouchEvent(event); //手指位置地点 - float x = event.getX(); - float y = event.getY(); - - + float x = event.getX(); switch(event.getAction()){ case MotionEvent.ACTION_DOWN: //如果屏幕的动画还没结束,你就按下了,我们就结束该动画 if(mScroller != null){ - if(!mScroller.isFinished()){ - mScroller.abortAnimation(); - } - } - + if(!mScroller.isFinished()) + {mScroller.abortAnimation();}} mLastionMotionX = x ; break ; case MotionEvent.ACTION_MOVE: int detaX = (int)(mLastionMotionX - x ); scrollBy(detaX, 0); - Log.e(TAG, "--- MotionEvent.ACTION_MOVE--> detaX is " + detaX ); - mLastionMotionX = x ; - + mLastionMotionX = x ; break ; - case MotionEvent.ACTION_UP: - + case MotionEvent.ACTION_UP: final VelocityTracker velocityTracker = mVelocityTracker ; - velocityTracker.computeCurrentVelocity(1000); - - int velocityX = (int) velocityTracker.getXVelocity() ; - - Log.e(TAG , "---velocityX---" + velocityX); - + velocityTracker.computeCurrentVelocity(1000); + int velocityX = (int) velocityTracker.getXVelocity() ; + Log.e(TAG , "---velocityX---" + velocityX); //滑动速率达到了一个标准(快速向右滑屏,返回上一个屏幕) 马上进行切屏处理 if (velocityX > SNAP_VELOCITY && curScreen > 0) { // Fling enough to move left @@ -235,42 +202,34 @@ public class MultiViewGroup extends ViewGroup { if (mVelocityTracker != null) { mVelocityTracker.recycle(); mVelocityTracker = null; - } - + } mTouchState = TOUCH_STATE_REST ; - break; case MotionEvent.ACTION_CANCEL: mTouchState = TOUCH_STATE_REST ; break; + default: + break; } - return true ; } ////我们是缓慢移动的 private void snapToDestination(){ //当前的偏移位置 - int scrollX = getScrollX() ; - int scrollY = getScrollY() ; - + int scrollX = getScrollX() ; Log.e(TAG, "### onTouchEvent snapToDestination ### scrollX is " + scrollX); - //判断是否超过下一屏的中间位置,如果达到就抵达下一屏,否则保持在原屏幕 //直接使用这个公式判断是哪一个屏幕 前后或者自己 //判断是否超过下一屏的中间位置,如果达到就抵达下一屏,否则保持在原屏幕 // 这样的一个简单公式意思是:假设当前滑屏偏移值即 scrollCurX 加上每个屏幕一半的宽度,除以每个屏幕的宽度就是 // 我们目标屏所在位置了。 假如每个屏幕宽度为320dip, 我们滑到了500dip处,很显然我们应该到达第二屏 - int destScreen = (getScrollX() + getWidth() / 2 ) / getWidth() ; - - - Log.e(TAG, "### onTouchEvent ACTION_UP### dx destScreen " + destScreen); - + int destScreen = (getScrollX() + getWidth() / 2 ) / getWidth() ; + Log.e(TAG, "### onTouchEvent ACTION_UP### dx destScreen " + destScreen); snapToScreen(destScreen); } private void snapToScreen(int whichScreen){ //简单的移到目标屏幕,可能是当前屏或者下一屏幕 //直接跳转过去,不太友好 - //scrollTo(mLastScreen * getWidth(), 0); //为了友好性,我们在增加一个动画效果 //需要再次滑动的距离 屏或者下一屏幕的继续滑动距离 @@ -339,13 +298,9 @@ public class MultiViewGroup extends ViewGroup { child.measure(getWidth(), MultiScreenActivity.scrrenHeight); } } - - private int curPage = 0 ; - // layout过程 @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { - // TODO Auto-generated method stub Log.i(TAG, "--- start onLayout --"); int startLeft = 0; // 每个子视图的起始布局坐标 int startTop = 10; // 间距设置为10px 相当于 android:marginTop= "10px" @@ -357,11 +312,9 @@ public class MultiViewGroup extends ViewGroup { //即使可见的,才划到屏幕上 if(child.getVisibility() != View.GONE) - child.layout(startLeft, startTop, - startLeft + getWidth(), - startTop + MultiScreenActivity.scrrenHeight ); - - startLeft = startLeft + getWidth() ; //校准每个子View的起始布局位置 + { + child.layout(startLeft, startTop, startLeft + getWidth(), startTop + MultiScreenActivity.scrrenHeight ); + startLeft = startLeft + getWidth() ;}//校准每个子View的起始布局位置 //三个子视图的在屏幕中的分布如下 [0 , 320] / [320,640] / [640,960] } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/NewsActivity.java b/代码/在这里3.0/src/com/stone/shop/view/NewsActivity.java index 2014960..5d9c755 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/NewsActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/NewsActivity.java @@ -12,8 +12,6 @@ import android.widget.TextView; * @author Stone */ public class NewsActivity extends Activity { - - private static String TAG = "NewsActivity"; private TextView tvNewsTitle; private TextView tvNewsAuthor; @@ -45,8 +43,8 @@ public class NewsActivity extends Activity { } private String splitString(String str) { - String[] strs = null; - if(str.equals("")){ + String[] strs; + if("".equals(str)){ return ""; } else if ( !(str.contains("【") || str.contains("】")) ) { return str; diff --git a/代码/在这里3.0/src/com/stone/shop/view/OrderActivity.java b/代码/在这里3.0/src/com/stone/shop/view/OrderActivity.java index fcdf913..9952abd 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/OrderActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/OrderActivity.java @@ -6,7 +6,6 @@ import android.app.Activity; import android.app.TimePickerDialog; import android.content.Intent; import android.os.Bundle; -import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; @@ -22,7 +21,6 @@ import com.stone.shop.R; import com.stone.shop.model.Good; import com.stone.shop.model.Order; import com.stone.shop.model.Shop; -import com.stone.ui.DialogOrder; import com.stone.util.Util; /** @@ -44,11 +42,8 @@ public class OrderActivity extends Activity implements OnClickListener { private Button btnOrderCountLess; // 减少数量 private Button btnOrderSetTime; // 设置时间 - private Button btnDlgOk; // 设置时间完成 private Button btnOrderSubmit; // 提交订单 - // private DialogOrder dlgSetOrderTime; - // private View dlgOrderView; private int mHour; private int mMinute; private String time = "12 : 30"; @@ -77,7 +72,6 @@ public class OrderActivity extends Activity implements OnClickListener { shopID = getIntent().getStringExtra("shopID"); initView(); - // initDlgView(); } private void initView() { @@ -103,38 +97,24 @@ public class OrderActivity extends Activity implements OnClickListener { } - // private void initDlgView() { - // LayoutInflater inflater = LayoutInflater.from(this); - // dlgOrderView = inflater.inflate(R.layout.dlg_order_settime, null); - // tpOrderTime = (TimePicker) dlgOrderView.findViewById(R.id.tp_dlg_time); - // tpOrderTime.setIs24HourView(true); - // btnDlgOk = (Button) dlgOrderView.findViewById(R.id.btn_dlg_ok); - // btnDlgOk.setOnClickListener(this); - // } @Override public void onClick(View v) { - int count = 1; + int count; switch (v.getId()) { case R.id.btn_order_count_more: count = Integer.parseInt(tvOrderCount.getText().toString()); - if (count == 4) { - toast("每份订单数量不能超过 4"); + if (count == 4) {toast("每份订单数量不能超过 4"); } else { - tvOrderCount.setText((count + 1) + ""); - } + tvOrderCount.setText(Integer.toString(count+1)); } break; case R.id.btn_order_count_less: count = Integer.parseInt(tvOrderCount.getText().toString()); if (count == 1) { toast("每份订单数量至少为 1 "); - } else { - tvOrderCount.setText((count - 1) + ""); - } + } else {tvOrderCount.setText(Integer.toString(count-1));} break; case R.id.btn_set_time: - // dlgSetOrderTime = new DialogOrder(this, R.style.MyDialog); - // dlgSetOrderTime.show(); final Calendar c = Calendar.getInstance(); mHour = c.get(Calendar.HOUR_OF_DAY); mMinute = c.get(Calendar.MINUTE); @@ -144,11 +124,10 @@ public class OrderActivity extends Activity implements OnClickListener { case R.id.btn_dlg_ok: time = tpOrderTime.getCurrentHour() + " : " + tpOrderTime.getCurrentMinute(); dlgSetOrderTime.dismiss(); + break; case R.id.btn_order_submit: - // toast("小菜订单提交成功"); postOrder(); finish(); - // back(); break; default: break; @@ -176,20 +155,20 @@ public class OrderActivity extends Activity implements OnClickListener { order.setShopName(shop.getName()); order.setCount(count); order.setTime(time); - order.setPrice(price + ""); + order.setPrice(Float.toString(price)); order.setPhone(phone); order.setTips(words); order.save(this, new SaveListener() { @Override public void onSuccess() { - // TODO Auto-generated method stub + // TODO toast("订单提交成功"); } @Override public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub + // TODO toast("订单提交失败"); } }); diff --git a/代码/在这里3.0/src/com/stone/shop/view/OrderInfoActivity.java b/代码/在这里3.0/src/com/stone/shop/view/OrderInfoActivity.java index e3c3d26..8de8190 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/OrderInfoActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/OrderInfoActivity.java @@ -28,8 +28,6 @@ import com.stone.shop.model.Order; */ public class OrderInfoActivity extends Activity implements OnItemLongClickListener{ - private static final String TAG = "OrderInfoActivity"; - private ListView lvOrderInfo; private OrderInfoListAdapter orderInfoListAdapter; private List orderList = new ArrayList(); @@ -63,18 +61,16 @@ public class OrderInfoActivity extends Activity implements OnItemLongClickListen BmobQuery query = new BmobQuery(); query.order("-updatedAt"); query.addWhereEqualTo("userName", user.getUsername()); - if(type.equals("now")) { + if("now".equals(type)) { query.addWhereEqualTo("state", "未取餐"); - } else if(type.equals("old")) { + } else if("old".equals(type)) { query.addWhereEqualTo("state", "已取餐"); - } else { - // do nothing - } + } else {/*do nothing*/} query.findObjects(this, new FindListener() { @Override public void onSuccess(List object) { - if (object.size() == 0) + if (object.isEmpty()) toast("您还没有订单"); orderList = object; // 通知Adapter数据更新 @@ -111,6 +107,5 @@ public class OrderInfoActivity extends Activity implements OnItemLongClickListen popup.show(); return false; - }; - + } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/RegisterActivity.java b/代码/在这里3.0/src/com/stone/shop/view/RegisterActivity.java index f57ac81..cb35761 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/RegisterActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/RegisterActivity.java @@ -1,8 +1,5 @@ package com.stone.shop.view; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import com.stone.shop.R; import com.stone.shop.model.User; import com.stone.util.Util; @@ -25,8 +22,6 @@ import cn.bmob.v3.listener.SaveListener; */ public class RegisterActivity extends Activity implements OnClickListener { - private static final String TAG = "RegisterActivity"; - private Button btnReg; private EditText etUsername; private EditText etPassword; @@ -54,15 +49,14 @@ public class RegisterActivity extends Activity implements OnClickListener { @Override public void onClick(View v) { - switch (v.getId()) { - case R.id.btn_reg_now: + if(v.getId()==R.id.btn_reg_now) { username = etUsername.getText().toString(); password = etPassword.getText().toString(); comfirmPsd = etComfirmPsd.getText().toString(); phone = etPhone.getText().toString(); if (!Util.isNetworkConnected(this)) { toast("木有网络 ( ⊙ o ⊙ ) "); - } else if (username.equals("") || password.equals("") || comfirmPsd.equals("") || phone.equals("")) { + } else if ("".equals(username) || "".equals(password) || "".equals(comfirmPsd) || "".equals(phone)) { toast("不填完整不能拿到身份证, ~~~~(>_<)~~~~ "); } else if (!comfirmPsd.equals(password)) { toast("两次密码输入不一致"); @@ -75,34 +69,26 @@ public class RegisterActivity extends Activity implements OnClickListener { bu.setPassword(password); bu.setPhone(phone); bu.signUp(this, new SaveListener() { - @Override public void onSuccess() { - // TODO Auto-generated method stub toast("拿到身份证了,快登陆吧"); Intent backLogin = new Intent(RegisterActivity.this, LoginActivity.class); startActivity(backLogin); RegisterActivity.this.finish(); } - @Override public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub toast("该名字已被人使用,换个名字吧."); } } ); } - break; - - default: - break; } } public void toast(String toast) { Toast.makeText(this, toast, Toast.LENGTH_SHORT).show(); - }; + } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/ReservationActivity.java b/代码/在这里3.0/src/com/stone/shop/view/ReservationActivity.java index 90bf398..a8c2054 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/ReservationActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/ReservationActivity.java @@ -4,6 +4,8 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import com.stone.shop.R; import com.stone.shop.model.Reservation; @@ -20,7 +22,6 @@ import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import cn.bmob.v3.BmobQuery; -import cn.bmob.v3.listener.DeleteListener; import cn.bmob.v3.listener.FindListener; import cn.bmob.v3.listener.SaveListener; @@ -52,77 +53,48 @@ public class ReservationActivity extends Activity { bmobQuery.addWhereEqualTo("userId", User.userId); bmobQuery.addWhereEqualTo("roomId", roomId); bmobQuery.findObjects(ReservationActivity.this, new FindListener() { - @Override public void onSuccess(List newsList) { - // toast("查询商品成功, 共" + newsList.size()); - if (newsList.size() != 0) { - + if (!newsList.isEmpty()) { String dateTime = newsList.get(0).getDateTime(); - try { - if (dateFormat.parse(dateTime).before(new Date())) { - + if (dateFormat.parse(dateTime).before(new Date())) { Reservation gameScore = new Reservation(); gameScore.setObjectId(newsList.get(0).getObjectId()); gameScore.delete(ReservationActivity.this); - } else { btn_login.setEnabled(false); btn_login.setText("已经预定" + (TextUtils.isEmpty(dateTime) ? "" : (" " + dateTime))); } } catch (ParseException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - } - + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); + } } } @Override - public void onError(int arg0, String arg1) { - toast("查询失败"); - } + public void onError(int arg0, String arg1) {toast("查询失败");} }); btn_login.setOnClickListener(new OnClickListener() { - @Override public void onClick(View v) { - // TODO Auto-generated method stub - DateTimePickDialogUtil dateTimePicKDialog = new DateTimePickDialogUtil(ReservationActivity.this, dateFormat.format(new Date())); dateTimePicKDialog.dateTimePicKDialog(new DateTimeListener() { - @Override public void onDateTimeChane(final String dateTime) { - // TODO Auto-generated method stub - Reservation reservation = new Reservation(); reservation.setRoomId(roomId); reservation.setRoomName(roomName); reservation.setUserId(User.userId); reservation.setDateTime(dateTime); - reservation.save(ReservationActivity.this, new SaveListener() { - @Override public void onSuccess() { - // TODO Auto-generated method stub toast("预定成功"); btn_login.setEnabled(false); - btn_login.setText("已经预定 " + dateTime); - - } - + btn_login.setText("已经预定 " + dateTime);} @Override - public void onFailure(int arg0, String arg1) { - // TODO Auto-generated method stub - toast("预定失败"); - - } + public void onFailure(int arg0, String arg1) {toast("预定失败");} }); } }); @@ -131,7 +103,6 @@ public class ReservationActivity extends Activity { }); } - private void toast(String toast) { Toast.makeText(this, toast, Toast.LENGTH_SHORT).show(); } diff --git a/代码/在这里3.0/src/com/stone/shop/view/ShopActivity.java b/代码/在这里3.0/src/com/stone/shop/view/ShopActivity.java index 01f5159..4f7ab85 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/ShopActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/ShopActivity.java @@ -9,14 +9,8 @@ import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; -import android.view.View.OnClickListener; -import android.view.animation.Animation; -import android.view.animation.AnimationUtils; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; -import android.widget.GridView; -import android.widget.ImageView; -import android.widget.TextView; import android.widget.Toast; /** @@ -26,19 +20,13 @@ import android.widget.Toast; */ public class ShopActivity extends Activity implements OnItemClickListener{ - private static final String TAG = "ShopActivity" ; - private MyGridView gvSchoolClass; //学习小菜 private MyGridView gvFoodClass; //吃饭小菜 private MyGridView gvGiftClass; //购物小菜 private MyGridView gvOutClass; //疯狂小菜 - //private ImageView imgLoc; - //private ImageView imgSearch; - @Override protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_shop); @@ -72,7 +60,6 @@ public class ShopActivity extends Activity implements OnItemClickListener{ public void onItemClick(AdapterView parent, View view, int position, long id) { Log.i("GridView点击了: ", "position"+position); - //toast("点击了: " + position); switch (parent.getId()) { //点击 学习小菜 中的子项(1代表第一个GridView, (position+1)代表GridView中第几个元素) @@ -102,22 +89,19 @@ public class ShopActivity extends Activity implements OnItemClickListener{ Intent toBXTActivity = new Intent(ShopActivity.this, BXTActivity.class); startActivity(toBXTActivity); } else { - toShopAllActivity( GridAdapter.mGiftTexts[position], "3"+(position+1) ); - } + toShopAllActivity( GridAdapter.mGiftTexts[position], "3"+(position+1) );} break; - //点击 疯狂小菜 中的子项 - case R.id.gv_out_class: + case R.id.gv_out_class: //点击 疯狂小菜 中的子项 toShopAllActivity( GridAdapter.mOutTexts[position], "4"+(position+1) ); break; default: break; } - } private void toast(String toast) { Toast.makeText(this, toast, Toast.LENGTH_SHORT).show(); - }; + } /** * diff --git a/代码/在这里3.0/src/com/stone/shop/view/ShopAllActivity.java b/代码/在这里3.0/src/com/stone/shop/view/ShopAllActivity.java index 9dc775b..c0a7287 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/ShopAllActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/ShopAllActivity.java @@ -1,6 +1,5 @@ package com.stone.shop.view; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -41,7 +40,6 @@ public class ShopAllActivity extends Activity implements OnItemClickListener{ @Override protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_shop_all); @@ -69,8 +67,7 @@ public class ShopAllActivity extends Activity implements OnItemClickListener{ @Override public void onItemClick(AdapterView parent, View view, int position, - long id) { - //toast("点击了: " + position); + long id) { //将当前点击的Shop对象传递给下一个Activity Intent toShopItem = new Intent(ShopAllActivity.this, ShopItemActivity.class); Bundle bundle = new Bundle(); @@ -94,8 +91,7 @@ public class ShopAllActivity extends Activity implements OnItemClickListener{ @Override public void onSuccess(List object) { - //toast("查询成功. 共计" + object.size()); - if(object.size()==0) + if(object.isEmpty()) toast("还没开张, 耐心等待吧"); shopList = object; // 通知Adapter数据更新 @@ -115,6 +111,6 @@ public class ShopAllActivity extends Activity implements OnItemClickListener{ private void toast(String toast) { Toast.makeText(this, toast, Toast.LENGTH_SHORT).show(); - }; + } } diff --git a/代码/在这里3.0/src/com/stone/shop/view/ShopItemActivity.java b/代码/在这里3.0/src/com/stone/shop/view/ShopItemActivity.java index 2aaa72e..44b4764 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/ShopItemActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/ShopItemActivity.java @@ -44,7 +44,6 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte private View view1, view2; // 需要滑动的页卡 private ViewPagerCompat viewPager; // viewpager private ViewPagerAdapter shopViewPagerAdapter; - private PagerTitleStrip pagerTitleStrip; // viewpager的标题 private PagerTabStrip pagerTabStrip; // 一个viewpager的指示器,效果就是一个横的粗的下划线 private List viewList; // 把需要滑动的页卡添加到这个list中 private List titleList; // viewpager的标题 @@ -52,8 +51,7 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte // 店铺商品列表 private ListView lvGoodsList; private GoodsListAdapter goodsListAdapter; - private Button btnBuyGood; - + // 店铺简介页中的控件 private TextView tvShopName; // 店铺名 private TextView tvShopInfo; // 店铺简介 @@ -63,7 +61,6 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte private Button btnCommit; private EditText etCommit; private LinearLayout llCommitParent; // 评论父线性布局 - private LinearLayout llCommitSon; // 评论子线性布局 private ImageView imgCall; // 拨打电话 // UI测试数据 @@ -142,8 +139,7 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte @Override public void onSuccess(List goods) { - // toast("查询商品成功, 共" + goods.size()); - if (goods.size() == 0) { + if (goods.isEmpty()) { toast("该店还没有添加商品"); } goodsList = goods; @@ -184,8 +180,6 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte etCommit = (EditText) view2.findViewById(R.id.et_commit); llCommitParent = (LinearLayout) view2 .findViewById(R.id.ll_commit_parent_view); - llCommitSon = (LinearLayout) findViewById(R.id.ll_commit_son_view); - imgCall = (ImageView) view2.findViewById(R.id.img_call); imgCall.setOnClickListener(this); @@ -205,70 +199,29 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte tvUser.setText(user); tvContent.setText(content); llCommitParent.addView(view); - tvUser = null; - tvContent = null; } -// public void clickBuyGood(View v) { -// Intent toOrderActivity = new Intent(ShopItemActivity.this, OrderActivity.class); -// Bundle bundle = new Bundle(); -// bundle.putSerializable("shop", shop ); -// bundle.putString("shopID", shopID); //商铺的ID需要单独传递,否则获取到的是null -// toOrderActivity.putExtras(bundle); -// startActivity(toOrderActivity); -// //------------------------------------------------------------------- -// toast("亲, 记得在弹出的对话框中选择数量哦"); -// Animation shake = AnimationUtils.loadAnimation(this, R.anim.shake); -// lvGoodsList.startAnimation(shake); -// -// // 显示订单对话框 -// orderDlg = new DialogOrder(this, R.style.MyDialog); -// orderDlg.show(); -// // 得到订单对话框的View -// LayoutInflater factory = LayoutInflater.from(this); -// dlgOrderView = factory.inflate(R.layout.dlg_order, null); -// tvOrderCount = (TextView) dlgOrderView -// .findViewById(R.id.tv_order_count); -// etOrderPhone = (EditText) dlgOrderView -// .findViewById(R.id.et_order_phone); -// etOrderWords = (EditText) dlgOrderView -// .findViewById(R.id.et_order_phone); -// ; -// btnOrderCount = (Button) dlgOrderView -// .findViewById(R.id.btn_order_count); -// btnOrderSubmit = (Button) dlgOrderView -// .findViewById(R.id.btn_order_submit); -// btnOrderCount.setOnClickListener(this); -// btnOrderSubmit.setOnClickListener(this); -// //------------------------------------------------------------------- -// } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_commit: - if (etCommit.getText().toString().equals("")) { - toast("亲,先写一句吧"); - } else { - SimpleDateFormat formatter = new SimpleDateFormat( - "yyyy年MM月dd日 HH:mm:ss "); + if (etCommit.getText().toString().equals("")) {toast("亲,先写一句吧");} + else { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss "); Date curDate = new Date(System.currentTimeMillis());// 获取当前时间 String time = formatter.format(curDate); - String content = etCommit.getText().toString() + " [ " + time - + " ] "; + String content = etCommit.getText().toString() + " [ " + time+ " ] "; insertCommit("admin" + ":", content); etCommit.setText(""); } break; - case R.id.img_call: toast("店主没有留下电话"); break; - default: break; } - } @Override @@ -286,24 +239,12 @@ public class ShopItemActivity extends Activity implements OnClickListener, OnIte bundle.putString("shopID", shopID); //商铺的ID需要单独传递,否则获取到的是null toOrderActivity.putExtras(bundle); startActivity(toOrderActivity); - //toast("点击了Position " + position); -// if(view.getId() == R.id.btn_buy_good) { -// toast("点击了购买按钮"); -// Intent toOrderActivity = new Intent(ShopItemActivity.this, OrderActivity.class); -// Bundle bundle = new Bundle(); -// bundle.putSerializable("shop", shop ); -// bundle.putSerializable("good", selectGood); -// bundle.putString("shopID", shopID); //商铺的ID需要单独传递,否则获取到的是null -// toOrderActivity.putExtras(bundle); -// startActivity(toOrderActivity); -// } break; case 1: break; default: break; } - } public void toast(String toast) { diff --git a/代码/在这里3.0/src/com/stone/shop/view/WsqActivity.java b/代码/在这里3.0/src/com/stone/shop/view/WsqActivity.java index 0b1947e..c3b3a65 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/WsqActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/WsqActivity.java @@ -14,16 +14,13 @@ import com.stone.shop.R; * @date 2014-4-24 * @author Stone */ -public class WsqActivity extends Activity { - - private static final String TAG = "CarActivity"; +public class WsqActivity extends Activity { private static final String URL_WSQ = "http://wx.wsq.qq.com/231782938"; private WebView wsqWebView; @Override protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_car); @@ -32,7 +29,6 @@ public class WsqActivity extends Activity { // ----------------------------------------------------------------- wsqWebView.getSettings().setJavaScriptEnabled(true); // 设置使用够执行JS脚本 - //wsqWebView.getSettings().setBuiltInZoomControls(true); // 设置使支持缩放 wsqWebView.getSettings().setDefaultFontSize(12); wsqWebView.setWebChromeClient(new WebChromeClient()); wsqWebView.setWebViewClient(new WebViewClient() { diff --git a/代码/在这里3.0/src/com/stone/shop/view/old/OldMineActivity.java b/代码/在这里3.0/src/com/stone/shop/view/old/OldMineActivity.java index a8886c8..2c48b09 100644 --- a/代码/在这里3.0/src/com/stone/shop/view/old/OldMineActivity.java +++ b/代码/在这里3.0/src/com/stone/shop/view/old/OldMineActivity.java @@ -2,8 +2,6 @@ package com.stone.shop.view.old; import java.util.List; -import javax.security.auth.PrivateCredentialPermission; - import cn.bmob.v3.BmobQuery; import cn.bmob.v3.BmobUser; import cn.bmob.v3.listener.FindListener; @@ -98,7 +96,6 @@ public class OldMineActivity extends Activity implements OnClickListener{ else user = null; loadData(); - //toast("查询到:" + object.size()); } @Override @@ -110,7 +107,6 @@ public class OldMineActivity extends Activity implements OnClickListener{ //加载查询到的用户数据 public void loadData() { - //toast("加载数据中..."); tvUserName.setText(user.getUsername()); tvSchool.setText(user.getSchool()); tvCademy.setText(user.getCademy()); @@ -125,8 +121,7 @@ public class OldMineActivity extends Activity implements OnClickListener{ Intent toShare = new Intent(Intent.ACTION_SEND); toShare.setType("text/plain"); toShare.putExtra(Intent.EXTRA_SUBJECT, "分享"); - toShare.putExtra(Intent.EXTRA_TEXT, "在这里" +"\n" + "针对NUDT三号狱的在这里测试版上线了,赶紧下载体验吧" - + "http://xiaocai.bmob.cn"); + toShare.putExtra(Intent.EXTRA_TEXT, "在这里" +"\n" + "针对NUDT三号狱的在这里测试版上线了,赶紧下载体验吧"+ "http://xiaocai.bmob.cn"); startActivity(Intent.createChooser(toShare, "分享到")); break; case R.id.tv_me: @@ -154,7 +149,7 @@ public class OldMineActivity extends Activity implements OnClickListener{ tvXiaoCai.startAnimation(scale); else if(id == R.id.tv_bowl) tvBowl.startAnimation(scale); - else { } + else {/*do nothing*/ } } private void toast(String toast) { diff --git a/代码/在这里3.0/src/com/stone/ui/AutoScrollViewPager.java b/代码/在这里3.0/src/com/stone/ui/AutoScrollViewPager.java index 0d542cd..549e7ee 100644 --- a/代码/在这里3.0/src/com/stone/ui/AutoScrollViewPager.java +++ b/代码/在这里3.0/src/com/stone/ui/AutoScrollViewPager.java @@ -1,6 +1,8 @@ package com.stone.ui; import java.lang.reflect.Field; +import java.util.logging.Level; +import java.util.logging.Logger; import android.content.Context; import android.os.Handler; @@ -131,7 +133,8 @@ public class AutoScrollViewPager extends ViewPager { scroller = new CustomDurationScroller(getContext(), (Interpolator)interpolatorField.get(null)); scrollerField.set(this, scroller); } catch (Exception e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } } @@ -209,17 +212,13 @@ public class AutoScrollViewPager extends ViewPager { } private class MyHandler extends Handler { - @Override public void handleMessage(Message msg) { super.handleMessage(msg); - - switch (msg.what) { - case SCROLL_WHAT: - scrollOnce(); - sendScrollMessage(interval); - default: - break; + if(msg.what==SCROLL_WHAT) + { + scrollOnce(); + sendScrollMessage(interval); } } } diff --git a/代码/在这里3.0/src/com/stone/ui/CustomDurationScroller.java b/代码/在这里3.0/src/com/stone/ui/CustomDurationScroller.java index 6155603..8e09731 100644 --- a/代码/在这里3.0/src/com/stone/ui/CustomDurationScroller.java +++ b/代码/在这里3.0/src/com/stone/ui/CustomDurationScroller.java @@ -28,10 +28,7 @@ public class CustomDurationScroller extends Scroller { * @param interpolator * @param flywheel */ - // @SuppressLint("NewApi") - // public CustomDurationScroller(Context context, Interpolator interpolator, boolean flywheel){ - // super(context, interpolator, flywheel); - // } + /** * Set the factor by which the duration will change diff --git a/代码/在这里3.0/src/com/stone/ui/DateTimePickDialogUtil.java b/代码/在这里3.0/src/com/stone/ui/DateTimePickDialogUtil.java index 6ba2bfe..0804ab6 100644 --- a/代码/在这里3.0/src/com/stone/ui/DateTimePickDialogUtil.java +++ b/代码/在这里3.0/src/com/stone/ui/DateTimePickDialogUtil.java @@ -10,7 +10,6 @@ import android.app.AlertDialog; import android.content.DialogInterface; import android.widget.DatePicker; import android.widget.DatePicker.OnDateChangedListener; -import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TimePicker; import android.widget.TimePicker.OnTimeChangedListener; @@ -36,7 +35,6 @@ public class DateTimePickDialogUtil implements OnDateChangedListener, OnTimeChan private String dateTime; private String initDateTime; private Activity activity; - private DateTimeListener dateTimeListener; /** * 日期时间弹出选择框构造函数 @@ -93,9 +91,7 @@ public class DateTimePickDialogUtil implements OnDateChangedListener, OnTimeChan } } }).setNegativeButton("取消", new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int whichButton) { - - } + public void onClick(DialogInterface dialog, int whichButton) {/*do nothing*/} }).show(); onDateChanged(null, 0, 0, 0); @@ -164,13 +160,13 @@ public class DateTimePickDialogUtil implements OnDateChangedListener, OnTimeChan */ public static String spliteString(String srcStr, String pattern, String indexOrLast, String frontOrBack) { String result = ""; - int loc = -1; - if (indexOrLast.equalsIgnoreCase("index")) { + int loc; + if ("index".equalsIgnoreCase(indexOrLast)) { loc = srcStr.indexOf(pattern); // 取得字符串第一次出现的位置 } else { loc = srcStr.lastIndexOf(pattern); // 最后一个匹配串的位置 } - if (frontOrBack.equalsIgnoreCase("front")) { + if ("front".equalsIgnoreCase(frontOrBack)) { if (loc != -1) result = srcStr.substring(0, loc); // 截取子串 } else { diff --git a/代码/在这里3.0/src/com/stone/ui/ViewPagerCompat.java b/代码/在这里3.0/src/com/stone/ui/ViewPagerCompat.java index 4d184b3..2263f31 100644 --- a/代码/在这里3.0/src/com/stone/ui/ViewPagerCompat.java +++ b/代码/在这里3.0/src/com/stone/ui/ViewPagerCompat.java @@ -1,5 +1,8 @@ package com.stone.ui; +import java.util.logging.Level; +import java.util.logging.Logger; + import android.content.Context; import android.support.v4.view.ViewPager; import android.util.AttributeSet; @@ -47,6 +50,8 @@ public class ViewPagerCompat extends ViewPager { try { return super.onTouchEvent(ev); } catch (Exception e) { + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); return false; } } diff --git a/代码/在这里3.0/src/com/stone/util/ToastFactory.java b/代码/在这里3.0/src/com/stone/util/ToastFactory.java index 389aae3..31f160b 100644 --- a/代码/在这里3.0/src/com/stone/util/ToastFactory.java +++ b/代码/在这里3.0/src/com/stone/util/ToastFactory.java @@ -10,7 +10,6 @@ public class ToastFactory { public static Toast getToast(Context context, String text) { if (ToastFactory.context == context) { - // toast.cancel(); toast.setText(text); toast.setDuration(Toast.LENGTH_SHORT); diff --git a/代码/在这里3.0/src/com/stone/util/Util.java b/代码/在这里3.0/src/com/stone/util/Util.java index 653e1f9..bb6f120 100644 --- a/代码/在这里3.0/src/com/stone/util/Util.java +++ b/代码/在这里3.0/src/com/stone/util/Util.java @@ -12,6 +12,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -44,6 +46,7 @@ import junit.framework.Assert; * @date 2014-5-9 * @author Stone */ + public class Util { /** @@ -52,6 +55,7 @@ public class Util { * @param phoneNumber * @return true 有效 / false 无效 */ + public static boolean isPhoneNumberValid(String phoneNumber) { boolean isValid = false; @@ -93,8 +97,9 @@ private static final String TAG = "SDK_Sample.Util"; */ public static String bytesToHexString(byte[] src){ StringBuilder stringBuilder = new StringBuilder(""); + String nullreplace=""; if (src == null || src.length <= 0) { - return null; + return nullreplace; } for (int i = 0; i < src.length; i++) { int v = src[i] & 0xFF; @@ -112,8 +117,9 @@ private static final String TAG = "SDK_Sample.Util"; * @return byte[] */ public static byte[] hexStringToBytes(String hexString) { - if (hexString == null || hexString.equals("")) { - return null; + byte[] nullreplace=null; + if (hexString == null || "".equals(hexString)) { + return nullreplace; } hexString = hexString.toUpperCase(); int length = hexString.length() / 2; @@ -148,15 +154,17 @@ private static final String TAG = "SDK_Sample.Util"; try { bytes = str.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } - if (bytes == null) return null; + if (bytes == null) + return null; StringBuilder sb=new StringBuilder(bytes.length*2); //将字节数组中每个字节拆解成2位16进制整数 for(int i=0;i>4)); - sb.append(hexString.charAt((bytes[i]&0x0f)>>0)); + sb.append(hexString.charAt(bytes[i]&0x0f)); } return sb.toString(); } @@ -177,7 +185,8 @@ private static final String TAG = "SDK_Sample.Util"; } catch(Exception e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } } @@ -187,7 +196,8 @@ private static final String TAG = "SDK_Sample.Util"; } catch (Exception e1) { - e1.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e1); } return s; } @@ -203,7 +213,8 @@ private static final String TAG = "SDK_Sample.Util"; try { output.close(); } catch (Exception e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } return result; @@ -221,12 +232,13 @@ private static final String TAG = "SDK_Sample.Util"; inStream = httpConnection.getInputStream(); } } catch (MalformedURLException e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } catch (IOException e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } byte[] data = inputStreamToByte(inStream); - return data; } @@ -241,21 +253,23 @@ private static final String TAG = "SDK_Sample.Util"; bytestream.close(); return imgdata; }catch(Exception e){ - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } - - return null; + byte[] nullreplace=new byte[0]; + return nullreplace; } public static byte[] readFromFile(String fileName, int offset, int len) { + byte[] nullreplace=new byte[0]; if (fileName == null) { - return null; + return nullreplace; } File file = new File(fileName); if (!file.exists()) { Log.i(TAG, "readFromFile: file not found"); - return null; + return nullreplace; } if (len == -1) { @@ -266,15 +280,15 @@ private static final String TAG = "SDK_Sample.Util"; if(offset <0){ Log.e(TAG, "readFromFile invalid offset:" + offset); - return null; + return nullreplace; } if(len <=0 ){ Log.e(TAG, "readFromFile invalid len:" + len); - return null; + return nullreplace; } if(offset + len > (int) file.length()){ Log.e(TAG, "readFromFile invalid file len:" + file.length()); - return null; + return nullreplace; } byte[] b = null; @@ -287,7 +301,8 @@ private static final String TAG = "SDK_Sample.Util"; } catch (Exception e) { Log.e(TAG, "readFromFile : errMsg = " + e.getMessage()); - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); } return b; } @@ -321,35 +336,17 @@ private static final String TAG = "SDK_Sample.Util"; return roundedSize; } - private static int computeInitialSampleSize(BitmapFactory.Options options, - - int minSideLength, int maxNumOfPixels) { - + private static int computeInitialSampleSize(BitmapFactory.Options options,int minSideLength, int maxNumOfPixels) + { double w = options.outWidth; - double h = options.outHeight; - - int lowerBound = (maxNumOfPixels == -1) ? 1 : - - (int) Math.ceil(Math.sqrt(w * h / maxNumOfPixels)); - - int upperBound = (minSideLength == -1) ? 128 : - - (int) Math.min(Math.floor(w / minSideLength), - - Math.floor(h / minSideLength)); - + int lowerBound = (maxNumOfPixels == -1) ? 1 :(int) Math.ceil(Math.sqrt(w * h / maxNumOfPixels)); + int upperBound = (minSideLength == -1) ? 128 :(int) Math.min(Math.floor(w / minSideLength),Math.floor(h / minSideLength)); if (upperBound < lowerBound) { - // return the larger one when there is no overlapping zone. - return lowerBound; - } - - if ((maxNumOfPixels == -1) && - - (minSideLength == -1)) { + if ((maxNumOfPixels == -1) &&(minSideLength == -1)) { return 1; @@ -377,15 +374,19 @@ private static final String TAG = "SDK_Sample.Util"; Bitmap bitmap = BitmapFactory.decodeStream(stream , null, opts); return bitmap; } catch (OutOfMemoryError e) { + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); return null; } catch (Exception e) { + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); return null; } } private static final int MAX_DECODE_PICTURE_SIZE = 1920 * 1440; public static Bitmap extractThumbNail(final String path, final int height, final int width, final boolean crop) { - Assert.assertTrue(path != null && !path.equals("") && height > 0 && width > 0); + Assert.assertTrue(path != null && !"".equals(path) && height > 0 && width > 0); BitmapFactory.Options options = new BitmapFactory.Options(); @@ -396,7 +397,6 @@ private static final String TAG = "SDK_Sample.Util"; tmp.recycle(); tmp = null; } - Log.d(TAG, "extractThumbNail: round=" + width + "x" + height + ", crop=" + crop); final double beY = options.outHeight * 1.0 / height; final double beX = options.outWidth * 1.0 / width; @@ -457,6 +457,8 @@ private static final String TAG = "SDK_Sample.Util"; } catch (final OutOfMemoryError e) { Log.e(TAG, "decode bitmap failed: " + e.getMessage()); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); options = null; } @@ -465,7 +467,8 @@ private static final String TAG = "SDK_Sample.Util"; public static final void showResultDialog(Context context, String msg, String title) { - if(msg == null) return; + if(msg == null) + return; String rmsg = msg.replace(",", "\n"); Log.d("Util", rmsg); new AlertDialog.Builder(context).setTitle(title).setMessage(rmsg) @@ -484,17 +487,13 @@ private static final String TAG = "SDK_Sample.Util"; mProgressDialog = ProgressDialog.show(context, title, message); } - public static AlertDialog showConfirmCancelDialog(Context context, - String title, String message, - DialogInterface.OnClickListener posListener) { - AlertDialog dlg = new AlertDialog.Builder(context).setMessage(message) - .setPositiveButton("确认", posListener) - .setNegativeButton("取消", null).create(); + public static AlertDialog showConfirmCancelDialog(Context context,String message,DialogInterface.OnClickListener posListener) + { + AlertDialog dlg = new AlertDialog.Builder(context).setMessage(message).setPositiveButton("确认", posListener).setNegativeButton("取消", null).create(); dlg.setCanceledOnTouchOutside(false); dlg.show(); return dlg; } - public static final void dismissDialog() { if (mProgressDialog != null) { mProgressDialog.dismiss(); @@ -522,7 +521,6 @@ private static final String TAG = "SDK_Sample.Util"; activity.runOnUiThread(new Runnable() { @Override public void run() { - // TODO Auto-generated method stub if (mToast != null) { mToast.cancel(); mToast = null; @@ -569,10 +567,12 @@ private static final String TAG = "SDK_Sample.Util"; Log.v(TAG, "image download finished." + imageUri); } catch (OutOfMemoryError e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); bitmap = null; } catch (IOException e) { - e.printStackTrace(); + Logger logger = Logger.getLogger("lavasoft"); + logger.log(Level.SEVERE, "sthwrong", e); Log.v(TAG, "getbitmap bmp fail---"); bitmap = null; } @@ -589,8 +589,8 @@ private static final String TAG = "SDK_Sample.Util"; // =兼容android 5.0 // ========== - public static String ACTION_OPEN_DOCUMENT = "android.intent.action.OPEN_DOCUMENT"; - public static int Build_VERSION_KITKAT = 19; + public static final String ACTION_OPEN_DOCUMENT = "android.intent.action.OPEN_DOCUMENT"; + public static final int Build_VERSION_KITKAT = 19; public static String getPath(final Context context, final Uri uri) { final boolean isKitKat = Build.VERSION.SDK_INT >= 19; diff --git a/在这里:软件需求规格说明书.doc b/在这里:软件需求规格说明书.doc new file mode 100644 index 0000000..fdef825 Binary files /dev/null and b/在这里:软件需求规格说明书.doc differ diff --git a/需求设计用例图.vsdx b/需求设计用例图.vsdx new file mode 100644 index 0000000..4d2b2a5 Binary files /dev/null and b/需求设计用例图.vsdx differ diff --git a/顺序图.vsdx b/顺序图.vsdx new file mode 100644 index 0000000..c0cddf4 Binary files /dev/null and b/顺序图.vsdx differ