├── app ├── .gitignore ├── libs │ ├── gson-2.2.4.jar │ ├── butterknife-6.1.0.jar │ ├── greendao-1.3.0-beta-1.jar │ ├── uk-co-senab-photoview-source.jar │ └── universal-image-loader-1.9.3.jar ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── bg_floor.9.png │ │ │ │ ├── bg_comment.xml │ │ │ │ ├── progressbar_horizontal_blue.xml │ │ │ │ ├── progress_horizontal_holo_dark.xml │ │ │ │ └── progress_indeterminate_horizontal_holo.xml │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_more.png │ │ │ │ ├── ic_play_gif.png │ │ │ │ ├── ic_action_refresh.png │ │ │ │ ├── ic_actionbar_back.png │ │ │ │ ├── ic_chat_white_24dp.png │ │ │ │ ├── ic_loading_large.png │ │ │ │ ├── ic_loading_small.png │ │ │ │ ├── ic_mood_white_24dp.png │ │ │ │ ├── ic_movie_white_24dp.png │ │ │ │ ├── ic_comment_down_arrow.png │ │ │ │ ├── ic_explore_white_24dp.png │ │ │ │ ├── progress_bg_holo_dark.9.png │ │ │ │ ├── widget_bottom_shadow.9.png │ │ │ │ ├── ic_more_horiz_grey600_24dp.png │ │ │ │ ├── progress_primary_holo_dark.9.png │ │ │ │ ├── progress_secondary_holo_dark.9.png │ │ │ │ ├── progressbar_indeterminate_holo1.png │ │ │ │ ├── progressbar_indeterminate_holo2.png │ │ │ │ ├── progressbar_indeterminate_holo3.png │ │ │ │ ├── progressbar_indeterminate_holo4.png │ │ │ │ ├── progressbar_indeterminate_holo5.png │ │ │ │ ├── progressbar_indeterminate_holo6.png │ │ │ │ ├── progressbar_indeterminate_holo7.png │ │ │ │ └── progressbar_indeterminate_holo8.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_drawer.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_action_chat.png │ │ │ │ ├── ic_action_copy.png │ │ │ │ ├── ic_action_edit.png │ │ │ │ ├── drawer_shadow.9.png │ │ │ │ ├── ic_action_refresh.png │ │ │ │ ├── ic_action_reply.png │ │ │ │ ├── ic_action_share.png │ │ │ │ ├── ic_stat_av_upload.png │ │ │ │ ├── ic_action_download.png │ │ │ │ ├── ic_action_send_now.png │ │ │ │ ├── ic_chat_white_24dp.png │ │ │ │ ├── ic_close_white_24dp.png │ │ │ │ ├── ic_mood_white_24dp.png │ │ │ │ ├── ic_movie_white_24dp.png │ │ │ │ ├── ic_action_share_black.png │ │ │ │ ├── ic_action_share_moment.png │ │ │ │ ├── ic_action_share_other.png │ │ │ │ ├── ic_action_share_wechat.png │ │ │ │ ├── ic_action_share_weibo.png │ │ │ │ ├── ic_explore_white_24dp.png │ │ │ │ ├── ic_settings_white_24dp.png │ │ │ │ ├── post_list_item_top.9.png │ │ │ │ ├── widget_bottom_shadow.9.png │ │ │ │ ├── ic_action_refresh_black.png │ │ │ │ ├── post_list_item_bottom.9.png │ │ │ │ ├── progress_bg_holo_dark.9.png │ │ │ │ ├── vpi__tab_selected_holo.9.png │ │ │ │ ├── ic_chevron_left_white_36dp.png │ │ │ │ ├── ic_chevron_right_white_36dp.png │ │ │ │ ├── ic_local_florist_white_24dp.png │ │ │ │ ├── ic_more_horiz_grey600_24dp.png │ │ │ │ ├── ic_stat_navigation_accept.png │ │ │ │ ├── ic_stat_navigation_cancel.png │ │ │ │ ├── vpi__tab_unselected_holo.9.png │ │ │ │ ├── ic_brightness_day_white_24dp.png │ │ │ │ ├── progress_primary_holo_dark.9.png │ │ │ │ ├── comment_item_card_background.9.png │ │ │ │ ├── ic_brightness_night_white_24dp.png │ │ │ │ ├── progress_secondary_holo_dark.9.png │ │ │ │ ├── progressbar_indeterminate_holo1.png │ │ │ │ ├── progressbar_indeterminate_holo2.png │ │ │ │ ├── progressbar_indeterminate_holo3.png │ │ │ │ ├── progressbar_indeterminate_holo4.png │ │ │ │ ├── progressbar_indeterminate_holo5.png │ │ │ │ ├── progressbar_indeterminate_holo6.png │ │ │ │ ├── progressbar_indeterminate_holo7.png │ │ │ │ ├── progressbar_indeterminate_holo8.png │ │ │ │ ├── vpi__tab_selected_focused_holo.9.png │ │ │ │ ├── vpi__tab_selected_pressed_holo.9.png │ │ │ │ ├── vpi__tab_unselected_focused_holo.9.png │ │ │ │ └── vpi__tab_unselected_pressed_holo.9.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_drawer.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_play_gif.png │ │ │ │ ├── drawer_shadow.9.png │ │ │ │ ├── ic_action_back.png │ │ │ │ ├── ic_action_chat.png │ │ │ │ ├── ic_action_copy.png │ │ │ │ ├── ic_action_edit.png │ │ │ │ ├── ic_action_reply.png │ │ │ │ ├── ic_action_share.png │ │ │ │ ├── ic_action_download.png │ │ │ │ ├── ic_action_refresh.png │ │ │ │ ├── ic_action_send_now.png │ │ │ │ ├── ic_chat_white_24dp.png │ │ │ │ ├── ic_mood_white_24dp.png │ │ │ │ ├── ic_stat_av_upload.png │ │ │ │ ├── ic_action_share_black.png │ │ │ │ ├── ic_action_share_other.png │ │ │ │ ├── ic_action_share_weibo.png │ │ │ │ ├── ic_close_white_24dp.png │ │ │ │ ├── ic_explore_white_24dp.png │ │ │ │ ├── ic_movie_white_24dp.png │ │ │ │ ├── ic_action_refresh_black.png │ │ │ │ ├── ic_action_share_moment.png │ │ │ │ ├── ic_action_share_wechat.png │ │ │ │ ├── ic_settings_white_24dp.png │ │ │ │ ├── progress_bg_holo_dark.9.png │ │ │ │ ├── ic_chevron_left_white_36dp.png │ │ │ │ ├── ic_more_horiz_grey600_24dp.png │ │ │ │ ├── ic_stat_navigation_accept.png │ │ │ │ ├── ic_stat_navigation_cancel.png │ │ │ │ ├── ic_brightness_day_white_24dp.png │ │ │ │ ├── ic_chevron_right_white_36dp.png │ │ │ │ ├── ic_local_florist_white_24dp.png │ │ │ │ ├── progress_primary_holo_dark.9.png │ │ │ │ ├── ic_brightness_night_white_24dp.png │ │ │ │ ├── progress_secondary_holo_dark.9.png │ │ │ │ ├── progressbar_indeterminate_holo1.png │ │ │ │ ├── progressbar_indeterminate_holo2.png │ │ │ │ ├── progressbar_indeterminate_holo3.png │ │ │ │ ├── progressbar_indeterminate_holo4.png │ │ │ │ ├── progressbar_indeterminate_holo5.png │ │ │ │ ├── progressbar_indeterminate_holo6.png │ │ │ │ ├── progressbar_indeterminate_holo7.png │ │ │ │ └── progressbar_indeterminate_holo8.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── anim │ │ │ │ ├── anim_none.xml │ │ │ │ ├── trans_center_2_right.xml │ │ │ │ └── item_bottom_in.xml │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── arrays.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── layout │ │ │ │ ├── common_toolbar.xml │ │ │ │ ├── fragment_fresh_news_detail.xml │ │ │ │ ├── common_loading.xml │ │ │ │ ├── activity_fresh_news_detail.xml │ │ │ │ ├── item_comment_flag.xml │ │ │ │ ├── activity_setting.xml │ │ │ │ ├── fragment_auto_load.xml │ │ │ │ ├── drawer_item.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_comment_list.xml │ │ │ │ ├── dialog_commentotar_info.xml │ │ │ │ ├── activity_push_comment.xml │ │ │ │ ├── fragment_drawer.xml │ │ │ │ ├── item_fresh_news_small.xml │ │ │ │ ├── item_comment_floor.xml │ │ │ │ └── activity_video_detail.xml │ │ │ ├── menu │ │ │ │ ├── menu_comment_list.xml │ │ │ │ ├── menu_refresh.xml │ │ │ │ ├── menu_video_detail.xml │ │ │ │ ├── menu_push_comment.xml │ │ │ │ └── menu_fresh_news_detail.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ └── xml │ │ │ │ └── preferences.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── socks │ │ │ │ └── jiandan │ │ │ │ ├── callback │ │ │ │ ├── LoadMoreListener.java │ │ │ │ ├── LoadFinishCallBack.java │ │ │ │ ├── LoadResultCallBack.java │ │ │ │ ├── OnHttpResponseCallBack.java │ │ │ │ └── OnHttpResponseCallBackImpl.java │ │ │ │ ├── utils │ │ │ │ ├── logger │ │ │ │ │ └── LogLevel.java │ │ │ │ ├── ScreenSizeUtil.java │ │ │ │ ├── ShowToast.java │ │ │ │ ├── AppInfoUtil.java │ │ │ │ ├── StrictModeUtil.java │ │ │ │ ├── CacheUtil.java │ │ │ │ ├── NetWorkUtil.java │ │ │ │ ├── EditTextShakeHelper.java │ │ │ │ ├── TextUtil.java │ │ │ │ ├── String2TimeUtil.java │ │ │ │ ├── JDMediaScannerConnectionClient.java │ │ │ │ ├── ActivityManager.java │ │ │ │ ├── JSONParser.java │ │ │ │ ├── SharedPreUtils.java │ │ │ │ └── ShareUtil.java │ │ │ │ ├── view │ │ │ │ ├── floorview │ │ │ │ │ ├── Commentable.java │ │ │ │ │ ├── SubComments.java │ │ │ │ │ └── SubFloorFactory.java │ │ │ │ ├── FadeInAnimator.java │ │ │ │ └── ShowMaxImageView.java │ │ │ │ ├── ui │ │ │ │ ├── fragment │ │ │ │ │ └── SisterFragment.java │ │ │ │ ├── SettingActivity.java │ │ │ │ └── FreshNewsDetailActivity.java │ │ │ │ ├── async │ │ │ │ ├── ResponseCode.java │ │ │ │ ├── Handler4FreshNews.java │ │ │ │ ├── Handler4FreshNewsDetail.java │ │ │ │ ├── Handler4Joke.java │ │ │ │ ├── Handler4Picture.java │ │ │ │ ├── BaseJsonResponseHandler.java │ │ │ │ ├── Handler4CommentNumber.java │ │ │ │ ├── Handler4ReplyFreshNews.java │ │ │ │ └── Handler4Reply.java │ │ │ │ ├── model │ │ │ │ ├── NetWorkEvent.java │ │ │ │ ├── CommentNumber.java │ │ │ │ ├── Vote.java │ │ │ │ ├── MenuItem.java │ │ │ │ ├── Author.java │ │ │ │ ├── Tags.java │ │ │ │ ├── Joke.java │ │ │ │ ├── Picture.java │ │ │ │ └── CustomFields.java │ │ │ │ ├── cache │ │ │ │ ├── BaseCache.java │ │ │ │ ├── SisterCache.java │ │ │ │ ├── JokeCache.java │ │ │ │ ├── VideoCache.java │ │ │ │ ├── PictureCache.java │ │ │ │ └── FreshNewsCache.java │ │ │ │ ├── base │ │ │ │ ├── ConstantString.java │ │ │ │ ├── BaseFragment.java │ │ │ │ ├── BaseActivity.java │ │ │ │ └── JDApplication.java │ │ │ │ └── net │ │ │ │ ├── RequestManager.java │ │ │ │ ├── Request4FreshNews.java │ │ │ │ ├── Request4Joke.java │ │ │ │ ├── Request4FreshNewsDetail.java │ │ │ │ ├── Request4Picture.java │ │ │ │ └── Request4CommentCounts.java │ │ ├── java-gen │ │ │ └── com │ │ │ │ └── socks │ │ │ │ └── greendao │ │ │ │ ├── JokeCache.java │ │ │ │ ├── VideoCache.java │ │ │ │ ├── SisterCache.java │ │ │ │ ├── PictureCache.java │ │ │ │ └── FreshNewsCache.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── socks │ │ └── jiandan │ │ ├── ApplicationTest.java │ │ └── TestClass.java ├── proguard-rules.pro └── build.gradle ├── GreenDaoGenerator ├── .gitignore ├── build.gradle ├── src │ └── main │ │ └── java │ │ └── com │ │ └── socks │ │ └── MyDaoGenerator.java └── GreenDaoGenerator.iml ├── settings.gradle ├── images └── demo.gif ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .idea ├── libraries │ ├── gson_2_2_4.xml │ ├── butterknife_6_1_0.xml │ ├── greendao_1_3_0_beta_1.xml │ ├── uk_co_senab_photoview_source.xml │ ├── haha_1_3.xml │ ├── leakcanary_watcher_1_3_1.xml │ ├── leakcanary_analyzer_1_3_1.xml │ ├── universal_image_loader_1_9_3.xml │ ├── leakcanary_android_1_3_1.xml │ ├── eventbus_2_4_0.xml │ ├── library_1_0_19.xml │ ├── support_annotations_22_2_0.xml │ ├── freemarker_2_3_20.xml │ ├── httpclient_4_3_6.xml │ ├── lib_1_0_1.xml │ ├── greendao_generator_1_3_1.xml │ ├── android_async_http_1_4_9.xml │ ├── cardview_v7_22_2_0.xml │ ├── recyclerview_v7_22_2_0.xml │ ├── appcompat_v7_22_2_0.xml │ ├── material_dialogs_0_7_3_1.xml │ └── support_v4_22_2_0.xml └── runConfigurations.xml ├── README.md ├── .gitignore ├── gradle.properties ├── JianDan.iml ├── JianDan_AsyncHttpClient.iml └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /app.iml 2 | /build 3 | -------------------------------------------------------------------------------- /GreenDaoGenerator/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':GreenDaoGenerator' 2 | -------------------------------------------------------------------------------- /images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/images/demo.gif -------------------------------------------------------------------------------- /app/libs/gson-2.2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/libs/gson-2.2.4.jar -------------------------------------------------------------------------------- /app/libs/butterknife-6.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/libs/butterknife-6.1.0.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/libs/greendao-1.3.0-beta-1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/libs/greendao-1.3.0-beta-1.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_floor.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable/bg_floor.9.png -------------------------------------------------------------------------------- /app/libs/uk-co-senab-photoview-source.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/libs/uk-co-senab-photoview-source.jar -------------------------------------------------------------------------------- /app/libs/universal-image-loader-1.9.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/libs/universal-image-loader-1.9.3.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_more.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_drawer.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_play_gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_play_gif.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_drawer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_drawer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_play_gif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_play_gif.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_chat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_copy.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_edit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_actionbar_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_actionbar_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_chat_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_chat_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_loading_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_loading_large.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_loading_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_loading_small.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_mood_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_mood_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/drawer_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_reply.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_stat_av_upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_stat_av_upload.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_chat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_copy.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_edit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_reply.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_movie_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_movie_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_download.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_send_now.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_send_now.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_chat_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_chat_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_close_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mood_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_mood_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_movie_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_movie_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_download.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_send_now.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_send_now.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_chat_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_chat_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_mood_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_mood_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_stat_av_upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_stat_av_upload.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_comment_down_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_comment_down_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_explore_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_explore_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progress_bg_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progress_bg_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/widget_bottom_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/widget_bottom_shadow.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_share_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_share_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_share_moment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_share_moment.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_share_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_share_other.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_share_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_share_wechat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_share_weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_share_weibo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_explore_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_explore_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_settings_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_settings_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/post_list_item_top.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/post_list_item_top.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/widget_bottom_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/widget_bottom_shadow.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_share_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_share_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_share_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_share_other.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_share_weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_share_weibo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_explore_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_explore_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_movie_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_movie_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_refresh_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_action_refresh_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/post_list_item_bottom.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/post_list_item_bottom.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progress_bg_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progress_bg_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/vpi__tab_selected_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/vpi__tab_selected_holo.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_refresh_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_refresh_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_share_moment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_share_moment.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_share_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_share_wechat.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_settings_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_settings_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progress_bg_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progress_bg_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_more_horiz_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/ic_more_horiz_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progress_primary_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progress_primary_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_chevron_left_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_chevron_left_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_chevron_right_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_chevron_right_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_local_florist_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_local_florist_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_more_horiz_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_more_horiz_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_stat_navigation_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_stat_navigation_accept.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_stat_navigation_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_stat_navigation_cancel.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/vpi__tab_unselected_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/vpi__tab_unselected_holo.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_chevron_left_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_chevron_left_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_more_horiz_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_more_horiz_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_stat_navigation_accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_stat_navigation_accept.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_stat_navigation_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_stat_navigation_cancel.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progress_secondary_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progress_secondary_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_brightness_day_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_brightness_day_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progress_primary_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progress_primary_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_brightness_day_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_brightness_day_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_chevron_right_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_chevron_right_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_local_florist_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_local_florist_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progress_primary_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progress_primary_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo5.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo6.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo7.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-hdpi/progressbar_indeterminate_holo8.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/comment_item_card_background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/comment_item_card_background.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_brightness_night_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/ic_brightness_night_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progress_secondary_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progress_secondary_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo5.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo6.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo7.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/progressbar_indeterminate_holo8.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/vpi__tab_selected_focused_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/vpi__tab_selected_focused_holo.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/vpi__tab_selected_pressed_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/vpi__tab_selected_pressed_holo.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_brightness_night_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/ic_brightness_night_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progress_secondary_holo_dark.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progress_secondary_holo_dark.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo5.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo6.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo7.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xxhdpi/progressbar_indeterminate_holo8.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/vpi__tab_unselected_focused_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/vpi__tab_unselected_focused_holo.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/vpi__tab_unselected_pressed_holo.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoKaiQiang/JianDan_AsyncHttpClient/HEAD/app/src/main/res/drawable-xhdpi/vpi__tab_unselected_pressed_holo.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/callback/LoadMoreListener.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.callback; 2 | 3 | /** 4 | * Created by zhaokaiqiang on 15/11/7. 5 | */ 6 | public interface LoadMoreListener { 7 | void loadMore(); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/callback/LoadFinishCallBack.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.callback; 2 | 3 | /** 4 | * Created by zhaokaiqiang on 15/4/9. 5 | */ 6 | public interface LoadFinishCallBack { 7 | void loadFinish(Object obj); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_none.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /.idea/libraries/gson_2_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/butterknife_6_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /.idea/libraries/greendao_1_3_0_beta_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/logger/LogLevel.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils.logger; 2 | 3 | /** 4 | * @author Orhan Obut 5 | */ 6 | public enum LogLevel { 7 | 8 | /** 9 | * Prints all logs 10 | */ 11 | FULL, 12 | 13 | /** 14 | * No log will be printed 15 | */ 16 | NONE 17 | } 18 | -------------------------------------------------------------------------------- /.idea/libraries/uk_co_senab_photoview_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/trans_center_2_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/common_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.idea/libraries/haha_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/view/floorview/Commentable.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.view.floorview; 2 | 3 | /** 4 | * 代表可评论 5 | * Created by zhaokaiqiang on 15/4/28. 6 | */ 7 | public interface Commentable { 8 | 9 | int getCommentFloorNum(); 10 | 11 | String getCommentContent(); 12 | 13 | String getAuthorName(); 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /GreenDaoGenerator/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | repositories { 4 | mavenLocal() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | compile 'de.greenrobot:greendao-generator:1.3.1' 10 | } 11 | 12 | sourceSets { 13 | main { 14 | java { 15 | srcDir 'src/main/java' 16 | } 17 | } 18 | } 19 | artifacts { 20 | archives jar 21 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_comment_list.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_refresh.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JianDan客户端高仿版[Android-Async-Http] 2 | --- 3 | 4 | 本项目使用Android-Async-Http作为网络请求库,使用Volley、okhttp请求库的请关注原始版本 5 | 6 | - [原始版本](https://github.com/ZhaoKaiQiang/JianDan) 7 | 8 | ##效果图 9 | 10 | ![GIF](https://github.com/ZhaoKaiQiang/JianDan/blob/master/images/demo.gif) 11 | 12 | ##关于我 13 | - [Android开发工程师](http://weibo.com/zhaokaiqiang1992) 14 | - [CSDN博客专家](http://blog.csdn.net/zhaokaiqiang1992) 15 | -------------------------------------------------------------------------------- /app/src/main/res/anim/item_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 8 | -------------------------------------------------------------------------------- /.idea/libraries/leakcanary_watcher_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_video_detail.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/leakcanary_analyzer_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/callback/LoadResultCallBack.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.callback; 2 | 3 | /** 4 | * Created by zhaokaiqiang on 15/11/7. 5 | */ 6 | public interface LoadResultCallBack { 7 | 8 | int SUCCESS_OK = 1001; 9 | int SUCCESS_NONE = 1002; 10 | int ERROR_NET = 1003; 11 | 12 | void onSuccess(int result, Object object); 13 | 14 | void onError(int code, String msg); 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_push_comment.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | # Built application files 3 | *.apk 4 | *.ap_ 5 | 6 | # Files for the Dalvik VM 7 | *.dex 8 | 9 | # Java class files 10 | *.class 11 | 12 | # Generated files 13 | bin/ 14 | gen/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | /*/build/ 20 | 21 | # Local configuration file (sdk path, etc) 22 | local.properties 23 | 24 | # Proguard folder generated by Eclipse 25 | proguard/ 26 | 27 | # Log Files 28 | *.log 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/callback/OnHttpResponseCallBack.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.callback; 2 | 3 | /** 4 | * Created by zhaokaiqiang on 15/11/10. 5 | */ 6 | public interface OnHttpResponseCallBack { 7 | 8 | void onSuccess(int statusCode, T t); 9 | 10 | void onFailure(int statusCode, Throwable throwable); 11 | 12 | void onStart(); 13 | 14 | void onFinish(); 15 | 16 | void onCancel(); 17 | 18 | } -------------------------------------------------------------------------------- /.idea/libraries/universal_image_loader_1_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/socks/jiandan/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/ui/fragment/SisterFragment.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.ui.fragment; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.socks.jiandan.model.Picture; 6 | 7 | public class SisterFragment extends PictureFragment { 8 | 9 | @Override 10 | public void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | setHasOptionsMenu(true); 13 | mType = Picture.PictureType.Sister; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/socks/jiandan/TestClass.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan; 2 | 3 | import android.test.InstrumentationTestCase; 4 | 5 | import com.socks.jiandan.base.JDApplication; 6 | 7 | /** 8 | * Created by zhaokaiqiang on 15/4/27. 9 | */ 10 | public class TestClass extends InstrumentationTestCase { 11 | 12 | public TestClass() { 13 | 14 | } 15 | 16 | public void testGetCommentators() throws Exception { 17 | JDApplication.getContext(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/async/ResponseCode.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.async; 2 | 3 | /** 4 | * Created by zhaokaiqiang on 15/11/10. 5 | */ 6 | public interface ResponseCode { 7 | 8 | int FAILED_NO_NETWORK = 404; 9 | int FAILED_JSON_PARSE = 405; 10 | int FAILED_GET_DATA = 406; 11 | int FAILED_MALFORMED_URL_EXCEPTION = 407; 12 | 13 | 14 | int SUCCESS = 200; 15 | 16 | String MESSAGE_NO_NETWORK = "无网络"; 17 | String MESSAGE_GET_DATA = "获取数据失败"; 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_fresh_news_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/leakcanary_android_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/common_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/NetWorkEvent.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | public class NetWorkEvent { 4 | 5 | public static final int AVAILABLE = 1; 6 | public static final int UNAVAILABLE = -1; 7 | 8 | private int type; 9 | 10 | public int getType() { 11 | return type; 12 | } 13 | 14 | public void setType(int type) { 15 | this.type = type; 16 | } 17 | 18 | public NetWorkEvent(int type) { 19 | this.type = type; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/ScreenSizeUtil.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import android.app.Activity; 4 | 5 | /** 6 | * Created by zhaokaiqiang on 15/4/9. 7 | */ 8 | public class ScreenSizeUtil { 9 | 10 | public static int getScreenWidth(Activity activity) { 11 | return activity.getWindowManager().getDefaultDisplay().getWidth(); 12 | } 13 | 14 | public static int getScreenHeight(Activity activity) { 15 | return activity.getWindowManager().getDefaultDisplay().getHeight(); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.idea/libraries/eventbus_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/library_1_0_19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/support_annotations_22_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/freemarker_2_3_20.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/httpclient_4_3_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/cache/BaseCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.cache; 2 | 3 | import com.socks.greendao.DaoSession; 4 | 5 | import java.util.ArrayList; 6 | 7 | /** 8 | * Created by zhaokaiqiang on 15/5/12. 9 | */ 10 | public abstract class BaseCache { 11 | 12 | public static final String DB_NAME = "jiandan-db"; 13 | 14 | protected static DaoSession mDaoSession; 15 | 16 | public abstract void clearAllCache(); 17 | 18 | public abstract ArrayList getCacheByPage(int page); 19 | 20 | public abstract void addResultCache(String result, int page); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_fresh_news_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/lib_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #03A9F4 4 | #0288D1 5 | #B3E5FC 6 | #03A9F4 7 | #212121 8 | #727272 9 | #FFFFFF 10 | #B6B6B6 11 | 12 | #FFFFFF 13 | #FFFFFF 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_comment_flag.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/greendao_generator_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/android_async_http_1_4_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/cardview_v7_22_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_setting.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/recyclerview_v7_22_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 回复 6 | 复制 7 | 8 | 9 | 10 | 11 | 分享 12 | 复制 13 | 14 | 15 | 16 | 分享 17 | 复制 18 | 打开 19 | 20 | 21 | 22 | 分享 23 | 保存 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_fresh_news_detail.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/callback/OnHttpResponseCallBackImpl.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.callback; 2 | 3 | /** 4 | * Created by zhaokaiqiang on 15/11/10. 5 | */ 6 | public abstract class OnHttpResponseCallBackImpl implements OnHttpResponseCallBack { 7 | 8 | 9 | @Override 10 | public void onSuccess(int statusCode,T t) { 11 | 12 | } 13 | 14 | @Override 15 | public void onStart() { 16 | 17 | } 18 | 19 | @Override 20 | public void onFinish() { 21 | 22 | } 23 | 24 | @Override 25 | public void onFailure(int statusCode, Throwable throwable) { 26 | 27 | } 28 | 29 | @Override 30 | public void onCancel() { 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/progressbar_horizontal_blue.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_horizontal_holo_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/zhaokaiqiang/Develop/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 煎蛋 4 | 吐槽 5 | 回复 6 | 发送 7 | 分享 8 | 复制 9 | 浏览器打开 10 | 新鲜事 11 | VideoDetailActivity 12 | 段子 13 | 设置 14 | 加载中... 15 | 更多 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/ShowToast.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 青岛司通科技有限公司 All rights reserved. 3 | * File Name:ShowToast.java 4 | * Version:V1.0 5 | * Author:zhaokaiqiang 6 | * Date:2014-8-7 7 | */ 8 | package com.socks.jiandan.utils; 9 | 10 | import android.support.annotation.NonNull; 11 | import android.widget.Toast; 12 | 13 | import com.socks.jiandan.base.JDApplication; 14 | 15 | public class ShowToast { 16 | 17 | public static void Short(@NonNull CharSequence sequence) { 18 | Toast.makeText(JDApplication.getContext(), sequence, Toast.LENGTH_SHORT).show(); 19 | } 20 | 21 | public static void Long(@NonNull CharSequence sequence) { 22 | Toast.makeText(JDApplication.getContext(), sequence, Toast.LENGTH_SHORT).show(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /.idea/libraries/appcompat_v7_22_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/AppInfoUtil.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import android.app.Activity; 4 | import android.content.pm.PackageInfo; 5 | import android.content.pm.PackageManager; 6 | 7 | public class AppInfoUtil { 8 | 9 | public static String getVersionName(Activity activity) { 10 | // 获取packagemanager的实例 11 | PackageManager packageManager = activity.getPackageManager(); 12 | // getPackageName()是你当前类的包名,0代表是获取版本信息 13 | PackageInfo packInfo = null; 14 | try { 15 | packInfo = packageManager.getPackageInfo(activity.getPackageName(), 0); 16 | String version = packInfo.versionName; 17 | return version; 18 | } catch (PackageManager.NameNotFoundException e) { 19 | e.printStackTrace(); 20 | return "0"; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.idea/libraries/material_dialogs_0_7_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_auto_load.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /.idea/libraries/support_v4_22_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/xml/preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 11 | 15 | 16 | 17 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /JianDan.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/drawer_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 25 | 26 | -------------------------------------------------------------------------------- /JianDan_AsyncHttpClient.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/view/floorview/SubComments.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package com.socks.jiandan.view.floorview; 5 | 6 | import java.util.ArrayList; 7 | import java.util.Iterator; 8 | import java.util.List; 9 | 10 | /** 11 | * @author JohnnyShieh 12 | * @ClassName: SubComments 13 | * @Description:TODO 14 | * @date Feb 20, 2014 10:03:22 AM 15 | */ 16 | public class SubComments { 17 | 18 | private List list; 19 | 20 | public SubComments(List cmts) { 21 | if (cmts != null) { 22 | list = new ArrayList<>(cmts); 23 | } else { 24 | list = null; 25 | } 26 | } 27 | 28 | public int size() { 29 | return list == null ? 0 : list.size(); 30 | } 31 | 32 | public int getFloorNum() { 33 | return list.get(list.size() - 1).getCommentFloorNum(); 34 | } 35 | 36 | public Commentable get(int index) { 37 | return list.get(index); 38 | } 39 | 40 | public Iterator iterator() { 41 | return list == null ? null : list.iterator(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/StrictModeUtil.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import android.os.Build; 4 | import android.os.StrictMode; 5 | 6 | import com.socks.jiandan.BuildConfig; 7 | 8 | /** 9 | * 开启严格模式,检测内存、硬盘等敏感操作,线程监控出现问题会出对话框提示 10 | * Created by zhaokaiqiang on 15/11/9. 11 | */ 12 | public class StrictModeUtil { 13 | 14 | //暂时关闭 15 | private static boolean isShow = false; 16 | 17 | public static void init() { 18 | if (false && BuildConfig.DEBUG && Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) { 19 | 20 | //线程监控,会弹框哦 21 | StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() 22 | .detectAll() 23 | .penaltyLog() 24 | .penaltyDialog() 25 | .build()); 26 | 27 | //VM监控 28 | StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() 29 | .detectAll() 30 | .penaltyLog() 31 | .build()); 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 14 | 15 | 19 | 20 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_comment_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/CacheUtil.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import android.os.Environment; 4 | 5 | import java.io.File; 6 | import java.util.Random; 7 | 8 | /** 9 | * Created by zhaokaiqiang on 15/4/22. 10 | */ 11 | public class CacheUtil { 12 | 13 | public static final String FILE_SAVE = "JianDan"; 14 | 15 | /** 16 | * 获取保存图片的名称 17 | * @param cacheFile 18 | * @param urls 19 | * @return 20 | */ 21 | public static String getSharePicName(File cacheFile, String[] urls) { 22 | return cacheFile.getAbsolutePath() + new Random().nextInt(100000) + "." + urls[urls 23 | .length - 1]; 24 | } 25 | 26 | 27 | /** 28 | * 获取图片保存文件夹路径 29 | * 30 | * @return 31 | */ 32 | public static String getSaveDirPath() { 33 | return Environment 34 | .getExternalStorageDirectory().getAbsolutePath() + File.separator + FILE_SAVE; 35 | } 36 | 37 | 38 | /** 39 | * 获取新的图片保存名称 40 | * 41 | * @param cacheFile 42 | * @param urls 43 | * @return 44 | */ 45 | public static String getSavePicName(File cacheFile, String[] urls) { 46 | return "jiandan_" + cacheFile.getName().substring(0, 8) + "." + 47 | urls[urls.length - 1]; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_commentotar_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 19 | 20 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_indeterminate_horizontal_holo.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 11 | 14 | 17 | 20 | 23 | 26 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/base/ConstantString.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.base; 2 | 3 | public interface ConstantString { 4 | 5 | String COMMENT_FAILED = "神秘力量导致评论失败 ⊙︿⊙"; 6 | String LOAD_FAILED = "神秘力量导致加载失败 ⊙︿⊙"; 7 | String SAVE_FAILED = "神秘力量导致保存失败 ⊙︿⊙"; 8 | String SHARE_FAILED = "神秘力量导致分享失败 ⊙︿⊙"; 9 | String REPLY_FAILED = "神秘力量导致回复失败 ⊙︿⊙"; 10 | 11 | String INPUT_TOO_SHORT = "你的..太短.."; 12 | String COPY_SUCCESS = "复制成功"; 13 | String SAVE_SUCCESS = "保存成功"; 14 | String REPLY_SUCCESS = "回复成功"; 15 | String SAVE_SMALL_SUCCESS = "保存缩略图成功"; 16 | String LOAD_NO_NETWORK = "无网络,当前为缓存数据"; 17 | String FORBID_COMMENTS = "禁止评论"; 18 | String NO_COMMENTS = "暂无评论"; 19 | 20 | String DATA_FRESH_NEWS = "FreshNews"; 21 | String DATA_POSITION = "position"; 22 | String DATA_THREAD_ID = "thread_id"; 23 | String DATA_THREAD_KEY = "thread_key"; 24 | String DATA_IS_FROM_FRESH_NEWS = "is_from_fresh_news"; 25 | 26 | String DATA_IMAGE_URL = "img_url"; 27 | String DATA_IMAGE_ID = "img_id"; 28 | String DATA_IMAGE_AUTHOR = "img_author"; 29 | String DATA_IS_NEED_WEBVIEW = "is_need_webview"; 30 | 31 | String DATA_IS_SIAMLL_PIC = "isSmallPic"; 32 | String DATA_FILE_PATH = "file_path"; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/NetWorkUtil.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import android.content.Context; 4 | import android.net.ConnectivityManager; 5 | import android.net.NetworkInfo; 6 | 7 | /** 8 | * Created by zhaokaiqiang on 15/4/22. 9 | */ 10 | public class NetWorkUtil { 11 | 12 | /** 13 | * 判断当前网络是否已连接 14 | * 15 | * @param context 16 | * @return 17 | */ 18 | public static boolean isNetWorkConnected(Context context) { 19 | boolean result; 20 | ConnectivityManager cm = (ConnectivityManager) context 21 | .getSystemService(Context.CONNECTIVITY_SERVICE); 22 | NetworkInfo netInfo = cm.getActiveNetworkInfo(); 23 | if (netInfo != null && netInfo.isConnected()) { 24 | result = true; 25 | } else { 26 | result = false; 27 | } 28 | return result; 29 | } 30 | 31 | 32 | /** 33 | * 判断当前的网络连接方式是否为WIFI 34 | * 35 | * @param context 36 | * @return 37 | */ 38 | public static boolean isWifiConnected(Context context) { 39 | ConnectivityManager connectivityManager = (ConnectivityManager) context 40 | .getSystemService(Context.CONNECTIVITY_SERVICE); 41 | NetworkInfo wifiNetworkInfo = connectivityManager 42 | .getNetworkInfo(ConnectivityManager.TYPE_WIFI); 43 | if (wifiNetworkInfo.isConnected()) { 44 | return true; 45 | } 46 | return false; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/base/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.base; 2 | 3 | import android.os.Bundle; 4 | import android.support.v4.app.Fragment; 5 | 6 | import com.loopj.android.http.RequestHandle; 7 | import com.socks.jiandan.BuildConfig; 8 | import com.socks.jiandan.async.HttpClientProxy; 9 | import com.socks.jiandan.utils.logger.LogLevel; 10 | import com.socks.jiandan.utils.logger.Logger; 11 | import com.socks.jiandan.view.imageloader.ImageLoadProxy; 12 | 13 | 14 | public class BaseFragment extends Fragment implements ConstantString { 15 | 16 | @Override 17 | public void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | if (BuildConfig.DEBUG) { 20 | Logger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo(); 21 | } else { 22 | Logger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo(); 23 | } 24 | 25 | } 26 | 27 | @Override 28 | public void onDestroy() { 29 | super.onDestroy(); 30 | JDApplication.getRefWatcher(getActivity()).watch(this); 31 | ImageLoadProxy.getImageLoader().clearMemoryCache(); 32 | } 33 | 34 | protected void cancelRequest(RequestHandle... requestHandle) { 35 | HttpClientProxy.cancelRequest(requestHandle); 36 | } 37 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/view/FadeInAnimator.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.view; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | 5 | import java.util.ArrayList; 6 | 7 | /** 8 | * Created by zhaokaiqiang on 15/4/24. 9 | */ 10 | public class FadeInAnimator extends RecyclerView.ItemAnimator{ 11 | 12 | private ArrayList viewHolders; 13 | 14 | public FadeInAnimator(){ 15 | viewHolders = new ArrayList<>(); 16 | } 17 | 18 | 19 | @Override 20 | public void runPendingAnimations() { 21 | 22 | } 23 | 24 | @Override 25 | public boolean animateRemove(RecyclerView.ViewHolder holder) { 26 | return false; 27 | } 28 | 29 | @Override 30 | public boolean animateAdd(RecyclerView.ViewHolder holder) { 31 | 32 | return false; 33 | } 34 | 35 | @Override 36 | public boolean animateMove(RecyclerView.ViewHolder holder, int fromX, int fromY, int toX, int toY) { 37 | return false; 38 | } 39 | 40 | @Override 41 | public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.ViewHolder newHolder, int fromLeft, int fromTop, int toLeft, int toTop) { 42 | return false; 43 | } 44 | 45 | @Override 46 | public void endAnimation(RecyclerView.ViewHolder item) { 47 | 48 | } 49 | 50 | @Override 51 | public void endAnimations() { 52 | 53 | } 54 | 55 | @Override 56 | public boolean isRunning() { 57 | return false; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java-gen/com/socks/greendao/JokeCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.greendao; 2 | 3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 4 | /** 5 | * Entity mapped to table JOKE_CACHE. 6 | */ 7 | public class JokeCache { 8 | 9 | private Long id; 10 | private String result; 11 | private Integer page; 12 | private Long time; 13 | 14 | public JokeCache() { 15 | } 16 | 17 | public JokeCache(Long id) { 18 | this.id = id; 19 | } 20 | 21 | public JokeCache(Long id, String result, Integer page, Long time) { 22 | this.id = id; 23 | this.result = result; 24 | this.page = page; 25 | this.time = time; 26 | } 27 | 28 | public Long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getResult() { 37 | return result; 38 | } 39 | 40 | public void setResult(String result) { 41 | this.result = result; 42 | } 43 | 44 | public Integer getPage() { 45 | return page; 46 | } 47 | 48 | public void setPage(Integer page) { 49 | this.page = page; 50 | } 51 | 52 | public Long getTime() { 53 | return time; 54 | } 55 | 56 | public void setTime(Long time) { 57 | this.time = time; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/async/Handler4FreshNews.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.async; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import com.socks.jiandan.callback.OnHttpResponseCallBackImpl; 6 | import com.socks.jiandan.model.FreshNews; 7 | 8 | import org.json.JSONArray; 9 | import org.json.JSONException; 10 | import org.json.JSONObject; 11 | 12 | import java.util.ArrayList; 13 | 14 | /** 15 | * Created by zhaokaiqiang on 15/11/10. 16 | */ 17 | public class Handler4FreshNews extends BaseJsonResponseHandler { 18 | 19 | public Handler4FreshNews(@NonNull OnHttpResponseCallBackImpl> onHttpResponseCallBack) { 20 | super(onHttpResponseCallBack); 21 | } 22 | 23 | @Override 24 | protected void onSuccess(int statusCode, String rawJsonResponse) { 25 | 26 | try { 27 | JSONObject resultObj = new JSONObject(rawJsonResponse); 28 | JSONArray postsArray = resultObj.optJSONArray("posts"); 29 | mHttpResponseCallBack.onSuccess(SUCCESS, FreshNews.parse(postsArray)); 30 | } catch (JSONException e) { 31 | e.printStackTrace(); 32 | onFailure(FAILED_JSON_PARSE, e); 33 | } 34 | 35 | } 36 | 37 | @Override 38 | protected void onFailure(int statusCode, Throwable throwable) { 39 | mHttpResponseCallBack.onFailure(statusCode, throwable); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java-gen/com/socks/greendao/VideoCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.greendao; 2 | 3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 4 | /** 5 | * Entity mapped to table VIDEO_CACHE. 6 | */ 7 | public class VideoCache { 8 | 9 | private Long id; 10 | private String result; 11 | private Integer page; 12 | private Long time; 13 | 14 | public VideoCache() { 15 | } 16 | 17 | public VideoCache(Long id) { 18 | this.id = id; 19 | } 20 | 21 | public VideoCache(Long id, String result, Integer page, Long time) { 22 | this.id = id; 23 | this.result = result; 24 | this.page = page; 25 | this.time = time; 26 | } 27 | 28 | public Long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getResult() { 37 | return result; 38 | } 39 | 40 | public void setResult(String result) { 41 | this.result = result; 42 | } 43 | 44 | public Integer getPage() { 45 | return page; 46 | } 47 | 48 | public void setPage(Integer page) { 49 | this.page = page; 50 | } 51 | 52 | public Long getTime() { 53 | return time; 54 | } 55 | 56 | public void setTime(Long time) { 57 | this.time = time; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java-gen/com/socks/greendao/SisterCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.greendao; 2 | 3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 4 | /** 5 | * Entity mapped to table SISTER_CACHE. 6 | */ 7 | public class SisterCache { 8 | 9 | private Long id; 10 | private String result; 11 | private Integer page; 12 | private Long time; 13 | 14 | public SisterCache() { 15 | } 16 | 17 | public SisterCache(Long id) { 18 | this.id = id; 19 | } 20 | 21 | public SisterCache(Long id, String result, Integer page, Long time) { 22 | this.id = id; 23 | this.result = result; 24 | this.page = page; 25 | this.time = time; 26 | } 27 | 28 | public Long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getResult() { 37 | return result; 38 | } 39 | 40 | public void setResult(String result) { 41 | this.result = result; 42 | } 43 | 44 | public Integer getPage() { 45 | return page; 46 | } 47 | 48 | public void setPage(Integer page) { 49 | this.page = page; 50 | } 51 | 52 | public Long getTime() { 53 | return time; 54 | } 55 | 56 | public void setTime(Long time) { 57 | this.time = time; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java-gen/com/socks/greendao/PictureCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.greendao; 2 | 3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 4 | /** 5 | * Entity mapped to table PICTURE_CACHE. 6 | */ 7 | public class PictureCache { 8 | 9 | private Long id; 10 | private String result; 11 | private Integer page; 12 | private Long time; 13 | 14 | public PictureCache() { 15 | } 16 | 17 | public PictureCache(Long id) { 18 | this.id = id; 19 | } 20 | 21 | public PictureCache(Long id, String result, Integer page, Long time) { 22 | this.id = id; 23 | this.result = result; 24 | this.page = page; 25 | this.time = time; 26 | } 27 | 28 | public Long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getResult() { 37 | return result; 38 | } 39 | 40 | public void setResult(String result) { 41 | this.result = result; 42 | } 43 | 44 | public Integer getPage() { 45 | return page; 46 | } 47 | 48 | public void setPage(Integer page) { 49 | this.page = page; 50 | } 51 | 52 | public Long getTime() { 53 | return time; 54 | } 55 | 56 | public void setTime(Long time) { 57 | this.time = time; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java-gen/com/socks/greendao/FreshNewsCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.greendao; 2 | 3 | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 4 | /** 5 | * Entity mapped to table FRESH_NEWS_CACHE. 6 | */ 7 | public class FreshNewsCache { 8 | 9 | private Long id; 10 | private String result; 11 | private Integer page; 12 | private Long time; 13 | 14 | public FreshNewsCache() { 15 | } 16 | 17 | public FreshNewsCache(Long id) { 18 | this.id = id; 19 | } 20 | 21 | public FreshNewsCache(Long id, String result, Integer page, Long time) { 22 | this.id = id; 23 | this.result = result; 24 | this.page = page; 25 | this.time = time; 26 | } 27 | 28 | public Long getId() { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | public String getResult() { 37 | return result; 38 | } 39 | 40 | public void setResult(String result) { 41 | this.result = result; 42 | } 43 | 44 | public Integer getPage() { 45 | return page; 46 | } 47 | 48 | public void setPage(Integer page) { 49 | this.page = page; 50 | } 51 | 52 | public Long getTime() { 53 | return time; 54 | } 55 | 56 | public void setTime(Long time) { 57 | this.time = time; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.0" 6 | 7 | defaultConfig { 8 | applicationId "com.socks.jiandan" 9 | minSdkVersion 14 10 | targetSdkVersion 22 11 | versionCode 2 12 | versionName "1.2" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | 21 | lintOptions { 22 | abortOnError false 23 | } 24 | 25 | sourceSets { 26 | main { 27 | java.srcDirs = ['src/main/java', 'src/main/java-gen'] 28 | } 29 | } 30 | } 31 | 32 | dependencies { 33 | compile fileTree(dir: 'libs', include: ['*.jar']) 34 | compile 'com.android.support:appcompat-v7:22.2.0' 35 | compile 'com.android.support:cardview-v7:22.2.0' 36 | compile 'com.android.support:recyclerview-v7:22.2.0' 37 | compile 'com.afollestad:material-dialogs:0.7.3.1' 38 | compile 'de.greenrobot:eventbus:2.4.0' 39 | compile 'com.victor:lib:1.0.1' 40 | compile 'com.mcxiaoke.volley:library:1.0.+' 41 | compile 'com.loopj.android:android-async-http:1.4.9' 42 | 43 | debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1' 44 | releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/net/RequestManager.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.net; 2 | 3 | import com.android.volley.DefaultRetryPolicy; 4 | import com.android.volley.Request; 5 | import com.android.volley.RequestQueue; 6 | import com.android.volley.toolbox.Volley; 7 | import com.socks.jiandan.BuildConfig; 8 | import com.socks.jiandan.base.JDApplication; 9 | import com.socks.jiandan.utils.logger.Logger; 10 | 11 | /** 12 | * 原Volley模块全部转移到{@link com.socks.jiandan.async.HttpClientProxy}中实现 13 | */ 14 | @Deprecated 15 | public class RequestManager { 16 | 17 | public static final int OUT_TIME = 10000; 18 | public static final int TIMES_OF_RETRY = 1; 19 | 20 | public static RequestQueue mRequestQueue = Volley.newRequestQueue(JDApplication.getContext()); 21 | 22 | private RequestManager() { 23 | } 24 | 25 | public static void addRequest(Request request, Object tag) { 26 | if (tag != null) { 27 | request.setTag(tag); 28 | } 29 | //给每个请求重设超时、重试次数 30 | request.setRetryPolicy(new DefaultRetryPolicy( 31 | OUT_TIME, 32 | TIMES_OF_RETRY, 33 | DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); 34 | 35 | mRequestQueue.add(request); 36 | 37 | if (BuildConfig.DEBUG) { 38 | Logger.d(request.getUrl()); 39 | } 40 | 41 | } 42 | 43 | public static void cancelAll(Object tag) { 44 | mRequestQueue.cancelAll(tag); 45 | } 46 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/ui/SettingActivity.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.ui; 2 | 3 | import android.graphics.Color; 4 | import android.os.Bundle; 5 | import android.support.v7.widget.Toolbar; 6 | import android.view.MenuItem; 7 | 8 | import com.socks.jiandan.R; 9 | import com.socks.jiandan.base.BaseActivity; 10 | 11 | import butterknife.ButterKnife; 12 | import butterknife.InjectView; 13 | 14 | public class SettingActivity extends BaseActivity { 15 | 16 | @InjectView(R.id.toolbar) 17 | Toolbar mToolbar; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_setting); 23 | initView(); 24 | } 25 | 26 | @Override 27 | protected void initView() { 28 | ButterKnife.inject(this); 29 | mToolbar.setTitleTextColor(Color.WHITE); 30 | setSupportActionBar(mToolbar); 31 | mToolbar.setTitle(R.string.title_activity_setting); 32 | mToolbar.setNavigationIcon(R.drawable.ic_actionbar_back); 33 | } 34 | 35 | @Override 36 | protected void initData() { 37 | } 38 | 39 | @Override 40 | public boolean onOptionsItemSelected(MenuItem item) { 41 | 42 | switch (item.getItemId()) { 43 | case android.R.id.home: 44 | finish(); 45 | return true; 46 | } 47 | 48 | return super.onOptionsItemSelected(item); 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /GreenDaoGenerator/src/main/java/com/socks/MyDaoGenerator.java: -------------------------------------------------------------------------------- 1 | package com.socks; 2 | 3 | /** 4 | * Created by zhaokaiqiang on 15/5/11. 5 | */ 6 | 7 | import de.greenrobot.daogenerator.DaoGenerator; 8 | import de.greenrobot.daogenerator.Entity; 9 | import de.greenrobot.daogenerator.Schema; 10 | 11 | /** 12 | * 用来为GreenDao框架生成Dao文件 13 | */ 14 | public class MyDaoGenerator { 15 | 16 | //辅助文件生成的相对路径 17 | public static final String DAO_PATH = "../app/src/main/java-gen"; 18 | //辅助文件的包名 19 | public static final String PACKAGE_NAME = "com.socks.greendao"; 20 | //数据库的版本号 21 | public static final int DATA_VERSION_CODE = 1; 22 | 23 | public static void main(String[] args) throws Exception { 24 | 25 | Schema schema = new Schema(DATA_VERSION_CODE, PACKAGE_NAME); 26 | addCache(schema, "JokeCache"); 27 | addCache(schema, "FreshNewsCache"); 28 | addCache(schema, "PictureCache"); 29 | addCache(schema, "SisterCache"); 30 | addCache(schema, "VideoCache"); 31 | //生成Dao文件路径 32 | new DaoGenerator().generateAll(schema, DAO_PATH); 33 | 34 | } 35 | 36 | /** 37 | * 添加不同的缓存表 38 | * @param schema 39 | * @param tableName 40 | */ 41 | private static void addCache(Schema schema, String tableName) { 42 | 43 | Entity joke = schema.addEntity(tableName); 44 | 45 | //主键id自增长 46 | joke.addIdProperty().primaryKey().autoincrement(); 47 | //请求结果 48 | joke.addStringProperty("result"); 49 | //页数 50 | joke.addIntProperty("page"); 51 | //插入时间,暂时无用 52 | joke.addLongProperty("time"); 53 | 54 | } 55 | 56 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/async/Handler4FreshNewsDetail.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.async; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import com.socks.jiandan.callback.OnHttpResponseCallBackImpl; 6 | 7 | import org.json.JSONException; 8 | import org.json.JSONObject; 9 | 10 | /** 11 | * Created by zhaokaiqiang on 15/11/10. 12 | */ 13 | public class Handler4FreshNewsDetail extends BaseJsonResponseHandler { 14 | 15 | public Handler4FreshNewsDetail(@NonNull OnHttpResponseCallBackImpl onHttpResponseCallBack) { 16 | super(onHttpResponseCallBack); 17 | } 18 | 19 | @Override 20 | protected void onSuccess(int statusCode, String rawJsonResponse) { 21 | 22 | try { 23 | JSONObject jsonObject = new JSONObject(rawJsonResponse); 24 | 25 | if (jsonObject.opt("status").equals("ok")) { 26 | JSONObject contentObject = jsonObject.optJSONObject("post"); 27 | mHttpResponseCallBack.onSuccess(SUCCESS, contentObject.optString("content")); 28 | } else { 29 | mHttpResponseCallBack.onFailure(FAILED_GET_DATA, getNetWorkException(MESSAGE_GET_DATA)); 30 | } 31 | } catch (JSONException e) { 32 | e.printStackTrace(); 33 | mHttpResponseCallBack.onFailure(FAILED_GET_DATA, e); 34 | } 35 | } 36 | 37 | @Override 38 | protected void onFailure(int statusCode, Throwable throwable) { 39 | mHttpResponseCallBack.onFailure(statusCode, throwable); 40 | } 41 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/CommentNumber.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | public class CommentNumber { 4 | 5 | //用于获取评论数量 6 | public static final String URL_COMMENT_COUNTS = "http://jandan.duoshuo.com/api/threads/counts.json?threads="; 7 | public static final String COMMENTS = "comments"; 8 | 9 | public static final String THREAD_ID = "thread_id"; 10 | public static final String THREAD_KEY = "thread_key"; 11 | 12 | private int comments; 13 | private String thread_id; 14 | private String thread_key; 15 | 16 | public CommentNumber() { 17 | } 18 | 19 | public CommentNumber(String thread_id, String thread_key, int comments) { 20 | this.thread_id = thread_id; 21 | this.thread_key = thread_key; 22 | this.comments = comments; 23 | } 24 | 25 | public String getThread_id() { 26 | return thread_id; 27 | } 28 | 29 | public void setThread_id(String thread_id) { 30 | this.thread_id = thread_id; 31 | } 32 | 33 | public String getThread_key() { 34 | return thread_key; 35 | } 36 | 37 | public void setThread_key(String thread_key) { 38 | this.thread_key = thread_key; 39 | } 40 | 41 | 42 | public static String getCommentCountsURL(String params) { 43 | return URL_COMMENT_COUNTS + params; 44 | } 45 | 46 | public int getComments() { 47 | return comments; 48 | } 49 | 50 | public void setComments(int comments) { 51 | this.comments = comments; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/EditTextShakeHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 青岛司通科技有限公司 All rights reserved. 3 | * File Name:EditTextShakeHelper.java 4 | * Version:V1.0 5 | * Author:zhaokaiqiang 6 | * Date:2014-11-21 7 | */ 8 | 9 | package com.socks.jiandan.utils; 10 | 11 | import android.app.Service; 12 | import android.content.Context; 13 | import android.os.Vibrator; 14 | import android.view.animation.Animation; 15 | import android.view.animation.CycleInterpolator; 16 | import android.view.animation.TranslateAnimation; 17 | import android.widget.EditText; 18 | 19 | public class EditTextShakeHelper { 20 | 21 | // 震动动画 22 | private Animation shakeAnimation; 23 | // 插值器 24 | private CycleInterpolator cycleInterpolator; 25 | // 振动器 26 | private Vibrator shakeVibrator; 27 | 28 | public EditTextShakeHelper(Context context) { 29 | 30 | // 初始化振动器 31 | shakeVibrator = (Vibrator) context 32 | .getSystemService(Service.VIBRATOR_SERVICE); 33 | // 初始化震动动画 34 | shakeAnimation = new TranslateAnimation(0, 10, 0, 0); 35 | shakeAnimation.setDuration(300); 36 | cycleInterpolator = new CycleInterpolator(8); 37 | shakeAnimation.setInterpolator(cycleInterpolator); 38 | 39 | } 40 | 41 | public void shake(EditText... editTexts) { 42 | for (EditText editText : editTexts) { 43 | editText.startAnimation(shakeAnimation); 44 | } 45 | 46 | shakeVibrator.vibrate(new long[]{0, 500}, -1); 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/async/Handler4Joke.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.async; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import com.google.gson.reflect.TypeToken; 6 | import com.socks.jiandan.callback.OnHttpResponseCallBackImpl; 7 | import com.socks.jiandan.model.Joke; 8 | import com.socks.jiandan.utils.JSONParser; 9 | 10 | import org.json.JSONException; 11 | import org.json.JSONObject; 12 | 13 | import java.util.ArrayList; 14 | 15 | /** 16 | * Created by zhaokaiqiang on 15/11/10. 17 | */ 18 | public class Handler4Joke extends BaseJsonResponseHandler { 19 | 20 | public Handler4Joke(@NonNull OnHttpResponseCallBackImpl> onHttpResponseCallBack) { 21 | super(onHttpResponseCallBack); 22 | } 23 | 24 | @Override 25 | protected void onSuccess(int statusCode, String rawJsonResponse) { 26 | 27 | try { 28 | String jsonStr = new JSONObject(rawJsonResponse).getJSONArray("comments").toString(); 29 | 30 | ArrayList jokes = (ArrayList) JSONParser.toObject(jsonStr, 31 | new TypeToken>() { 32 | }.getType()); 33 | mHttpResponseCallBack.onSuccess(SUCCESS, jokes); 34 | } catch (JSONException e) { 35 | e.printStackTrace(); 36 | onFailure(FAILED_JSON_PARSE, e); 37 | } 38 | } 39 | 40 | @Override 41 | protected void onFailure(int statusCode, Throwable throwable) { 42 | mHttpResponseCallBack.onFailure(statusCode, throwable); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/Vote.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | public class Vote { 4 | 5 | public static final String URL_VOTE = "http://jandan.net/index" + 6 | ".php?acv_ajax=true&option=%s&ID=%s"; 7 | 8 | public static final String XX = "0"; 9 | public static final String OO = "1"; 10 | 11 | public static final String RESULT_XX_SUCCESS = "-1"; 12 | public static final String RESULT_OO_SUCCESS = "1"; 13 | public static final String RESULT_HAVE_VOTED = "0"; 14 | 15 | private String result; 16 | private String message; 17 | 18 | public Vote() { 19 | } 20 | 21 | public Vote(String result, String message) { 22 | this.result = result; 23 | this.message = message; 24 | } 25 | 26 | public static String getXXUrl(String id) { 27 | return String.format(URL_VOTE, XX, id); 28 | } 29 | 30 | public static String getOOUrl(String id) { 31 | return String.format(URL_VOTE, OO, id); 32 | } 33 | 34 | public static Vote getInstance(String response) { 35 | String[] results = response.split("\\|"); 36 | return new Vote(results[2], results[1]); 37 | } 38 | 39 | public String getResult() { 40 | return result; 41 | } 42 | 43 | public void setResult(String result) { 44 | this.result = result; 45 | } 46 | 47 | public String getMessage() { 48 | return message; 49 | } 50 | 51 | public void setMessage(String message) { 52 | this.message = message; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/async/Handler4Picture.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.async; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import com.google.gson.reflect.TypeToken; 6 | import com.socks.jiandan.callback.OnHttpResponseCallBackImpl; 7 | import com.socks.jiandan.model.Picture; 8 | import com.socks.jiandan.utils.JSONParser; 9 | 10 | import org.json.JSONException; 11 | import org.json.JSONObject; 12 | 13 | import java.util.ArrayList; 14 | 15 | /** 16 | * Created by zhaokaiqiang on 15/11/10. 17 | */ 18 | public class Handler4Picture extends BaseJsonResponseHandler { 19 | 20 | public Handler4Picture(@NonNull OnHttpResponseCallBackImpl> onHttpResponseCallBack) { 21 | super(onHttpResponseCallBack); 22 | } 23 | 24 | @Override 25 | protected void onSuccess(int statusCode, String rawJsonResponse) { 26 | 27 | try { 28 | String jsonStr = new JSONObject(rawJsonResponse).getJSONArray("comments").toString(); 29 | 30 | ArrayList pictures = (ArrayList) JSONParser.toObject(jsonStr, 31 | new TypeToken>() { 32 | }.getType()); 33 | mHttpResponseCallBack.onSuccess(SUCCESS, pictures); 34 | } catch (JSONException e) { 35 | e.printStackTrace(); 36 | onFailure(FAILED_JSON_PARSE, e); 37 | } 38 | } 39 | 40 | @Override 41 | protected void onFailure(int statusCode, Throwable throwable) { 42 | mHttpResponseCallBack.onFailure(statusCode, throwable); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/TextUtil.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import android.app.Activity; 4 | import android.content.ClipData; 5 | import android.content.ClipboardManager; 6 | import android.content.Context; 7 | 8 | import com.socks.jiandan.base.ConstantString; 9 | 10 | import java.util.regex.Matcher; 11 | import java.util.regex.Pattern; 12 | 13 | public class TextUtil { 14 | 15 | public static final String REG_EMAIL = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"; 16 | 17 | 18 | public static boolean isEmail(String email) { 19 | Pattern p = Pattern.compile(REG_EMAIL); 20 | Matcher m = p.matcher(email); 21 | return m.matches(); 22 | } 23 | 24 | 25 | /** 26 | * 判断是否为null、空字符串或者是"null" 27 | * 28 | * @param str 29 | * @return 30 | */ 31 | public static boolean isNull(CharSequence... str) { 32 | 33 | for (CharSequence cha : str) { 34 | if (cha == null || cha.length() == 0 || cha.equals("null")) { 35 | return true; 36 | } else { 37 | return false; 38 | } 39 | } 40 | 41 | return true; 42 | } 43 | 44 | public static void copy(Activity activity, String copyText) { 45 | ClipboardManager clip = (ClipboardManager) 46 | activity.getSystemService(Context 47 | .CLIPBOARD_SERVICE); 48 | clip.setPrimaryClip(ClipData.newPlainText 49 | (null, copyText)); 50 | ShowToast.Short(ConstantString.COPY_SUCCESS); 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/MenuItem.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | import android.support.v4.app.Fragment; 4 | 5 | public class MenuItem { 6 | 7 | public enum FragmentType { 8 | FreshNews, BoringPicture, Sister, Joke, Video 9 | } 10 | 11 | private String title; 12 | private int resourceId; 13 | private FragmentType type; 14 | private Class fragment; 15 | 16 | public String getTitle() { 17 | return title; 18 | } 19 | 20 | public void setTitle(String title) { 21 | this.title = title; 22 | } 23 | 24 | public int getResourceId() { 25 | return resourceId; 26 | } 27 | 28 | public Class getFragment() { 29 | return fragment; 30 | } 31 | 32 | public void setFragment(Class fragment) { 33 | this.fragment = fragment; 34 | } 35 | 36 | 37 | public FragmentType getType() { 38 | return type; 39 | } 40 | 41 | public void setType(FragmentType type) { 42 | this.type = type; 43 | } 44 | 45 | public MenuItem() { 46 | } 47 | 48 | public MenuItem(String title, int resourceId, Class fragment) { 49 | this.resourceId = resourceId; 50 | this.title = title; 51 | this.fragment = fragment; 52 | } 53 | 54 | public MenuItem(String title, int resourceId, FragmentType type, Class fragment) { 55 | this.title = title; 56 | this.resourceId = resourceId; 57 | this.type = type; 58 | this.fragment = fragment; 59 | } 60 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/String2TimeUtil.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | import java.util.TimeZone; 6 | 7 | /** 8 | * 用于将String转化为时间 9 | * Created by zhaokaiqiang on 15/4/9. 10 | */ 11 | public class String2TimeUtil { 12 | 13 | /** 14 | * 转换日期格式到用户体验好的时间格式 15 | * @param time 2015-04-11 12:45:06 16 | * @return 17 | */ 18 | public static String dateString2GoodExperienceFormat(String time) { 19 | if (isNullString(time)) { 20 | return ""; 21 | } else { 22 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 23 | simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT+08")); 24 | try { 25 | String timeString; 26 | Date parse = simpleDateFormat.parse(time); 27 | long distanceTime = new Date().getTime() - parse.getTime(); 28 | if (distanceTime < 0L) { 29 | timeString = "0 mins ago"; 30 | } else { 31 | long n2 = distanceTime / 60000L; 32 | new SimpleDateFormat("HH:mm"); 33 | SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("MM-dd"); 34 | if (n2 < 60L) { 35 | timeString = String.valueOf(n2) + " mins ago"; 36 | } else if (n2 < 720L) { 37 | timeString = String.valueOf(n2 / 60L) + " hours ago"; 38 | } else { 39 | timeString = simpleDateFormat2.format(parse); 40 | } 41 | } 42 | return timeString; 43 | } catch (Exception ex) { 44 | ex.printStackTrace(); 45 | return ""; 46 | } 47 | } 48 | } 49 | 50 | public static boolean isNullString(String s) { 51 | return s == null || s.equals("") || s.equals("null"); 52 | } 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/net/Request4FreshNews.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.net; 2 | 3 | import com.android.volley.NetworkResponse; 4 | import com.android.volley.ParseError; 5 | import com.android.volley.Request; 6 | import com.android.volley.Response; 7 | import com.android.volley.toolbox.HttpHeaderParser; 8 | import com.socks.jiandan.model.FreshNews; 9 | 10 | import org.json.JSONArray; 11 | import org.json.JSONObject; 12 | 13 | import java.util.ArrayList; 14 | 15 | /** 16 | * 新鲜事 17 | * Created by zhaokaiqiang on 15/4/8. 18 | */ 19 | @Deprecated 20 | public class Request4FreshNews extends Request> { 21 | 22 | private Response.Listener> listener; 23 | 24 | public Request4FreshNews(String url, Response.Listener> listener, 25 | Response.ErrorListener errorListener) { 26 | super(Method.GET, url, errorListener); 27 | this.listener = listener; 28 | } 29 | 30 | @Override 31 | protected Response> parseNetworkResponse(NetworkResponse response) { 32 | 33 | try { 34 | String resultStr = new String(response.data, HttpHeaderParser.parseCharset(response.headers)); 35 | JSONObject resultObj = new JSONObject(resultStr); 36 | JSONArray postsArray = resultObj.optJSONArray("posts"); 37 | return Response.success(FreshNews.parse(postsArray), HttpHeaderParser.parseCacheHeaders(response)); 38 | } catch (Exception e) { 39 | e.printStackTrace(); 40 | return Response.error(new ParseError(e)); 41 | } 42 | } 43 | 44 | @Override 45 | protected void deliverResponse(ArrayList response) { 46 | listener.onResponse(response); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/JDMediaScannerConnectionClient.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import android.media.MediaScannerConnection; 4 | import android.net.Uri; 5 | import android.os.Looper; 6 | 7 | import com.socks.jiandan.base.ConstantString; 8 | 9 | import java.io.File; 10 | 11 | /** 12 | * 用于保存图片后刷新图片媒体库 13 | */ 14 | public class JDMediaScannerConnectionClient implements MediaScannerConnection 15 | .MediaScannerConnectionClient { 16 | 17 | private boolean isSmallPic; 18 | private File newFile; 19 | private MediaScannerConnection mediaScannerConnection; 20 | 21 | public JDMediaScannerConnectionClient(boolean isSmallPic, File newFile) { 22 | this.isSmallPic = isSmallPic; 23 | this.newFile = newFile; 24 | } 25 | 26 | public void setMediaScannerConnection(MediaScannerConnection mediaScannerConnection) { 27 | this.mediaScannerConnection = mediaScannerConnection; 28 | } 29 | 30 | @Override 31 | public void onMediaScannerConnected() { 32 | mediaScannerConnection.scanFile(newFile.getAbsolutePath(),null); 33 | } 34 | 35 | @Override 36 | public void onScanCompleted(String path, Uri uri) { 37 | Looper.prepare(); 38 | if (isSmallPic) { 39 | ShowToast.Short(ConstantString.SAVE_SMALL_SUCCESS + " \n相册" + File.separator + CacheUtil 40 | .FILE_SAVE + File.separator + newFile.getName()); 41 | } else { 42 | ShowToast.Short(ConstantString.SAVE_SUCCESS + " \n相册" + File.separator + CacheUtil 43 | .FILE_SAVE + File.separator + newFile.getName()); 44 | } 45 | Looper.loop(); 46 | } 47 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/ActivityManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 青岛司通科技有限公司 All rights reserved. 3 | * File Name:AppManager.java 4 | * Version:V1.0 5 | * Author:zhaokaiqiang 6 | * Date:2014-8-6 7 | */ 8 | package com.socks.jiandan.utils; 9 | 10 | import android.app.Activity; 11 | 12 | import java.util.Stack; 13 | 14 | /** 15 | * @author zhaokaiqiang 16 | * 应用程序Activity管理类:用于Activity管理和应用程序退出 17 | * @date 2014-8-6 下午6:04:25 18 | */ 19 | public class ActivityManager { 20 | 21 | private static Stack activityStack; 22 | private static ActivityManager instance; 23 | 24 | private ActivityManager() {} 25 | 26 | public static ActivityManager getAppManager() { 27 | if (instance == null) { 28 | instance = new ActivityManager(); 29 | } 30 | return instance; 31 | } 32 | 33 | public void addActivity(Activity activity) { 34 | if (activityStack == null) { 35 | activityStack = new Stack<>(); 36 | } 37 | activityStack.add(activity); 38 | } 39 | 40 | public void finishActivity(Activity activity) { 41 | if (activity != null) { 42 | activityStack.remove(activity); 43 | activity = null; 44 | } 45 | } 46 | 47 | public void finishAllActivityAndExit() { 48 | if (null != activityStack) { 49 | for (int i = 0, size = activityStack.size(); i < size; i++) { 50 | if (null != activityStack.get(i)) { 51 | activityStack.get(i).finish(); 52 | } 53 | } 54 | activityStack.clear(); 55 | System.exit(0); 56 | } 57 | } 58 | 59 | } -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/net/Request4Joke.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.net; 2 | 3 | import com.android.volley.NetworkResponse; 4 | import com.android.volley.ParseError; 5 | import com.android.volley.Request; 6 | import com.android.volley.Response; 7 | import com.android.volley.toolbox.HttpHeaderParser; 8 | import com.google.gson.reflect.TypeToken; 9 | import com.socks.jiandan.model.Joke; 10 | import com.socks.jiandan.utils.JSONParser; 11 | 12 | import org.json.JSONObject; 13 | 14 | import java.util.ArrayList; 15 | 16 | /** 17 | * 段子数据请求器 18 | */ 19 | @Deprecated 20 | public class Request4Joke extends Request> { 21 | 22 | private Response.Listener> mListener; 23 | 24 | public Request4Joke(String url, Response.Listener> listener, 25 | Response.ErrorListener errorListener) { 26 | super(Method.GET, url, errorListener); 27 | this.mListener = listener; 28 | } 29 | 30 | @Override 31 | protected Response> parseNetworkResponse(NetworkResponse response) { 32 | 33 | try { 34 | String jsonStr = new String(response.data, HttpHeaderParser.parseCharset(response.headers)); 35 | jsonStr = new JSONObject(jsonStr).getJSONArray("comments").toString(); 36 | 37 | return Response.success((ArrayList) JSONParser.toObject(jsonStr, 38 | new TypeToken>() { 39 | }.getType()), HttpHeaderParser.parseCacheHeaders(response)); 40 | 41 | } catch (Exception e) { 42 | e.printStackTrace(); 43 | return Response.error(new ParseError(e)); 44 | } 45 | } 46 | 47 | @Override 48 | protected void deliverResponse(ArrayList response) { 49 | mListener.onResponse(response); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/utils/JSONParser.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.utils; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.JsonSyntaxException; 5 | 6 | import java.lang.reflect.Type; 7 | 8 | public class JSONParser { 9 | 10 | private static Gson gson = new Gson(); 11 | 12 | public static String toString(Object obj) { 13 | return gson.toJson(obj); 14 | } 15 | 16 | /** 17 | * @param type 类型反射(Class)或反射令牌(TypeToken) 18 | * @return Object 19 | * @throws 20 | * @Description: 将标准JSON字符串反序列化为对象 21 | */ 22 | public static Object toObject(String jsonString, Object type) { 23 | jsonString = jsonString.replace(" ", ""); 24 | jsonString = jsonString.replace("﹠nbsp", ""); 25 | jsonString = jsonString.replace("nbsp", ""); 26 | jsonString = jsonString.replace("&", ""); 27 | jsonString = jsonString.replace("&", ""); 28 | jsonString = jsonString.replace("amp", ""); 29 | if (type instanceof Type) { 30 | try { 31 | return gson.fromJson(jsonString, (Type) type); 32 | } catch (JsonSyntaxException e) { 33 | e.printStackTrace(); 34 | return null; 35 | } 36 | } else if (type instanceof Class) { 37 | try { 38 | return gson.fromJson(jsonString, (Class) type); 39 | } catch (JsonSyntaxException e) { 40 | e.printStackTrace(); 41 | return null; 42 | } 43 | } else { 44 | throw new RuntimeException("只能是Class或者通过TypeToken获取的Type类型"); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_push_comment.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 16 | 17 | 23 | 24 | 29 | 30 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/net/Request4FreshNewsDetail.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.net; 2 | 3 | import com.android.volley.NetworkResponse; 4 | import com.android.volley.ParseError; 5 | import com.android.volley.Request; 6 | import com.android.volley.Response; 7 | import com.android.volley.toolbox.HttpHeaderParser; 8 | 9 | import org.json.JSONObject; 10 | 11 | /** 12 | * 段子数据请求器 13 | * Created by zhaokaiqiang on 15/4/8. 14 | */ 15 | @Deprecated 16 | public class Request4FreshNewsDetail extends Request { 17 | 18 | private Response.Listener listener; 19 | 20 | public Request4FreshNewsDetail(String url, Response.Listener listener, 21 | Response.ErrorListener errorListener) { 22 | super(Method.GET, url, errorListener); 23 | this.listener = listener; 24 | } 25 | 26 | @Override 27 | protected Response parseNetworkResponse(NetworkResponse response) { 28 | 29 | try { 30 | String resultStr = new String(response.data, HttpHeaderParser.parseCharset(response 31 | .headers)); 32 | JSONObject jsonObject = new JSONObject(resultStr); 33 | 34 | if (jsonObject.opt("status").equals("ok")) { 35 | JSONObject contentObject = jsonObject.optJSONObject("post"); 36 | return Response.success(contentObject.optString("content"), HttpHeaderParser.parseCacheHeaders 37 | (response)); 38 | } else { 39 | return Response.success("error", HttpHeaderParser.parseCacheHeaders(response)); 40 | } 41 | 42 | } catch (Exception e) { 43 | e.printStackTrace(); 44 | return Response.error(new ParseError(e)); 45 | } 46 | } 47 | 48 | @Override 49 | protected void deliverResponse(String response) { 50 | listener.onResponse(response); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/net/Request4Picture.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.net; 2 | 3 | import com.android.volley.NetworkResponse; 4 | import com.android.volley.ParseError; 5 | import com.android.volley.Request; 6 | import com.android.volley.Response; 7 | import com.android.volley.toolbox.HttpHeaderParser; 8 | import com.google.gson.reflect.TypeToken; 9 | import com.socks.jiandan.model.Picture; 10 | import com.socks.jiandan.utils.JSONParser; 11 | 12 | import org.json.JSONObject; 13 | 14 | import java.util.ArrayList; 15 | 16 | /** 17 | * 无聊图数据请求器 18 | */ 19 | @Deprecated 20 | public class Request4Picture extends Request> { 21 | 22 | private Response.Listener> listener; 23 | 24 | public Request4Picture(String url, Response.Listener> listener, 25 | Response.ErrorListener errorListener) { 26 | super(Method.GET, url, errorListener); 27 | this.listener = listener; 28 | } 29 | 30 | @Override 31 | protected Response> parseNetworkResponse(NetworkResponse response) { 32 | 33 | try { 34 | String jsonStr = new String(response.data, HttpHeaderParser.parseCharset(response.headers)); 35 | jsonStr = new JSONObject(jsonStr).getJSONArray("comments").toString(); 36 | 37 | ArrayList pictures = (ArrayList) JSONParser.toObject(jsonStr, 38 | new TypeToken>() { 39 | }.getType()); 40 | return Response.success(pictures, HttpHeaderParser.parseCacheHeaders(response)); 41 | } catch (Exception e) { 42 | e.printStackTrace(); 43 | return Response.error(new ParseError(e)); 44 | } 45 | } 46 | 47 | @Override 48 | protected void deliverResponse(ArrayList response) { 49 | listener.onResponse(response); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/Author.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | import org.json.JSONObject; 4 | 5 | import java.io.Serializable; 6 | 7 | public class Author implements Serializable { 8 | 9 | public String id; 10 | public String slug; 11 | public String name; 12 | public String first_name; 13 | public String last_name; 14 | public String nickname; 15 | public String url; 16 | public String description; 17 | 18 | public static Author parse(final JSONObject jsonObject) { 19 | Author author; 20 | if (jsonObject == null) { 21 | author = null; 22 | } else { 23 | author = new Author(); 24 | author.id = jsonObject.optString("id"); 25 | author.slug = jsonObject.optString("slug"); 26 | author.name = jsonObject.optString("name"); 27 | author.first_name = jsonObject.optString("first_name"); 28 | author.last_name = jsonObject.optString("last_name"); 29 | author.nickname = jsonObject.optString("nickname"); 30 | author.url = jsonObject.optString("url"); 31 | author.description = jsonObject.optString("description"); 32 | } 33 | return author; 34 | } 35 | 36 | public String getId() { 37 | return id; 38 | } 39 | 40 | public void setId(String id) { 41 | this.id = id; 42 | } 43 | 44 | public String getName() { 45 | return name; 46 | } 47 | 48 | public void setName(String name) { 49 | this.name = name; 50 | } 51 | 52 | public String getUrl() { 53 | return url; 54 | } 55 | 56 | public void setUrl(String url) { 57 | this.url = url; 58 | } 59 | 60 | public String getDescription() { 61 | return description; 62 | } 63 | 64 | public void setDescription(String description) { 65 | this.description = description; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/Tags.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | import org.json.JSONArray; 4 | import org.json.JSONObject; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * 新鲜事中的自定义字段 10 | */ 11 | public class Tags implements Serializable { 12 | 13 | private int id; 14 | private String title; 15 | private String description; 16 | 17 | public static Tags parse(final JSONArray jsonArray) { 18 | Tags tags; 19 | if (jsonArray == null) { 20 | tags = null; 21 | } else { 22 | tags = new Tags(); 23 | JSONObject optJSONObject = jsonArray.optJSONObject(0); 24 | if (optJSONObject != null) { 25 | tags.id = optJSONObject.optInt("id"); 26 | tags.title = optJSONObject.optString("title"); 27 | tags.description = optJSONObject.optString("description"); 28 | } 29 | } 30 | return tags; 31 | } 32 | 33 | public static Tags parseCache(final JSONObject jsonObject) { 34 | Tags tags; 35 | if (jsonObject == null) { 36 | tags = null; 37 | } else { 38 | tags = new Tags(); 39 | tags.id = jsonObject.optInt("id"); 40 | tags.title = jsonObject.optString("title"); 41 | tags.description = jsonObject.optString("description"); 42 | } 43 | return tags; 44 | } 45 | 46 | public int getId() { 47 | return id; 48 | } 49 | 50 | public void setId(int id) { 51 | this.id = id; 52 | } 53 | 54 | public String getTitle() { 55 | return title; 56 | } 57 | 58 | public void setTitle(String title) { 59 | this.title = title; 60 | } 61 | 62 | public String getDescription() { 63 | return description; 64 | } 65 | 66 | public void setDescription(String description) { 67 | this.description = description; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /GreenDaoGenerator/GreenDaoGenerator.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/cache/SisterCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.cache; 2 | 3 | import android.content.Context; 4 | 5 | import com.google.gson.reflect.TypeToken; 6 | import com.socks.greendao.SisterCacheDao; 7 | import com.socks.jiandan.base.JDApplication; 8 | import com.socks.jiandan.model.Picture; 9 | import com.socks.jiandan.utils.JSONParser; 10 | 11 | import java.util.ArrayList; 12 | 13 | import de.greenrobot.dao.query.QueryBuilder; 14 | 15 | public class SisterCache extends BaseCache { 16 | 17 | private static SisterCache instance; 18 | private static SisterCacheDao mPictureCacheDao; 19 | 20 | private SisterCache() { 21 | } 22 | 23 | public static SisterCache getInstance(Context context) { 24 | 25 | if (instance == null) { 26 | 27 | synchronized (SisterCache.class) { 28 | if (instance == null) { 29 | instance = new SisterCache(); 30 | } 31 | } 32 | 33 | mDaoSession = JDApplication.getDaoSession(context); 34 | mPictureCacheDao = mDaoSession.getSisterCacheDao(); 35 | } 36 | return instance; 37 | } 38 | 39 | public void clearAllCache() { 40 | mPictureCacheDao.deleteAll(); 41 | } 42 | 43 | @Override 44 | public ArrayList getCacheByPage(int page) { 45 | 46 | QueryBuilder query = mPictureCacheDao.queryBuilder().where(SisterCacheDao 47 | .Properties.Page.eq(Integer.toString(page))); 48 | 49 | if (query.list().size() > 0) { 50 | return (ArrayList) JSONParser.toObject(query.list().get(0).getResult(), 51 | new TypeToken>() { 52 | }.getType()); 53 | } else { 54 | return new ArrayList<>(); 55 | } 56 | 57 | } 58 | 59 | @Override 60 | public void addResultCache(String result, int page) { 61 | com.socks.greendao.SisterCache pictureCache = new com.socks.greendao.SisterCache(); 62 | pictureCache.setResult(result); 63 | pictureCache.setPage(page); 64 | pictureCache.setTime(System.currentTimeMillis()); 65 | 66 | mPictureCacheDao.insert(pictureCache); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/Joke.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Joke implements Serializable { 6 | 7 | public static final String URL_JOKE = "http://jandan.net/?oxwlxojflwblxbsapi=jandan" + 8 | ".get_duan_comments&page="; 9 | 10 | private String comment_ID; 11 | private String comment_post_ID; 12 | private String comment_author; 13 | private String comment_author_email; 14 | private String comment_author_url; 15 | private String comment_author_IP; 16 | private String comment_date; 17 | private String comment_date_gmt; 18 | private String comment_content; 19 | private String text_content; 20 | private String comment_agent; 21 | private String vote_positive; 22 | private String vote_negative; 23 | //评论数量,需要单独获取 24 | private String comment_counts; 25 | 26 | public Joke() { 27 | } 28 | 29 | public static String getRequestUrl(int page) { 30 | return URL_JOKE + page; 31 | } 32 | 33 | public String getComment_ID() { 34 | return comment_ID; 35 | } 36 | 37 | public String getComment_author() { 38 | return comment_author; 39 | } 40 | 41 | public String getComment_date() { 42 | return comment_date; 43 | } 44 | 45 | public String getComment_content() { 46 | return comment_content; 47 | } 48 | 49 | public String getVote_positive() { 50 | return vote_positive; 51 | } 52 | 53 | public void setVote_positive(String vote_positive) { 54 | this.vote_positive = vote_positive; 55 | } 56 | 57 | public String getVote_negative() { 58 | return vote_negative; 59 | } 60 | 61 | public void setVote_negative(String vote_negative) { 62 | this.vote_negative = vote_negative; 63 | } 64 | 65 | public String getComment_counts() { 66 | return comment_counts; 67 | } 68 | 69 | public void setComment_counts(String comment_counts) { 70 | this.comment_counts = comment_counts; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/async/BaseJsonResponseHandler.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.async; 2 | 3 | import android.accounts.NetworkErrorException; 4 | import android.support.annotation.NonNull; 5 | 6 | import com.loopj.android.http.TextHttpResponseHandler; 7 | import com.socks.jiandan.callback.OnHttpResponseCallBackImpl; 8 | 9 | import cz.msebera.android.httpclient.Header; 10 | 11 | /** 12 | * Created by zhaokaiqiang on 15/11/10. 13 | */ 14 | public abstract class BaseJsonResponseHandler extends TextHttpResponseHandler implements ResponseCode { 15 | 16 | protected OnHttpResponseCallBackImpl mHttpResponseCallBack; 17 | 18 | public BaseJsonResponseHandler(@NonNull OnHttpResponseCallBackImpl onHttpResponseCallBack) { 19 | 20 | if (onHttpResponseCallBack == null) { 21 | throw new IllegalArgumentException("OnHttpResponseCallBack can't be null !"); 22 | } 23 | 24 | mHttpResponseCallBack = onHttpResponseCallBack; 25 | } 26 | 27 | @Override 28 | public void onStart() { 29 | super.onStart(); 30 | mHttpResponseCallBack.onStart(); 31 | } 32 | 33 | @Override 34 | public void onFinish() { 35 | super.onFinish(); 36 | mHttpResponseCallBack.onFinish(); 37 | } 38 | 39 | @Override 40 | public void onCancel() { 41 | super.onCancel(); 42 | mHttpResponseCallBack.onCancel(); 43 | } 44 | 45 | @Override 46 | public void onSuccess(int statusCode, Header[] headers, String responseString) { 47 | onSuccess(statusCode, responseString); 48 | } 49 | 50 | @Override 51 | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { 52 | onFailure(statusCode, throwable); 53 | } 54 | 55 | protected abstract void onSuccess(int statusCode, String rawJsonResponse); 56 | 57 | protected abstract void onFailure(int statusCode, Throwable throwable); 58 | 59 | protected NetworkErrorException getNetWorkException(String reason) { 60 | return new NetworkErrorException(reason); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/model/Picture.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.model; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Picture implements Serializable { 6 | 7 | public static final String URL_BORING_PICTURE = "http://jandan.net/?oxwlxojflwblxbsapi=jandan.get_pic_comments&page="; 8 | public static final String URL_SISTER = "http://jandan.net/?oxwlxojflwblxbsapi=jandan.get_ooxx_comments&page="; 9 | 10 | public enum PictureType { 11 | BoringPicture, Sister 12 | } 13 | 14 | private String comment_ID; 15 | private String comment_author; 16 | private String comment_date; 17 | private String text_content; 18 | private String vote_positive; 19 | private String vote_negative; 20 | private String[] pics; 21 | //评论数量,需要单独获取 22 | private String comment_counts; 23 | 24 | public Picture() { 25 | } 26 | 27 | public static String getRequestUrl(PictureType type, int page) { 28 | 29 | switch (type) { 30 | case BoringPicture: 31 | return URL_BORING_PICTURE + page; 32 | case Sister: 33 | return URL_SISTER + page; 34 | default: 35 | return ""; 36 | } 37 | } 38 | 39 | public String getComment_ID() { 40 | return comment_ID; 41 | } 42 | 43 | public String getComment_author() { 44 | return comment_author; 45 | } 46 | 47 | public String getComment_date() { 48 | return comment_date; 49 | } 50 | 51 | public String getText_content() { 52 | return text_content; 53 | } 54 | 55 | public String getVote_positive() { 56 | return vote_positive; 57 | } 58 | 59 | public String getVote_negative() { 60 | return vote_negative; 61 | } 62 | 63 | public String getComment_counts() { 64 | return comment_counts; 65 | } 66 | 67 | public void setComment_counts(String comment_counts) { 68 | this.comment_counts = comment_counts; 69 | } 70 | 71 | public String[] getPics() { 72 | return pics; 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 17 | 18 | 25 | 26 | 35 | 36 | 37 | 38 | 39 | 46 | 47 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/cache/JokeCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.cache; 2 | 3 | import android.content.Context; 4 | 5 | import com.google.gson.reflect.TypeToken; 6 | import com.socks.greendao.JokeCacheDao; 7 | import com.socks.jiandan.base.JDApplication; 8 | import com.socks.jiandan.model.Joke; 9 | import com.socks.jiandan.utils.JSONParser; 10 | 11 | import java.util.ArrayList; 12 | 13 | import de.greenrobot.dao.query.QueryBuilder; 14 | 15 | public class JokeCache extends BaseCache { 16 | 17 | private static JokeCache instance; 18 | private static JokeCacheDao mJokeCacheDao; 19 | 20 | private JokeCache() { 21 | } 22 | 23 | public static JokeCache getInstance(Context context) { 24 | 25 | if (instance == null) { 26 | 27 | synchronized (JokeCache.class) { 28 | if (instance == null) { 29 | instance = new JokeCache(); 30 | } 31 | } 32 | 33 | mDaoSession = JDApplication.getDaoSession(context); 34 | mJokeCacheDao = mDaoSession.getJokeCacheDao(); 35 | } 36 | return instance; 37 | } 38 | 39 | public void clearAllCache() { 40 | mJokeCacheDao.deleteAll(); 41 | } 42 | 43 | 44 | @Override 45 | public ArrayList getCacheByPage(int page) { 46 | QueryBuilder query = mJokeCacheDao.queryBuilder().where(JokeCacheDao.Properties.Page.eq("" + page)); 47 | 48 | if (query.list().size() > 0) { 49 | return (ArrayList) JSONParser.toObject(query.list().get(0).getResult(), 50 | new TypeToken>() { 51 | }.getType()); 52 | } else { 53 | return new ArrayList<>(); 54 | } 55 | 56 | } 57 | 58 | @Override 59 | public void addResultCache(String result, int page) { 60 | com.socks.greendao.JokeCache jokeCache = new com.socks.greendao.JokeCache(); 61 | jokeCache.setResult(result); 62 | jokeCache.setPage(page); 63 | jokeCache.setTime(System.currentTimeMillis()); 64 | 65 | mJokeCacheDao.insert(jokeCache); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/java/com/socks/jiandan/cache/VideoCache.java: -------------------------------------------------------------------------------- 1 | package com.socks.jiandan.cache; 2 | 3 | import android.content.Context; 4 | 5 | import com.google.gson.reflect.TypeToken; 6 | import com.socks.greendao.VideoCacheDao; 7 | import com.socks.jiandan.base.JDApplication; 8 | import com.socks.jiandan.model.Video; 9 | import com.socks.jiandan.utils.JSONParser; 10 | 11 | import java.util.ArrayList; 12 | 13 | import de.greenrobot.dao.query.QueryBuilder; 14 | 15 | public class VideoCache extends BaseCache { 16 | 17 | private static VideoCache instance; 18 | private static VideoCacheDao mVideoCacheDao; 19 | 20 | private VideoCache() { 21 | } 22 | 23 | public static VideoCache getInstance(Context context) { 24 | 25 | if (instance == null) { 26 | 27 | synchronized (VideoCache.class) { 28 | if (instance == null) { 29 | instance = new VideoCache(); 30 | } 31 | } 32 | 33 | mDaoSession = JDApplication.getDaoSession(context); 34 | mVideoCacheDao = mDaoSession.getVideoCacheDao(); 35 | } 36 | return instance; 37 | } 38 | 39 | public void clearAllCache() { 40 | mVideoCacheDao.deleteAll(); 41 | } 42 | 43 | @Override 44 | public ArrayList