├── .gitignore ├── README.md ├── app ├── .gitignore ├── apis.md ├── build.gradle ├── libs │ ├── libammsdk.jar │ └── weiboSDKCore_3.1.4.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── net │ │ └── nashlegend │ │ └── sourcewall │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── night.static.guokr.com │ │ │ └── apps │ │ │ │ ├── ask │ │ │ │ └── styles │ │ │ │ │ ├── 3192ac2b.main.css │ │ │ │ │ ├── b3b2bdee.contentPage.css │ │ │ │ │ └── e8ff5a9c.gbbcode.css │ │ │ │ ├── group │ │ │ │ ├── images │ │ │ │ │ └── b4adc330.play.png │ │ │ │ └── styles │ │ │ │ │ └── e8ff5a9c.gbbcode.css │ │ │ │ ├── minisite │ │ │ │ └── styles │ │ │ │ │ ├── e263077d.article.css │ │ │ │ │ ├── e8ff5a9c.gbbcode.css │ │ │ │ │ └── f79e35f9.main.css │ │ │ │ └── msite │ │ │ │ └── styles │ │ │ │ ├── 755794f4.m.css │ │ │ │ └── 81e10205.group.css │ │ └── static.guokr.com │ │ │ └── apps │ │ │ ├── ask │ │ │ └── styles │ │ │ │ ├── 3192ac2b.main.css │ │ │ │ ├── b3b2bdee.contentPage.css │ │ │ │ └── e8ff5a9c.gbbcode.css │ │ │ ├── group │ │ │ ├── images │ │ │ │ └── b4adc330.play.png │ │ │ └── styles │ │ │ │ └── e8ff5a9c.gbbcode.css │ │ │ ├── minisite │ │ │ └── styles │ │ │ │ ├── e263077d.article.css │ │ │ │ ├── e8ff5a9c.gbbcode.css │ │ │ │ └── f79e35f9.main.css │ │ │ └── msite │ │ │ └── styles │ │ │ ├── 755794f4.m.css │ │ │ └── 81e10205.group.css │ ├── java │ │ └── net │ │ │ └── nashlegend │ │ │ └── sourcewall │ │ │ ├── App.java │ │ │ ├── activities │ │ │ ├── AnswerActivity.java │ │ │ ├── ArticleActivity.java │ │ │ ├── BaseActivity.java │ │ │ ├── Browser.java │ │ │ ├── ImageActivity.java │ │ │ ├── LoginActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MessageCenterActivity.java │ │ │ ├── MyAnswersActivity.java │ │ │ ├── MyFavorsActivity.java │ │ │ ├── MyPostsActivity.java │ │ │ ├── MyQuestionsActivity.java │ │ │ ├── PostActivity.java │ │ │ ├── PostListActivity.java │ │ │ ├── PublishPostActivity.java │ │ │ ├── QuestionActivity.java │ │ │ ├── Reply2Activity.java │ │ │ ├── ReplyActivity.java │ │ │ ├── SearchActivity.java │ │ │ ├── SettingActivity.java │ │ │ ├── SimpleReplyActivity.java │ │ │ ├── SingleReplyActivity.java │ │ │ ├── SwipeActivity.java │ │ │ ├── TestActivity.java │ │ │ └── WeiboShareActivity.java │ │ │ ├── adapters │ │ │ ├── AceAdapter.java │ │ │ ├── ArticleAdapter.java │ │ │ ├── ArticleDetailAdapter.java │ │ │ ├── BasketAdapter.java │ │ │ ├── ChannelsAdapter.java │ │ │ ├── FakeFragmentStatePagerAdapter.java │ │ │ ├── FavorAdapter.java │ │ │ ├── ImageAdapter.java │ │ │ ├── NoticeAdapter.java │ │ │ ├── PostAdapter.java │ │ │ ├── PostDetailAdapter.java │ │ │ ├── QuestionAdapter.java │ │ │ ├── QuestionDetailAdapter.java │ │ │ ├── SimpleCommentAdapter.java │ │ │ └── recycler │ │ │ │ └── RaceAdapter.java │ │ │ ├── data │ │ │ ├── ChannelHelper.java │ │ │ ├── Config.java │ │ │ ├── Consts.java │ │ │ ├── Mob.java │ │ │ ├── Tail.java │ │ │ └── database │ │ │ │ ├── AskTagHelper.java │ │ │ │ ├── BaseDB.java │ │ │ │ ├── BasketHelper.java │ │ │ │ ├── GroupHelper.java │ │ │ │ └── gen │ │ │ │ ├── AskTag.java │ │ │ │ ├── AskTagDao.java │ │ │ │ ├── DaoMaster.java │ │ │ │ ├── DaoSession.java │ │ │ │ ├── MyBasket.java │ │ │ │ ├── MyBasketDao.java │ │ │ │ ├── MyGroup.java │ │ │ │ └── MyGroupDao.java │ │ │ ├── dialogs │ │ │ ├── FavorDialog.java │ │ │ ├── InputDialog.java │ │ │ └── ReportDialog.java │ │ │ ├── events │ │ │ ├── ArticleFinishLoadingLatestRepliesEvent.java │ │ │ ├── ArticleStartLoadingLatestRepliesEvent.java │ │ │ ├── Emitter.java │ │ │ ├── GroupFetchedEvent.java │ │ │ ├── LoginStateChangedEvent.java │ │ │ ├── NoticeNumChangedEvent.java │ │ │ ├── OpenContentFragmentEvent.java │ │ │ ├── PostFinishLoadingLatestRepliesEvent.java │ │ │ ├── PostStartLoadingLatestRepliesEvent.java │ │ │ ├── PrepareOpenContentFragmentEvent.java │ │ │ └── ShowHideEvent.java │ │ │ ├── fragment │ │ │ ├── ArticlePagerFragment.java │ │ │ ├── ArticlesFragment.java │ │ │ ├── BaseFragment.java │ │ │ ├── FavorsFragment.java │ │ │ ├── IChannelsFragment.java │ │ │ ├── NoticesFragment.java │ │ │ ├── PostPagerFragment.java │ │ │ ├── PostsFragment.java │ │ │ ├── ProfileFragment.java │ │ │ ├── QuestionPagerFragment.java │ │ │ ├── QuestionsFragment.java │ │ │ └── SearchFragment.java │ │ │ ├── model │ │ │ ├── AceModel.java │ │ │ ├── Answer.java │ │ │ ├── Article.java │ │ │ ├── Author.java │ │ │ ├── Basket.java │ │ │ ├── Category.java │ │ │ ├── Favor.java │ │ │ ├── Image.java │ │ │ ├── Message.java │ │ │ ├── Notice.java │ │ │ ├── Post.java │ │ │ ├── PrepareData.java │ │ │ ├── Question.java │ │ │ ├── Reminder.java │ │ │ ├── ReminderNoticeNum.java │ │ │ ├── SearchItem.java │ │ │ ├── SubItem.java │ │ │ ├── UComment.java │ │ │ ├── UpdateInfo.java │ │ │ └── UserInfo.java │ │ │ ├── request │ │ │ ├── CakeBox.java │ │ │ ├── CallBack.java │ │ │ ├── HttpUtil.java │ │ │ ├── JsonHandler.java │ │ │ ├── Method.java │ │ │ ├── NetworkTask.java │ │ │ ├── Param.java │ │ │ ├── ParamsMap.java │ │ │ ├── RequestBuilder.java │ │ │ ├── RequestCallBack.java │ │ │ ├── RequestDelegate.java │ │ │ ├── RequestObject.java │ │ │ ├── RequestType.java │ │ │ ├── ResponseCode.java │ │ │ ├── ResponseError.java │ │ │ ├── ResponseObject.java │ │ │ ├── SimpleCallBack.java │ │ │ ├── SimpleHttp.java │ │ │ ├── Urls.java │ │ │ ├── Utils.java │ │ │ ├── api │ │ │ │ ├── APIBase.java │ │ │ │ ├── ArticleAPI.java │ │ │ │ ├── FavorAPI.java │ │ │ │ ├── MessageAPI.java │ │ │ │ ├── PostAPI.java │ │ │ │ ├── QuestionAPI.java │ │ │ │ ├── SearchAPI.java │ │ │ │ └── UserAPI.java │ │ │ ├── cache │ │ │ │ ├── CacheHeaderUtil.java │ │ │ │ ├── DiskLruCache.java │ │ │ │ ├── RequestCache.java │ │ │ │ └── Utils.java │ │ │ ├── interceptors │ │ │ │ ├── DownloadProgressInterceptor.java │ │ │ │ ├── GzipRequestInterceptor.java │ │ │ │ ├── ProgressRequestBody.java │ │ │ │ ├── ProgressResponseBody.java │ │ │ │ ├── RedirectInterceptor.java │ │ │ │ ├── SupplierInterceptor.java │ │ │ │ ├── UploadProgressInterceptor.java │ │ │ │ └── UserAgentInterceptor.java │ │ │ └── parsers │ │ │ │ ├── AnswerCommentListParser.java │ │ │ │ ├── AnswerCommentParser.java │ │ │ │ ├── AnswerListParser.java │ │ │ │ ├── AnswerParser.java │ │ │ │ ├── ArticleCommentListParser.java │ │ │ │ ├── ArticleCommentParser.java │ │ │ │ ├── ArticleHtmlParser.java │ │ │ │ ├── ArticleListParser.java │ │ │ │ ├── BasketListParser.java │ │ │ │ ├── BasketParser.java │ │ │ │ ├── BooleanParser.java │ │ │ │ ├── CategoryListParser.java │ │ │ │ ├── ContentBooleanParser.java │ │ │ │ ├── ContentNumberParser.java │ │ │ │ ├── ContentStringParser.java │ │ │ │ ├── ContentValueForKeyParser.java │ │ │ │ ├── FavorListParser.java │ │ │ │ ├── GroupListParser.java │ │ │ │ ├── IgnoreNoticeParser.java │ │ │ │ ├── ImageUploadParser.java │ │ │ │ ├── JsonArrayParser.java │ │ │ │ ├── JsonObjectParser.java │ │ │ │ ├── MessageListParser.java │ │ │ │ ├── MessageParser.java │ │ │ │ ├── NoticeListParser.java │ │ │ │ ├── Parser.java │ │ │ │ ├── PostCommentListParser.java │ │ │ │ ├── PostCommentParser.java │ │ │ │ ├── PostHtmlListParser.java │ │ │ │ ├── PostListParser.java │ │ │ │ ├── PostParser.java │ │ │ │ ├── PostPrepareDataParser.java │ │ │ │ ├── PublishPostParser.java │ │ │ │ ├── QuestionCommentListParser.java │ │ │ │ ├── QuestionCommentParser.java │ │ │ │ ├── QuestionHtmlListParser.java │ │ │ │ ├── QuestionListParser.java │ │ │ │ ├── QuestionParser.java │ │ │ │ ├── ReminderListParser.java │ │ │ │ ├── ReminderNoticeNumParser.java │ │ │ │ ├── SearchListParser.java │ │ │ │ ├── SimpleArticleParser.java │ │ │ │ ├── StringParser.java │ │ │ │ ├── UpdateInfoParser.java │ │ │ │ └── UserInfoParser.java │ │ │ ├── simple │ │ │ ├── SimpleAnimationListener.java │ │ │ └── SimpleSubscriber.java │ │ │ ├── util │ │ │ ├── AccessTokenKeeper.java │ │ │ ├── AutoHideUtil.java │ │ │ ├── CrashReporter.java │ │ │ ├── DateTimeUtil.java │ │ │ ├── DeviceUtil.java │ │ │ ├── DisplayUtil.java │ │ │ ├── ErrorUtils.java │ │ │ ├── FileUtil.java │ │ │ ├── IOUtil.java │ │ │ ├── ImageSizeMap.java │ │ │ ├── ImageUtils.java │ │ │ ├── MDUtil.java │ │ │ ├── PrefsUtil.java │ │ │ ├── RegUtil.java │ │ │ ├── ShareUtil.java │ │ │ ├── Sketch2Util.java │ │ │ ├── SketchUtil.java │ │ │ ├── StyleChecker.java │ │ │ ├── TextHtmlHelper.java │ │ │ ├── TextUtil.java │ │ │ ├── ToastUtil.java │ │ │ ├── UiUtil.java │ │ │ ├── UpdateChecker.java │ │ │ ├── UrlCheckUtil.java │ │ │ └── Utils.java │ │ │ ├── view │ │ │ ├── AceView.java │ │ │ ├── AnswerListItemView.java │ │ │ ├── ArticleImage.java │ │ │ ├── ArticleListItemView.java │ │ │ ├── ArticleView.java │ │ │ ├── BasketItemView.java │ │ │ ├── BasketsView.java │ │ │ ├── FavorListItemView.java │ │ │ ├── GroupItemView.java │ │ │ ├── ImageViewer.java │ │ │ ├── MediumListItemView.java │ │ │ ├── NoticeView.java │ │ │ ├── PostListItemView.java │ │ │ ├── PostView.java │ │ │ ├── QuestionListItemView.java │ │ │ ├── QuestionView.java │ │ │ ├── SimpleCommentItemView.java │ │ │ ├── SubItemView.java │ │ │ └── common │ │ │ │ ├── AdaptivePager.java │ │ │ │ ├── LoadingView.java │ │ │ │ ├── RRecyclerView.java │ │ │ │ ├── SScrollView.java │ │ │ │ ├── ScaledImage │ │ │ │ ├── ImageSource.java │ │ │ │ ├── ImageViewState.java │ │ │ │ ├── SubsamplingScaleImageView.java │ │ │ │ └── decoder │ │ │ │ │ ├── CompatDecoderFactory.java │ │ │ │ │ ├── DecoderFactory.java │ │ │ │ │ ├── ImageDecoder.java │ │ │ │ │ ├── ImageRegionDecoder.java │ │ │ │ │ ├── SkiaImageDecoder.java │ │ │ │ │ └── SkiaImageRegionDecoder.java │ │ │ │ ├── ScalingImage.java │ │ │ │ ├── TTextView.java │ │ │ │ ├── WWebView.java │ │ │ │ ├── listview │ │ │ │ ├── LListFooter.java │ │ │ │ ├── LListHeader.java │ │ │ │ └── LListView.java │ │ │ │ └── shuffle │ │ │ │ ├── AskTagMovableButton.java │ │ │ │ ├── DeskBase.java │ │ │ │ ├── GroupMovableButton.java │ │ │ │ ├── MovableButton.java │ │ │ │ ├── ShuffleCard.java │ │ │ │ ├── ShuffleCardCandidate.java │ │ │ │ ├── ShuffleCardSenator.java │ │ │ │ ├── ShuffleCardSimple.java │ │ │ │ ├── ShuffleDesk.java │ │ │ │ └── ShuffleDeskSimple.java │ │ │ └── wxapi │ │ │ └── WXEntryActivity.java │ ├── jniLibs │ │ └── armeabi │ │ │ └── libweibosdkcore.so │ └── res │ │ ├── anim │ │ ├── fade_in.xml │ │ ├── fade_out.xml │ │ ├── scale_in_center.xml │ │ ├── scale_out_center.xml │ │ ├── slide_in_right.xml │ │ └── slide_out_right.xml │ │ ├── color │ │ ├── color_section_font.xml │ │ ├── color_text_link.xml │ │ └── dialog_button_text_color.xml │ │ ├── drawable-night-xhdpi │ │ ├── ic_answer_24dp.png │ │ ├── ic_basket_24dp.png │ │ ├── ic_day_night_24dp.png │ │ ├── ic_image_24dp.png │ │ ├── ic_image_36dp.png │ │ ├── ic_insert_image_36dp.png │ │ ├── ic_insert_link_24dp.png │ │ ├── ic_link_36dp.png │ │ ├── ic_notifications_active_24dp.png │ │ ├── ic_notifications_none_24dp.png │ │ ├── ic_posts_24dp.png │ │ ├── ic_publish_group.png │ │ ├── ic_publish_topic.png │ │ ├── ic_question_24dp.png │ │ ├── ic_send_24dp.png │ │ ├── ic_send_36dp.png │ │ ├── ic_setting_24dp.png │ │ └── ic_touch_24dp.png │ │ ├── drawable-night │ │ ├── bg_header_button.xml │ │ ├── bg_movable_button.xml │ │ ├── bg_search_section.xml │ │ ├── bg_search_text.xml │ │ ├── bg_tag_sticky.xml │ │ ├── divider_wide.xml │ │ ├── ic_badge.xml │ │ ├── ic_section_group.xml │ │ ├── ic_section_home.xml │ │ ├── ic_section_question.xml │ │ ├── ic_section_science.xml │ │ └── list_item_background.xml │ │ ├── drawable-v21 │ │ ├── list_item_background.xml │ │ └── list_item_background_ripple.xml │ │ ├── drawable-xhdpi │ │ ├── check_24dp.png │ │ ├── chevron_down.png │ │ ├── chevron_right.png │ │ ├── default_avatar.png │ │ ├── default_image.png │ │ ├── dustbin.png │ │ ├── dustbin_outline.png │ │ ├── gif_text.png │ │ ├── heart.png │ │ ├── heart_outline.png │ │ ├── ic_answer_24dp.png │ │ ├── ic_arrow_left.png │ │ ├── ic_basket_24dp.png │ │ ├── ic_broken_image_24dp.png │ │ ├── ic_close_grey_24dp.png │ │ ├── ic_comment.png │ │ ├── ic_day_night_24dp.png │ │ ├── ic_default_avatar_96dp.png │ │ ├── ic_download.png │ │ ├── ic_group_gray_48dp.png │ │ ├── ic_group_outline_gray_48dp.png │ │ ├── ic_group_primary_48dp.png │ │ ├── ic_guokr_logo.png │ │ ├── ic_home_gray_48dp.png │ │ ├── ic_home_gray_outline_48dp.png │ │ ├── ic_home_primary_48dp.png │ │ ├── ic_image_24dp.png │ │ ├── ic_image_36dp.png │ │ ├── ic_insert_image_36dp.png │ │ ├── ic_insert_link_24dp.png │ │ ├── ic_link_16dp.png │ │ ├── ic_link_36dp.png │ │ ├── ic_notifications_active_24dp.png │ │ ├── ic_notifications_none_24dp.png │ │ ├── ic_plus_one_white_36dp.png │ │ ├── ic_posts_24dp.png │ │ ├── ic_publish_group.png │ │ ├── ic_publish_topic.png │ │ ├── ic_question_24dp.png │ │ ├── ic_question_gray_48dp.png │ │ ├── ic_question_outline_gray_48dp.png │ │ ├── ic_question_primary_48dp.png │ │ ├── ic_refresh_24dp.png │ │ ├── ic_reply_color_white_36dp.png │ │ ├── ic_science_gray_48dp.png │ │ ├── ic_science_gray_outline_48dp.png │ │ ├── ic_science_primary_48dp.png │ │ ├── ic_search_24dp.png │ │ ├── ic_send_24dp.png │ │ ├── ic_send_36dp.png │ │ ├── ic_setting_24dp.png │ │ ├── ic_star_white_36dp.png │ │ ├── ic_touch_24dp.png │ │ ├── ic_txt_image_16dp.png │ │ ├── ic_txt_image_gray_16dp.png │ │ ├── left_shadow.9.png │ │ ├── like.png │ │ ├── link_gray.png │ │ ├── pencil.png │ │ ├── plus.png │ │ ├── refresh_big.png │ │ └── white_like.png │ │ ├── drawable │ │ ├── bg_header_button.xml │ │ ├── bg_movable_button.xml │ │ ├── bg_search_section.xml │ │ ├── bg_search_text.xml │ │ ├── bg_tag_sticky.xml │ │ ├── bg_tag_toast.xml │ │ ├── divider_thin.xml │ │ ├── divider_wide.xml │ │ ├── ic_badge.xml │ │ ├── ic_section_group.xml │ │ ├── ic_section_home.xml │ │ ├── ic_section_question.xml │ │ ├── ic_section_science.xml │ │ ├── list_item_background.xml │ │ ├── shadow_down.xml │ │ └── shadow_up.xml │ │ ├── layout │ │ ├── activity_answer.xml │ │ ├── activity_article.xml │ │ ├── activity_browser.xml │ │ ├── activity_image.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_message_center.xml │ │ ├── activity_my_answers.xml │ │ ├── activity_my_favors.xml │ │ ├── activity_my_posts.xml │ │ ├── activity_my_questions.xml │ │ ├── activity_post.xml │ │ ├── activity_post_list.xml │ │ ├── activity_publish_post.xml │ │ ├── activity_question.xml │ │ ├── activity_reply.xml │ │ ├── activity_search.xml │ │ ├── activity_setting.xml │ │ ├── activity_simple_reply.xml │ │ ├── activity_single_reply.xml │ │ ├── activity_test.xml │ │ ├── activity_weibo_share.xml │ │ ├── button_movable.xml │ │ ├── dialog_baskets.xml │ │ ├── dialog_input.xml │ │ ├── dialog_input_simple.xml │ │ ├── dialog_input_simple_two.xml │ │ ├── fragment_article_pager.xml │ │ ├── fragment_articles.xml │ │ ├── fragment_favors.xml │ │ ├── fragment_notice_list.xml │ │ ├── fragment_post_pager.xml │ │ ├── fragment_posts.xml │ │ ├── fragment_profile.xml │ │ ├── fragment_question_pager.xml │ │ ├── fragment_questions.xml │ │ ├── fragment_search.xml │ │ ├── layout_answer_item_view.xml │ │ ├── layout_article_item_view.xml │ │ ├── layout_article_view.xml │ │ ├── layout_basket_item_view.xml │ │ ├── layout_favor_item_view.xml │ │ ├── layout_footer_view.xml │ │ ├── layout_group_item_view.xml │ │ ├── layout_header_load_pre_page.xml │ │ ├── layout_header_view.xml │ │ ├── layout_image_viewer.xml │ │ ├── layout_loading.xml │ │ ├── layout_medium_comment_item_view.xml │ │ ├── layout_notice_view.xml │ │ ├── layout_post_item_view.xml │ │ ├── layout_post_view.xml │ │ ├── layout_question_item_view.xml │ │ ├── layout_question_view.xml │ │ ├── layout_report.xml │ │ ├── layout_search_item.xml │ │ ├── layout_shuffle.xml │ │ ├── layout_shuffle_simple.xml │ │ ├── layout_simple_comment_item_view.xml │ │ ├── layout_subitem_view.xml │ │ ├── simple_spinner_item.xml │ │ └── toast_text.xml │ │ ├── menu │ │ ├── menu_answer.xml │ │ ├── menu_article.xml │ │ ├── menu_message_center.xml │ │ ├── menu_notice_center.xml │ │ ├── menu_post.xml │ │ ├── menu_post_list.xml │ │ ├── menu_publish_post.xml │ │ ├── menu_question.xml │ │ ├── menu_reply.xml │ │ ├── menu_reply2.xml │ │ └── menu_simple_reply.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── values-night-v21 │ │ └── colors.xml │ │ ├── values-night │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── net │ └── nashlegend │ └── sourcewall │ ├── data │ └── TailTest.java │ ├── request │ └── cache │ │ └── UtilsTest.java │ └── util │ └── ImageUtilsTest.java ├── build.gradle ├── config.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle ├── tools ├── .gitignore ├── build.gradle └── src │ └── main │ └── java │ └── net │ └── nashlegend │ └── Tools │ ├── Main.java │ └── SWDaoGenerator.java └── update.json /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | .DS_Store 4 | /build 5 | /.idea 6 | *.iml 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #果壳的壳 2 | 3 | ###应用直接下载地址: [点击下载最新版](http://app.mi.com/download/87827) 4 | ###或者去小米应用商店下载:[进入小米商店查看](http://app.mi.com/details?id=net.nashlegend.sourcewall) 5 | 6 | 目前功能最强大的果壳第三方客户端,目的是为了让壳友更方便的使用手机刷果壳。现提供果壳网三大版块(科学人、小组、问答)的全面功能以及果壳网通知。 7 | 8 | 当前版本功能点如下: 9 | 10 | - 科学人:查看文章、评论文章、收藏文章、推荐文章,回复别人的评论,分享文章。 11 | - 小组:发表新贴,查看我的小组、热门回贴、按小组查看贴子、倒序查看回贴、回复贴子、推荐贴子、收藏贴子、分享贴子、评论别人的回复。加载自己关注的小组,调整小组顺序。 12 | - 果壳问答:查看问题、查看答案、回答问题、反对支持感谢问题、评论问题、评论答案、查看热门、精彩回答、分享问题、根据标签查看问答列表、管理我关注的标签。 13 | - 通知功能:查看果壳网通知,包括被推荐、回复、点赞关注等操作。 14 | - 保存草稿:对于未发布的贴子和评论,都会保存为草稿,但是保存草稿是本地行为,并没有使用果壳的草稿系统。 15 | - 夜间模式:在被窝里刷果壳不会再亮瞎双眼。 16 | - 无图模式:可以选择仅在wifi下加载图片、始终加载图片、始终不加载图片。 17 | - 自定义尾巴:在发贴、回复贴子、回复科学人文章、回答问题的时候,默认会带一条小尾巴——来自SourceWall,你也可以设置为来自你的手机型号,也可以设置为任意自定义尾巴或者不使用尾巴。 18 | - 搜索果壳网内容 19 | - 查看所有的收藏 20 | - 查看我自己发的贴子 21 | - 查看我自己提的问题 22 | - 查看我自己的回答 23 | - 举报 24 | - 匿名回贴 -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/ 2 | build/ -------------------------------------------------------------------------------- /app/libs/libammsdk.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/libs/libammsdk.jar -------------------------------------------------------------------------------- /app/libs/weiboSDKCore_3.1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/libs/weiboSDKCore_3.1.4.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | 2 | -ignorewarnings 3 | 4 | -dontwarn java.lang.invoke.* 5 | 6 | -keepattributes EnclosingMethod 7 | 8 | #greendao 9 | -keepclassmembers class * extends de.greenrobot.dao.AbstractDao { 10 | public static java.lang.String TABLENAME; 11 | } 12 | -keep class **$Properties 13 | 14 | #eventbus 15 | -keepclassmembers,includedescriptorclasses class ** { public void onEvent*(**); } 16 | 17 | #umeng 18 | -keepclassmembers class * { 19 | public (org.json.JSONObject); 20 | } 21 | 22 | #tencent 23 | -keep class com.tencent.** { *; } 24 | 25 | -keep class com.sina.** { *; } 26 | 27 | -keep class org.jsoup.** { *; } 28 | 29 | -keep class org.apache.** { *; } 30 | 31 | -keep class org.markdown4j.** { *; } 32 | 33 | -keep class net.nashlegend.** { *; } 34 | 35 | #umeng 36 | -keepclassmembers class * { 37 | public (org.json.JSONObject); 38 | } 39 | 40 | #butterKnife 41 | -keep class butterknife.** { *; } 42 | -dontwarn butterknife.internal.** 43 | -keep class **$$ViewBinder { *; } 44 | -keepclasseswithmembernames class * { 45 | @butterknife.* ; 46 | } 47 | -keepclasseswithmembernames class * { 48 | @butterknife.* ; 49 | } 50 | 51 | #RxJava 52 | -dontwarn rx.** 53 | -keep class rx.** { *; } 54 | 55 | -dontwarn okio.** -------------------------------------------------------------------------------- /app/src/androidTest/java/net/nashlegend/sourcewall/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall; 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/assets/night.static.guokr.com/apps/group/images/b4adc330.play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/assets/night.static.guokr.com/apps/group/images/b4adc330.play.png -------------------------------------------------------------------------------- /app/src/main/assets/static.guokr.com/apps/group/images/b4adc330.play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/assets/static.guokr.com/apps/group/images/b4adc330.play.png -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/activities/TestActivity.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.activities; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | import net.nashlegend.sourcewall.R; 7 | 8 | 9 | public class TestActivity extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_test); 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/ArticleAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.Article; 8 | import net.nashlegend.sourcewall.view.ArticleListItemView; 9 | 10 | /** 11 | * Created by NashLegend on 2014/9/18 0018 12 | */ 13 | public class ArticleAdapter extends AceAdapter
{ 14 | 15 | public ArticleAdapter(Context context) { 16 | super(context); 17 | } 18 | 19 | @Override 20 | public View getView(int position, View convertView, ViewGroup parent) { 21 | if (convertView == null) { 22 | convertView = new ArticleListItemView(getContext()); 23 | } 24 | ((ArticleListItemView) convertView).setData(list.get(position)); 25 | return convertView; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/ArticleDetailAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.AceModel; 8 | import net.nashlegend.sourcewall.model.Article; 9 | import net.nashlegend.sourcewall.model.UComment; 10 | import net.nashlegend.sourcewall.view.ArticleView; 11 | import net.nashlegend.sourcewall.view.MediumListItemView; 12 | 13 | /** 14 | * Created by NashLegend on 2014/9/18 0018 15 | */ 16 | public class ArticleDetailAdapter extends AceAdapter { 17 | 18 | private static final int Type_Article = 0; 19 | private static final int Type_Comment = 1; 20 | 21 | public ArticleDetailAdapter(Context context) { 22 | super(context); 23 | } 24 | 25 | @Override 26 | public int getItemViewType(int position) { 27 | return position == 0 ? Type_Article : Type_Comment; 28 | } 29 | 30 | @Override 31 | public int getViewTypeCount() { 32 | return 2; 33 | } 34 | 35 | @Override 36 | public View getView(int position, View convertView, ViewGroup parent) { 37 | int tp = getItemViewType(position); 38 | if (convertView == null) { 39 | if (tp == Type_Article) { 40 | convertView = new ArticleView(getContext()); 41 | } else { 42 | convertView = new MediumListItemView(getContext()); 43 | } 44 | } 45 | if (convertView instanceof ArticleView) { 46 | ((ArticleView) convertView).setData((Article) list.get(position)); 47 | ((ArticleView) convertView).setAdapter(this); 48 | } else { 49 | ((MediumListItemView) convertView).setData((UComment) list.get(position)); 50 | } 51 | return convertView; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/BasketAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.Basket; 8 | import net.nashlegend.sourcewall.view.BasketItemView; 9 | 10 | /** 11 | * Created by NashLegend on 2014/12/2 0002 12 | */ 13 | public class BasketAdapter extends AceAdapter { 14 | String link = ""; 15 | String title = ""; 16 | 17 | public BasketAdapter(Context context, String link, String title) { 18 | super(context); 19 | this.link = link; 20 | this.title = title; 21 | } 22 | 23 | @Override 24 | public View getView(int position, View convertView, ViewGroup parent) { 25 | if (convertView == null) { 26 | convertView = new BasketItemView(getContext()); 27 | } 28 | ((BasketItemView) convertView).setData(list.get(position), link, title); 29 | return convertView; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/FavorAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.Favor; 8 | import net.nashlegend.sourcewall.view.FavorListItemView; 9 | 10 | /** 11 | * Created by NashLegend on 2014/9/18 0018 12 | */ 13 | public class FavorAdapter extends AceAdapter { 14 | 15 | public FavorAdapter(Context context) { 16 | super(context); 17 | } 18 | 19 | @Override 20 | public View getView(int position, View convertView, ViewGroup parent) { 21 | if (convertView == null) { 22 | convertView = new FavorListItemView(getContext()); 23 | } 24 | ((FavorListItemView) convertView).setData(list.get(position)); 25 | return convertView; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/NoticeAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.Notice; 8 | import net.nashlegend.sourcewall.view.NoticeView; 9 | 10 | /** 11 | * Created by NashLegend on 2015/2/12 0012 12 | */ 13 | public class NoticeAdapter extends AceAdapter { 14 | 15 | public NoticeAdapter(Context context) { 16 | super(context); 17 | } 18 | 19 | @Override 20 | public View getView(int position, View convertView, ViewGroup parent) { 21 | if (convertView == null) { 22 | convertView = new NoticeView(getContext()); 23 | ((NoticeView) convertView).setAdapter(this); 24 | } 25 | ((NoticeView) convertView).setData(list.get(position)); 26 | return convertView; 27 | } 28 | 29 | public boolean removeItemByID(String id) { 30 | if (list.size() > 0) { 31 | if (id != null) { 32 | for (int i = list.size() - 1; i >= 0; i--) { 33 | if (id.equals(list.get(i).getId())) { 34 | list.remove(i); 35 | return true; 36 | } 37 | } 38 | } else { 39 | for (int i = list.size() - 1; i >= 0; i--) { 40 | if (list.get(i).getId() == null) { 41 | list.remove(i); 42 | return true; 43 | } 44 | } 45 | } 46 | } 47 | return false; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/PostAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.Post; 8 | import net.nashlegend.sourcewall.view.PostListItemView; 9 | 10 | /** 11 | * Created by NashLegend on 2014/9/15 0015 12 | */ 13 | public class PostAdapter extends AceAdapter { 14 | 15 | public PostAdapter(Context context) { 16 | super(context); 17 | } 18 | 19 | @Override 20 | public View getView(int position, View convertView, ViewGroup parent) { 21 | if (convertView == null) { 22 | convertView = new PostListItemView(getContext()); 23 | } 24 | ((PostListItemView) convertView).setData(list.get(position)); 25 | return convertView; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/PostDetailAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.AceModel; 8 | import net.nashlegend.sourcewall.model.Post; 9 | import net.nashlegend.sourcewall.model.UComment; 10 | import net.nashlegend.sourcewall.view.MediumListItemView; 11 | import net.nashlegend.sourcewall.view.PostView; 12 | 13 | /** 14 | * Created by NashLegend on 2014/9/18 0018 15 | */ 16 | public class PostDetailAdapter extends AceAdapter { 17 | private static final int Type_Post = 0; 18 | private static final int Type_Comment = 1; 19 | 20 | public PostDetailAdapter(Context context) { 21 | super(context); 22 | } 23 | 24 | @Override 25 | public int getItemViewType(int position) { 26 | return position == 0 ? Type_Post : Type_Comment; 27 | } 28 | 29 | @Override 30 | public int getViewTypeCount() { 31 | return 2; 32 | } 33 | 34 | @Override 35 | public View getView(int position, View convertView, ViewGroup parent) { 36 | int tp = getItemViewType(position); 37 | if (convertView == null) { 38 | if (tp == Type_Post) { 39 | convertView = new PostView(getContext()); 40 | } else { 41 | convertView = new MediumListItemView(getContext()); 42 | } 43 | } 44 | if (convertView instanceof PostView) { 45 | ((PostView) convertView).setData((Post) list.get(position)); 46 | ((PostView) convertView).setAdapter(this); 47 | } else { 48 | ((MediumListItemView) convertView).setData((UComment) list.get(position)); 49 | } 50 | return convertView; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/QuestionAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.Question; 8 | import net.nashlegend.sourcewall.view.QuestionListItemView; 9 | 10 | /** 11 | * Created by NashLegend on 2014/9/15 0015 12 | */ 13 | public class QuestionAdapter extends AceAdapter { 14 | public QuestionAdapter(Context context) { 15 | super(context); 16 | } 17 | 18 | @Override 19 | public View getView(int position, View convertView, ViewGroup parent) { 20 | if (convertView == null) { 21 | convertView = new QuestionListItemView(getContext()); 22 | } 23 | ((QuestionListItemView) convertView).setData(list.get(position)); 24 | return convertView; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/QuestionDetailAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.AceModel; 8 | import net.nashlegend.sourcewall.view.AceView; 9 | import net.nashlegend.sourcewall.view.AnswerListItemView; 10 | import net.nashlegend.sourcewall.view.QuestionView; 11 | 12 | /** 13 | * Created by NashLegend on 2014/9/18 0018 14 | */ 15 | public class QuestionDetailAdapter extends AceAdapter { 16 | 17 | private static final int Type_Question = 0; 18 | private static final int Type_Answer = 1; 19 | 20 | public QuestionDetailAdapter(Context context) { 21 | super(context); 22 | } 23 | 24 | @Override 25 | public int getItemViewType(int position) { 26 | return position == 0 ? Type_Question : Type_Answer; 27 | } 28 | 29 | @Override 30 | public int getViewTypeCount() { 31 | return 2; 32 | } 33 | 34 | @Override 35 | public View getView(int position, View convertView, ViewGroup parent) { 36 | int tp = getItemViewType(position); 37 | if (convertView == null) { 38 | if (tp == Type_Question) { 39 | convertView = new QuestionView(getContext()); 40 | } else { 41 | convertView = new AnswerListItemView(getContext()); 42 | } 43 | } 44 | ((AceView) convertView).setData(list.get(position)); 45 | return convertView; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/SimpleCommentAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | import net.nashlegend.sourcewall.model.UComment; 8 | import net.nashlegend.sourcewall.view.SimpleCommentItemView; 9 | 10 | /** 11 | * Created by NashLegend on 2014/9/18 0018 12 | */ 13 | public class SimpleCommentAdapter extends AceAdapter { 14 | public SimpleCommentAdapter(Context context) { 15 | super(context); 16 | } 17 | 18 | @Override 19 | public View getView(int position, View convertView, ViewGroup parent) { 20 | if (convertView == null) { 21 | convertView = new SimpleCommentItemView(getContext()); 22 | } 23 | ((SimpleCommentItemView) convertView).setData(list.get(position)); 24 | return convertView; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/adapters/recycler/RaceAdapter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.adapters.recycler; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | /** 8 | * Created by NashLegend on 16/8/4. 9 | */ 10 | 11 | public class RaceAdapter extends RecyclerView.Adapter { 12 | @Override 13 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 14 | return null; 15 | } 16 | 17 | @Override 18 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 19 | 20 | } 21 | 22 | @Override 23 | public int getItemCount() { 24 | return 0; 25 | } 26 | 27 | class Helder extends RecyclerView.ViewHolder { 28 | 29 | public Helder(View itemView) { 30 | super(itemView); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/data/database/BaseDB.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.data.database; 2 | 3 | import net.nashlegend.sourcewall.App; 4 | import net.nashlegend.sourcewall.data.database.gen.DaoMaster; 5 | import net.nashlegend.sourcewall.data.database.gen.DaoSession; 6 | 7 | /** 8 | * Created by NashLegend on 2015/1/20 0020 9 | */ 10 | public class BaseDB { 11 | public final static String DB_NAME = "SourceWallDB"; 12 | 13 | 14 | private static DaoMaster daoMaster; 15 | private static DaoSession daoSession; 16 | 17 | 18 | public static DaoMaster getDaoMaster() { 19 | if (daoMaster == null) { 20 | DaoMaster.OpenHelper helper = new DaoMaster.DevOpenHelper(App.getApp(), BaseDB.DB_NAME, 21 | null); 22 | daoMaster = new DaoMaster(helper.getWritableDatabase()); 23 | } 24 | return daoMaster; 25 | } 26 | 27 | public static DaoSession getDaoSession() { 28 | if (daoSession == null) { 29 | daoSession = getDaoMaster().newSession(); 30 | } 31 | return daoSession; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/ArticleFinishLoadingLatestRepliesEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import net.nashlegend.sourcewall.model.Article; 4 | 5 | /** 6 | * Created by NashLegend on 16/9/6. 7 | */ 8 | 9 | public class ArticleFinishLoadingLatestRepliesEvent { 10 | public Article article; 11 | 12 | public ArticleFinishLoadingLatestRepliesEvent(Article article) { 13 | this.article = article; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/ArticleStartLoadingLatestRepliesEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import net.nashlegend.sourcewall.model.Article; 4 | 5 | /** 6 | * Created by NashLegend on 16/9/6. 7 | */ 8 | 9 | public class ArticleStartLoadingLatestRepliesEvent { 10 | public Article article; 11 | 12 | public ArticleStartLoadingLatestRepliesEvent(Article article) { 13 | this.article = article; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/Emitter.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import de.greenrobot.event.EventBus; 4 | 5 | /** 6 | * Created by NashLegend on 2016/9/28. 7 | */ 8 | 9 | public class Emitter { 10 | public static void register(Object object) { 11 | if (object == null) { 12 | return; 13 | } 14 | EventBus.getDefault().register(object); 15 | } 16 | 17 | public static void unregister(Object object) { 18 | if (object == null) { 19 | return; 20 | } 21 | EventBus.getDefault().unregister(object); 22 | } 23 | 24 | public static void emit(Object object) { 25 | if (object == null) { 26 | return; 27 | } 28 | EventBus.getDefault().post(object); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/GroupFetchedEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | /** 4 | * Created by NashLegend on 16/8/23. 5 | */ 6 | 7 | public class GroupFetchedEvent { 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/LoginStateChangedEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | /** 4 | * Created by NashLegend on 16/3/15. 5 | */ 6 | public class LoginStateChangedEvent { 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/NoticeNumChangedEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | /** 4 | * Created by NashLegend on 16/9/7. 5 | */ 6 | 7 | public class NoticeNumChangedEvent { 8 | public int num = 0; 9 | 10 | public NoticeNumChangedEvent(int num) { 11 | this.num = num; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/OpenContentFragmentEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import net.nashlegend.sourcewall.model.SubItem; 4 | 5 | /** 6 | * Created by NashLegend on 16/5/5. 7 | */ 8 | public class OpenContentFragmentEvent { 9 | public SubItem subItem; 10 | 11 | public OpenContentFragmentEvent(SubItem subItem) { 12 | this.subItem = subItem; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/PostFinishLoadingLatestRepliesEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import net.nashlegend.sourcewall.model.Post; 4 | 5 | /** 6 | * Created by NashLegend on 16/9/6. 7 | */ 8 | 9 | public class PostFinishLoadingLatestRepliesEvent { 10 | public Post post; 11 | 12 | public PostFinishLoadingLatestRepliesEvent(Post post) { 13 | this.post = post; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/PostStartLoadingLatestRepliesEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import net.nashlegend.sourcewall.model.Post; 4 | 5 | /** 6 | * Created by NashLegend on 16/9/6. 7 | */ 8 | 9 | public class PostStartLoadingLatestRepliesEvent { 10 | public Post post; 11 | 12 | public PostStartLoadingLatestRepliesEvent(Post post) { 13 | this.post = post; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/PrepareOpenContentFragmentEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import net.nashlegend.sourcewall.model.SubItem; 4 | 5 | /** 6 | * Created by NashLegend on 16/5/5. 7 | */ 8 | public class PrepareOpenContentFragmentEvent { 9 | public SubItem subItem; 10 | 11 | public PrepareOpenContentFragmentEvent(SubItem subItem) { 12 | this.subItem = subItem; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/events/ShowHideEvent.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.events; 2 | 3 | import net.nashlegend.sourcewall.model.SubItem; 4 | 5 | /** 6 | * Created by NashLegend on 16/9/20. 7 | */ 8 | 9 | public class ShowHideEvent { 10 | public int section = SubItem.Section_Article; 11 | public boolean show = false; 12 | 13 | public ShowHideEvent(int section, boolean show) { 14 | this.section = section; 15 | this.show = show; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/fragment/IChannelsFragment.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.fragment; 2 | 3 | import android.view.Menu; 4 | import android.view.MenuInflater; 5 | import android.view.MenuItem; 6 | 7 | import net.nashlegend.sourcewall.model.SubItem; 8 | 9 | /** 10 | * Created by NashLegend on 16/5/5. 11 | */ 12 | public interface IChannelsFragment { 13 | /** 14 | * 返回所需的menu id 15 | */ 16 | int getFragmentMenu(); 17 | 18 | /** 19 | * 接管Activity的Menu生成 20 | */ 21 | boolean takeOverMenuInflate(MenuInflater inflater, Menu menu); 22 | 23 | boolean takeOverOptionsItemSelect(MenuItem item); 24 | 25 | boolean takeOverBackPressed(); 26 | 27 | void resetData(SubItem subItem); 28 | 29 | void triggerRefresh(); 30 | 31 | void prepareLoading(SubItem subItem); 32 | 33 | void scrollToHead(); 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/model/AceModel.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.model; 2 | 3 | import android.os.Parcelable; 4 | 5 | /** 6 | * Created by NashLegend on 2014/9/18 0018 7 | */ 8 | public abstract class AceModel implements Parcelable { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/model/Category.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.model; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | import org.json.JSONObject; 7 | 8 | /** 9 | * Created by NashLegend on 2014/12/2 0002 10 | */ 11 | public class Category implements Parcelable { 12 | String id = ""; 13 | String name = ""; 14 | 15 | public static Category fromJson(JSONObject jsonObject) throws Exception { 16 | Category category = new Category(); 17 | category.setId(jsonObject.optString("id")); 18 | category.setName(jsonObject.optString("name")); 19 | return category; 20 | } 21 | 22 | public String getId() { 23 | return id; 24 | } 25 | 26 | public void setId(String id) { 27 | this.id = id; 28 | } 29 | 30 | public String getName() { 31 | return name; 32 | } 33 | 34 | public void setName(String name) { 35 | this.name = name; 36 | } 37 | 38 | @Override 39 | public int describeContents() { 40 | return 0; 41 | } 42 | 43 | @Override 44 | public void writeToParcel(Parcel dest, int flags) { 45 | dest.writeString(this.id); 46 | dest.writeString(this.name); 47 | } 48 | 49 | public Category() { 50 | } 51 | 52 | protected Category(Parcel in) { 53 | this.id = in.readString(); 54 | this.name = in.readString(); 55 | } 56 | 57 | public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { 58 | @Override 59 | public Category createFromParcel(Parcel source) { 60 | return new Category(source); 61 | } 62 | 63 | @Override 64 | public Category[] newArray(int size) { 65 | return new Category[size]; 66 | } 67 | }; 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/model/Image.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.model; 2 | 3 | import android.os.Parcel; 4 | import android.os.Parcelable; 5 | 6 | /** 7 | * Created by NashLegend on 16/2/23. 8 | */ 9 | public class Image implements Parcelable { 10 | private String url = ""; 11 | private int width = 0; 12 | private int height = 0; 13 | 14 | public Image() { 15 | } 16 | 17 | @Override 18 | public int describeContents() { 19 | return 0; 20 | } 21 | 22 | @Override 23 | public void writeToParcel(Parcel dest, int flags) { 24 | dest.writeString(this.url); 25 | dest.writeInt(this.width); 26 | dest.writeInt(this.height); 27 | } 28 | 29 | protected Image(Parcel in) { 30 | this.url = in.readString(); 31 | this.width = in.readInt(); 32 | this.height = in.readInt(); 33 | } 34 | 35 | public static final Creator CREATOR = new Creator() { 36 | @Override 37 | public Image createFromParcel(Parcel source) { 38 | return new Image(source); 39 | } 40 | 41 | @Override 42 | public Image[] newArray(int size) { 43 | return new Image[size]; 44 | } 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/model/PrepareData.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.model; 2 | 3 | import net.nashlegend.sourcewall.request.Param; 4 | 5 | import java.util.ArrayList; 6 | 7 | /** 8 | * Created by NashLegend on 2015/1/9 0009 9 | * 发贴所需数据 10 | */ 11 | public class PrepareData { 12 | 13 | private String csrf = ""; 14 | private ArrayList pairs = new ArrayList<>(); 15 | 16 | public String getCsrf() { 17 | return csrf; 18 | } 19 | 20 | public void setCsrf(String csrf) { 21 | this.csrf = csrf; 22 | } 23 | 24 | public ArrayList getPairs() { 25 | return pairs; 26 | } 27 | 28 | public void setPairs(ArrayList pairs) { 29 | this.pairs = pairs; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/model/ReminderNoticeNum.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.model; 2 | 3 | import org.json.JSONObject; 4 | 5 | /** 6 | * Created by NashLegend on 2015/2/2 0002 7 | */ 8 | public class ReminderNoticeNum { 9 | 10 | private int notice_num = 0;//通知数量 11 | private int reminder_num = 0;//站内信数量,或许还有其他? 12 | 13 | public static ReminderNoticeNum fromJson(JSONObject object) throws Exception { 14 | ReminderNoticeNum num = new ReminderNoticeNum(); 15 | num.setNotice_num(object.optInt("n"));//通知数量 16 | num.setReminder_num(object.optInt("r"));//站内信数量 17 | return num; 18 | } 19 | 20 | public int getReminder_num() { 21 | return reminder_num; 22 | } 23 | 24 | public void setReminder_num(int reminder_num) { 25 | this.reminder_num = reminder_num; 26 | } 27 | 28 | public int getNotice_num() { 29 | return notice_num; 30 | } 31 | 32 | public void setNotice_num(int notice_num) { 33 | this.notice_num = notice_num; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/CallBack.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | /** 4 | * http 请求基本回调 5 | */ 6 | public abstract class CallBack implements RequestCallBack { 7 | @Override 8 | public void onRequestProgress(long current, long total) { 9 | 10 | } 11 | 12 | @Override 13 | public void onResponseProgress(long current, long total, boolean done) { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/Method.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | /** 4 | * Created by NashLegend on 2016/10/28. 5 | */ 6 | 7 | public enum Method { 8 | GET("GET"),//must no body 9 | POST("POST"),//must body 10 | DELETE("DELETE"),//may body 11 | PUT("PUT"),//must body 12 | HEAD("HEAD"),//must no body 13 | PATCH("PATCH"),;//must body 14 | 15 | private String mtd; 16 | 17 | Method(String method) { 18 | this.mtd = method; 19 | } 20 | 21 | public String value() { 22 | return mtd; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/Param.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | /** 4 | * Created by NashLegend on 16/7/4. 5 | */ 6 | 7 | public class Param { 8 | 9 | public final String key; 10 | public final String value; 11 | 12 | public Param(String key, Object value) { 13 | this(key, value == null ? "" : String.valueOf(value)); 14 | } 15 | 16 | public Param(String key, String value) { 17 | this.key = key == null ? "" : key; 18 | this.value = value == null ? "" : value; 19 | } 20 | 21 | @Override 22 | public boolean equals(Object o) { 23 | if (o instanceof Param) { 24 | Param p = (Param) o; 25 | return equals(p.key, key) && equals(p.value, value); 26 | } 27 | return false; 28 | } 29 | 30 | public static boolean equals(Object a, Object b) { 31 | return (a == null) ? (b == null) : a.equals(b); 32 | } 33 | 34 | @Override 35 | public int hashCode() { 36 | return (key == null ? 0 : key.hashCode()) ^ (value == null ? 0 : value.hashCode()); 37 | } 38 | 39 | public static Param create(String a, String b) { 40 | return new Param(a, b); 41 | } 42 | 43 | public Param copy() { 44 | return new Param(key, value); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/ParamsMap.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | * Created by NashLegend on 16/7/26. 7 | */ 8 | 9 | public class ParamsMap { 10 | public final ArrayList params = new ArrayList<>(); 11 | 12 | public ParamsMap put(String key, Object value) { 13 | params.add(new Param(key, value)); 14 | return this; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/RequestCallBack.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.annotation.Nullable; 5 | 6 | /** 7 | * http 请求的完整回调 8 | */ 9 | public interface RequestCallBack { 10 | /** 11 | * result不可能为空 12 | */ 13 | void onFailure(@Nullable Throwable e, @NonNull ResponseObject result); 14 | 15 | /** 16 | * 如果执行到此处,ok必然为true,{@link ResponseObject#result}必然不为null 17 | */ 18 | void onSuccess(@NonNull T result, @NonNull ResponseObject detailed); 19 | 20 | /** 21 | * 请求的进度,非UI线程 22 | */ 23 | void onRequestProgress(long current, long total); 24 | 25 | /** 26 | * 响应的进度,非UI线程 27 | */ 28 | void onResponseProgress(long current, long total, boolean done); 29 | } -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/RequestType.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | /** 4 | * Created by NashLegend on 2016/10/28. 5 | */ 6 | 7 | public class RequestType { 8 | public static final int PLAIN = 0; 9 | public static final int UPLOAD = 1; 10 | /** 11 | * 理论上说下载返回结果没法用Parser,如果需要Parser,那么parse的是downloadFilePath 12 | * 所以建议使用DirectlyStringParser,因为在onNext中返回了downloadFilePath 13 | */ 14 | public static final int DOWNLOAD = 2; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/ResponseCode.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | /** 4 | * Created by NashLegend on 2015/9/23 0023. 5 | * 网络请求统一错误码,由Json解析出的code,而不是http code 6 | */ 7 | public class ResponseCode { 8 | public static final int CODE_NONE = -1; 9 | public static final int CODE_OK = 200; 10 | public static final int CODE_TOKEN_INVALID = 200004; 11 | public static final int CODE_ALREADY_LIKED = 240004; 12 | public static final int CODE_ALREADY_THANKED = 242033; 13 | public static final int CODE_ALREADY_BURIED = 242013; 14 | public static final int CODE_UNKNOWN = 1008610010; 15 | } -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/ResponseError.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | /** 4 | * Created by NashLegend on 2015/9/29 0029. 5 | */ 6 | 7 | public enum ResponseError { 8 | OK, 9 | LOGIN_FAILED, 10 | TOKEN_INVALID, 11 | NETWORK_ERROR, 12 | JSON_ERROR, 13 | ALREADY_LIKED, 14 | ALREADY_THANKED, 15 | ALREADY_BURIED, 16 | NO_TOKEN, 17 | NO_USER_ID, 18 | FORBIDDEN, 19 | TIME_OUT, 20 | CANCELLED, 21 | UNKNOWN, 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/SimpleCallBack.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | 4 | import android.support.annotation.NonNull; 5 | import android.support.annotation.Nullable; 6 | 7 | /** 8 | * http 请求基本回调 9 | */ 10 | public class SimpleCallBack implements RequestCallBack { 11 | @Override 12 | public void onFailure(@Nullable Throwable e, @NonNull ResponseObject result) { 13 | onFailure(result); 14 | } 15 | 16 | @Override 17 | public void onSuccess(@NonNull T result, @NonNull ResponseObject detailed) { 18 | onSuccess(result); 19 | } 20 | 21 | @Override 22 | public void onRequestProgress(long current, long total) { 23 | 24 | } 25 | 26 | @Override 27 | public void onResponseProgress(long current, long total, boolean done) { 28 | 29 | } 30 | 31 | public void onSuccess(@NonNull T result) { 32 | onSuccess(); 33 | } 34 | 35 | public void onSuccess() { 36 | 37 | } 38 | 39 | public void onFailure(@NonNull ResponseObject result) { 40 | onFailure(); 41 | } 42 | 43 | public void onFailure() { 44 | 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/Urls.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | import java.util.List; 4 | 5 | import okhttp3.HttpUrl; 6 | 7 | /** 8 | * Created by NashLegend on 2015/10/6 0006. 9 | */ 10 | public class Urls { 11 | 12 | /** 13 | * 将地址与参数拼合,地址本身可以含有参数 14 | */ 15 | public static String combine(String url, Param param) { 16 | return HttpUrl.parse(url).newBuilder().addQueryParameter(param.key, 17 | param.value).build().toString(); 18 | } 19 | 20 | /** 21 | * 将地址与参数拼合,地址本身可以含有参数 22 | */ 23 | public static String combine(String url, List params) { 24 | HttpUrl.Builder builder = HttpUrl.parse(url).newBuilder(); 25 | if (params != null) { 26 | for (Param param : params) { 27 | builder.addQueryParameter(param.key, param.value); 28 | } 29 | } 30 | return builder.build().toString(); 31 | } 32 | 33 | 34 | /** 35 | * 生成queryString,如:a=b&c=d&e=f 36 | */ 37 | public static String getQueryString(List params) { 38 | StringBuilder paramString = new StringBuilder(""); 39 | if (params != null && params.size() > 0) { 40 | for (Param param : params) { 41 | if (Utils.isEmpty(param.key) || Utils.isEmpty(param.value)) { 42 | continue; 43 | } 44 | paramString.append(param.key).append("=").append(param.value).append("&"); 45 | } 46 | paramString.deleteCharAt(paramString.length() - 1); 47 | } 48 | return paramString.toString(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/Utils.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request; 2 | 3 | /** 4 | * Created by NashLegend on 16/9/1. 5 | */ 6 | 7 | public class Utils { 8 | 9 | /** 10 | * Returns true if the string is null or 0-length. 11 | * 12 | * @param str the string to be examined 13 | * @return true if str is null or zero length 14 | */ 15 | public static boolean isEmpty(CharSequence str) { 16 | if (str == null || str.length() == 0) { 17 | return true; 18 | } else { 19 | return false; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/api/SearchAPI.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.api; 2 | 3 | import net.nashlegend.sourcewall.model.SearchItem; 4 | import net.nashlegend.sourcewall.request.NetworkTask; 5 | import net.nashlegend.sourcewall.request.RequestBuilder; 6 | import net.nashlegend.sourcewall.request.RequestCallBack; 7 | import net.nashlegend.sourcewall.request.parsers.SearchListParser; 8 | 9 | import java.util.ArrayList; 10 | 11 | /** 12 | * Created by NashLegend on 16/3/15. 13 | */ 14 | public class SearchAPI { 15 | 16 | public static final String TYPE_ALL = "all"; 17 | public static final String TYPE_ARTICLE = "article"; 18 | public static final String TYPE_POST = "post"; 19 | public static final String TYPE_QUESTION = "question"; 20 | public static final String TYPE_BLOG = "blog"; 21 | 22 | /** 23 | * @param type 搜索内容类型 24 | * @param page 搜索第几页,从1开始 25 | * @param keyword 搜索的关键字 26 | * @return NetworkTask> 27 | */ 28 | public static NetworkTask> 29 | getSearchedItems(String type, int page, String keyword, 30 | RequestCallBack> callBack) { 31 | String url = "http://m.guokr.com/search/" + type + "/"; 32 | return new RequestBuilder>() 33 | .get() 34 | .url(url) 35 | .addParam("page", page) 36 | .addParam("wd", keyword) 37 | .withToken(false) 38 | .parser(new SearchListParser()) 39 | .callback(callBack) 40 | .requestAsync(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/cache/Utils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package net.nashlegend.sourcewall.request.cache; 18 | 19 | import android.os.Build; 20 | import android.os.Build.VERSION_CODES; 21 | 22 | /** 23 | * Class containing some static utility methods. 24 | */ 25 | public class Utils { 26 | private Utils() { 27 | } 28 | 29 | public static boolean hasFroyo() { 30 | return Build.VERSION.SDK_INT >= VERSION_CODES.FROYO; 31 | } 32 | 33 | public static boolean hasGingerbread() { 34 | return Build.VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD; 35 | } 36 | 37 | public static boolean hasHoneycomb() { 38 | return Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB; 39 | } 40 | 41 | public static boolean hasHoneycombMR1() { 42 | return Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB_MR1; 43 | } 44 | 45 | public static boolean hasJellyBean() { 46 | return Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN; 47 | } 48 | 49 | public static boolean hasKitKat() { 50 | return Build.VERSION.SDK_INT >= VERSION_CODES.KITKAT; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/interceptors/DownloadProgressInterceptor.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.interceptors; 2 | 3 | import net.nashlegend.sourcewall.request.RequestCallBack; 4 | 5 | import java.io.IOException; 6 | 7 | import okhttp3.Interceptor; 8 | import okhttp3.Response; 9 | 10 | /** 11 | * Created by NashLegend on 16/6/29. 12 | * 下载的Interceptor 13 | */ 14 | public class DownloadProgressInterceptor implements Interceptor { 15 | RequestCallBack callBack; 16 | 17 | public DownloadProgressInterceptor(RequestCallBack callBack) { 18 | this.callBack = callBack; 19 | } 20 | 21 | @Override 22 | public Response intercept(Chain chain) throws IOException { 23 | Response originalResponse = chain.proceed(chain.request()); 24 | //包装响应体并返回 25 | return originalResponse.newBuilder() 26 | .body(new ProgressResponseBody(originalResponse.body(), callBack)) 27 | .build(); 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/interceptors/SupplierInterceptor.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.interceptors; 2 | 3 | import net.nashlegend.sourcewall.request.RequestObject; 4 | 5 | import java.io.IOException; 6 | 7 | import okhttp3.Interceptor; 8 | import okhttp3.Request; 9 | import okhttp3.Response; 10 | 11 | /** 12 | * Created by NashLegend on 2016/10/31. 13 | */ 14 | 15 | public class SupplierInterceptor implements Interceptor { 16 | RequestObject requestObject; 17 | 18 | public SupplierInterceptor(RequestObject requestObject) { 19 | this.requestObject = requestObject; 20 | } 21 | 22 | @Override 23 | public Response intercept(Chain chain) throws IOException { 24 | Request.Builder newBuilder = chain.request().newBuilder(); 25 | if (requestObject.cacheControl != null) { 26 | newBuilder.cacheControl(requestObject.cacheControl); 27 | } 28 | if (requestObject.headers != null) { 29 | newBuilder.headers(requestObject.headers.build()); 30 | } 31 | if (requestObject.requestBody != null) { 32 | newBuilder.method(requestObject.method.value(), requestObject.requestBody); 33 | } 34 | return chain.proceed(newBuilder.build()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/interceptors/UploadProgressInterceptor.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.interceptors; 2 | 3 | import net.nashlegend.sourcewall.request.RequestCallBack; 4 | 5 | import java.io.IOException; 6 | 7 | import okhttp3.Interceptor; 8 | import okhttp3.Request; 9 | import okhttp3.Response; 10 | 11 | /** 12 | * Created by NashLegend on 16/6/29. 13 | * 上传的Interceptor 14 | */ 15 | public class UploadProgressInterceptor implements Interceptor { 16 | 17 | RequestCallBack callBack; 18 | 19 | public UploadProgressInterceptor(RequestCallBack callBack) { 20 | this.callBack = callBack; 21 | } 22 | 23 | @Override 24 | public Response intercept(Chain chain) throws IOException { 25 | Request originalRequest = chain.request(); 26 | ProgressRequestBody progressRequestBody = new ProgressRequestBody(originalRequest.body(), 27 | callBack); 28 | Request compressedRequest = originalRequest.newBuilder() 29 | .method(originalRequest.method(), progressRequestBody) 30 | .build(); 31 | return chain.proceed(compressedRequest); 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/interceptors/UserAgentInterceptor.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.interceptors; 2 | 3 | import static net.nashlegend.sourcewall.BuildConfig.VERSION_CODE; 4 | import static net.nashlegend.sourcewall.BuildConfig.VERSION_NAME; 5 | 6 | import java.io.IOException; 7 | 8 | import okhttp3.Interceptor; 9 | import okhttp3.Request; 10 | import okhttp3.Response; 11 | 12 | /** 13 | * Created by NashLegend on 16/6/29. 14 | */ 15 | public class UserAgentInterceptor implements Interceptor { 16 | 17 | volatile private static String userAgent = null; 18 | 19 | synchronized public static void resetUserAgent() { 20 | userAgent = null; 21 | } 22 | 23 | /** 24 | * 返回默认的UserAgent 25 | */ 26 | private String getDefaultUserAgent() { 27 | if (userAgent == null) { 28 | synchronized (UserAgentInterceptor.class) { 29 | if (userAgent == null) { 30 | userAgent = "SourceWall/" + VERSION_NAME + "(" + VERSION_CODE + ")"; 31 | } 32 | } 33 | } 34 | return userAgent; 35 | } 36 | 37 | @Override 38 | public Response intercept(Chain chain) throws IOException { 39 | Request request = chain.request().newBuilder() 40 | .header("User-Agent", getDefaultUserAgent()) 41 | .build(); 42 | return chain.proceed(request); 43 | } 44 | } -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/AnswerCommentListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class AnswerCommentListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String response, 18 | ResponseObject> responseObject) throws Exception { 19 | JSONArray comments = JsonHandler.getUniversalJsonArray(response, responseObject); 20 | ArrayList list = new ArrayList<>(); 21 | assert comments != null; 22 | for (int i = 0; i < comments.length(); i++) { 23 | JSONObject jsonObject = comments.getJSONObject(i); 24 | UComment comment = UComment.fromAnswerJson(jsonObject); 25 | list.add(comment); 26 | } 27 | return list; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/AnswerCommentParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by NashLegend on 16/5/2. 11 | */ 12 | public class AnswerCommentParser implements Parser { 13 | @Override 14 | public UComment parse(String response, ResponseObject responseObject) 15 | throws Exception { 16 | JSONObject jsonObject = JsonHandler.getUniversalJsonObject(response, responseObject); 17 | return UComment.fromAnswerJson(jsonObject); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/AnswerListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Answer; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class AnswerListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String response, 18 | ResponseObject> responseObject) throws Exception { 19 | ArrayList answers = new ArrayList<>(); 20 | JSONArray comments = JsonHandler.getUniversalJsonArray(response, responseObject); 21 | for (int i = 0; i < comments.length(); i++) { 22 | JSONObject jo = comments.getJSONObject(i); 23 | Answer ans = Answer.fromListJson(jo); 24 | answers.add(ans); 25 | } 26 | return answers; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/AnswerParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import static net.nashlegend.sourcewall.request.JsonHandler.getUniversalJsonObject; 4 | 5 | import net.nashlegend.sourcewall.model.Answer; 6 | import net.nashlegend.sourcewall.request.ResponseObject; 7 | 8 | /** 9 | * Created by NashLegend on 16/7/8. 10 | */ 11 | 12 | public class AnswerParser implements Parser { 13 | @Override 14 | public Answer parse(String str, ResponseObject responseObject) throws Exception { 15 | return Answer.fromJson(getUniversalJsonObject(str, responseObject)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ArticleCommentListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/7/8. 14 | */ 15 | 16 | public class ArticleCommentListParser implements Parser> { 17 | 18 | int offset = 0; 19 | String id = ""; 20 | 21 | public ArticleCommentListParser(int offset, String id) { 22 | this.offset = offset; 23 | this.id = id; 24 | } 25 | 26 | @Override 27 | public ArrayList parse(String response, 28 | ResponseObject> responseObject) throws Exception { 29 | ArrayList list = new ArrayList<>(); 30 | JSONArray articles = JsonHandler.getUniversalJsonArray(response, responseObject); 31 | if (articles != null) { 32 | for (int i = 0; i < articles.length(); i++) { 33 | JSONObject jo = articles.getJSONObject(i); 34 | UComment comment = UComment.fromArticleJson(id, "", jo); 35 | comment.setFloor((offset + i + 1) + "楼"); 36 | list.add(comment); 37 | } 38 | } 39 | return list; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ArticleCommentParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by NashLegend on 16/7/8. 11 | */ 12 | 13 | public class ArticleCommentParser implements Parser { 14 | @Override 15 | public UComment parse(String response, ResponseObject responseObject) 16 | throws Exception { 17 | JSONObject replyObject = JsonHandler.getUniversalJsonObject(response, responseObject); 18 | return UComment.fromArticleJson(replyObject); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ArticleHtmlParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Article; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | /** 7 | * Created by NashLegend on 16/7/8. 8 | */ 9 | 10 | public class ArticleHtmlParser implements Parser
{ 11 | String id = ""; 12 | 13 | public ArticleHtmlParser(String id) { 14 | this.id = id; 15 | } 16 | 17 | @Override 18 | public Article parse(String response, ResponseObject
responseObject) throws Exception { 19 | Article article = Article.fromHtmlDetail(id, response); 20 | responseObject.ok = true; 21 | return article; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ArticleListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Article; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class ArticleListParser implements Parser> { 16 | @Override 17 | public ArrayList
parse(String jString, 18 | ResponseObject> responseObject) throws Exception { 19 | ArrayList
articleList = new ArrayList<>(); 20 | JSONArray articles = JsonHandler.getUniversalJsonArray(jString, responseObject); 21 | assert articles != null; 22 | for (int i = 0; i < articles.length(); i++) { 23 | JSONObject jo = articles.getJSONObject(i); 24 | articleList.add(Article.fromJsonSimple(jo)); 25 | } 26 | return articleList; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/BasketListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Basket; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | 9 | import java.util.ArrayList; 10 | 11 | /** 12 | * Created by NashLegend on 16/7/8. 13 | */ 14 | 15 | public class BasketListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String response, 18 | ResponseObject> responseObject) throws Exception { 19 | JSONArray jsonArray = JsonHandler.getUniversalJsonArray(response, responseObject); 20 | if (jsonArray == null) throw new NullPointerException("basket list is null"); 21 | ArrayList baskets = new ArrayList<>(); 22 | for (int i = 0; i < jsonArray.length(); i++) { 23 | Basket basket = Basket.fromJson(jsonArray.getJSONObject(i)); 24 | baskets.add(basket); 25 | } 26 | return baskets; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/BasketParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Basket; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | /** 8 | * Created by NashLegend on 16/7/8. 9 | */ 10 | 11 | public class BasketParser implements Parser { 12 | @Override 13 | public Basket parse(String response, ResponseObject responseObject) throws Exception { 14 | return Basket.fromJson(JsonHandler.getUniversalJsonObject(response, responseObject)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/BooleanParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | /** 7 | * Created by NashLegend on 2015/10/6 0006. 8 | * 简单的判断是否返回code为0,只要是0,就会进入onResponse,否则进入onFailure. 9 | * 因此onResponse处肯定为true 10 | */ 11 | public class BooleanParser implements Parser { 12 | @Override 13 | public Boolean parse(String str, ResponseObject responseObject) throws Exception { 14 | return JsonHandler.getUniversalJsonSimpleBoolean(str, responseObject); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/CategoryListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Category; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/7/8. 14 | */ 15 | 16 | public class CategoryListParser implements Parser> { 17 | @Override 18 | public ArrayList parse(String str, ResponseObject> responseObject) 19 | throws Exception { 20 | JSONArray jsonArray = JsonHandler.getUniversalJsonArray(str, responseObject); 21 | ArrayList categories = new ArrayList<>(); 22 | assert jsonArray != null; 23 | for (int i = 0; i < jsonArray.length(); i++) { 24 | JSONObject subObject = jsonArray.getJSONObject(i); 25 | categories.add(Category.fromJson(subObject)); 26 | } 27 | return categories; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ContentBooleanParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | /** 7 | * Created by NashLegend on 2015/10/26 0026. 8 | */ 9 | public class ContentBooleanParser implements Parser { 10 | @Override 11 | public Boolean parse(String str, ResponseObject responseObject) throws Exception { 12 | String db = JsonHandler.getUniversalJsonSimpleString(str, responseObject); 13 | return Boolean.valueOf(db); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ContentNumberParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | /** 7 | * Created by NashLegend on 2015/10/13 0013. 8 | * 返回一个json 的数字 9 | */ 10 | public class ContentNumberParser implements Parser { 11 | 12 | @Override 13 | public Double parse(String str, ResponseObject responseObject) throws Exception { 14 | String db = JsonHandler.getUniversalJsonSimpleString(str, responseObject); 15 | return Double.valueOf(db); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ContentStringParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | /** 7 | * Created by NashLegend on 2015/10/13 0013. 8 | * 返回一个json 的string content 9 | */ 10 | public class ContentStringParser implements Parser { 11 | @Override 12 | public String parse(String str, ResponseObject responseObject) throws Exception { 13 | return JsonHandler.getUniversalJsonSimpleString(str, responseObject); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ContentValueForKeyParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | import org.json.JSONObject; 7 | 8 | /** 9 | * Created by NashLegend on 2015/10/13 0013. 10 | * 返回一个content json 的String值 11 | */ 12 | public class ContentValueForKeyParser implements Parser { 13 | 14 | private String key = "ContentValueForKeyParser"; 15 | 16 | public ContentValueForKeyParser(String key) { 17 | this.key = key; 18 | } 19 | 20 | @Override 21 | public String parse(String str, ResponseObject responseObject) throws Exception { 22 | JSONObject jsonObject = JsonHandler.getUniversalJsonObject(str, responseObject); 23 | if (jsonObject != null) { 24 | return jsonObject.getString(key); 25 | } else { 26 | responseObject.ok = false; 27 | return null; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/FavorListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Favor; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class FavorListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String jString, ResponseObject> responseObject) 18 | throws Exception { 19 | ArrayList articleList = new ArrayList<>(); 20 | JSONArray favors = JsonHandler.getUniversalJsonArray(jString, responseObject); 21 | assert favors != null; 22 | for (int i = 0; i < favors.length(); i++) { 23 | JSONObject jo = favors.getJSONObject(i); 24 | articleList.add(Favor.fromJson(jo)); 25 | } 26 | return articleList; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/GroupListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.SubItem; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/7/8. 14 | */ 15 | 16 | public class GroupListParser implements Parser> { 17 | @Override 18 | public ArrayList parse(String response, 19 | ResponseObject> responseObject) throws Exception { 20 | ArrayList list = new ArrayList<>(); 21 | JSONArray subItems = JsonHandler.getUniversalJsonArray(response, responseObject); 22 | assert subItems != null; 23 | for (int i = 0; i < subItems.length(); i++) { 24 | JSONObject jo = subItems.getJSONObject(i).optJSONObject("group"); 25 | SubItem subItem = new SubItem(SubItem.Section_Post, SubItem.Type_Single_Channel, 26 | jo.optString("name"), jo.optString("id")); 27 | list.add(subItem); 28 | } 29 | return list; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/IgnoreNoticeParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Notice; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class IgnoreNoticeParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String response, 18 | ResponseObject> responseObject) throws Exception { 19 | JSONObject nObject = JsonHandler.getUniversalJsonObject(response, responseObject); 20 | JSONArray notices = JsonHandler.getJsonArraySafely(nObject, "list"); 21 | if (notices == null) throw new NullPointerException("notices is null"); 22 | ArrayList noticeList = new ArrayList<>(); 23 | for (int i = 0; i < notices.length(); i++) { 24 | JSONObject noticesObject = notices.getJSONObject(i); 25 | Notice notice = Notice.fromJson(noticesObject); 26 | noticeList.add(notice); 27 | } 28 | return noticeList; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ImageUploadParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | import org.json.JSONObject; 7 | 8 | /** 9 | * Created by NashLegend on 16/7/8. 10 | */ 11 | 12 | public class ImageUploadParser implements Parser { 13 | @Override 14 | public String parse(String response, ResponseObject responseObject) throws Exception { 15 | JSONObject object = JsonHandler.getUniversalJsonObject(response, responseObject); 16 | if (object != null) { 17 | return object.getString("url"); 18 | } else { 19 | responseObject.ok = false; 20 | return ""; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/JsonArrayParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | import org.json.JSONArray; 7 | import org.json.JSONException; 8 | 9 | /** 10 | * Created by NashLegend on 2015/9/23 0023. 11 | */ 12 | public class JsonArrayParser implements Parser { 13 | @Override 14 | public JSONArray parse(String str, ResponseObject responseObject) throws 15 | JSONException { 16 | return JsonHandler.getUniversalJsonArray(str, responseObject); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/JsonObjectParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.JsonHandler; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | import org.json.JSONException; 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by NashLegend on 2015/9/23 0023. 11 | */ 12 | public class JsonObjectParser implements Parser { 13 | @Override 14 | public JSONObject parse(String str, ResponseObject responseObject) throws 15 | JSONException { 16 | return JsonHandler.getUniversalJsonObject(str, responseObject); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/MessageListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Message; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class MessageListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String str, ResponseObject> responseObject) 18 | throws Exception { 19 | JSONArray notices = JsonHandler.getUniversalJsonArray(str, responseObject); 20 | ArrayList noticeList = new ArrayList<>(); 21 | assert notices != null; 22 | for (int i = 0; i < notices.length(); i++) { 23 | JSONObject noticesObject = notices.getJSONObject(i); 24 | Message message = Message.fromJson(noticesObject); 25 | noticeList.add(message); 26 | } 27 | return noticeList; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/MessageParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Message; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by NashLegend on 16/7/8. 11 | */ 12 | 13 | public class MessageParser implements Parser { 14 | @Override 15 | public Message parse(String str, ResponseObject responseObject) throws Exception { 16 | JSONObject noticesObject = JsonHandler.getUniversalJsonObject(str, responseObject); 17 | return Message.fromJson(noticesObject); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/NoticeListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Notice; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class NoticeListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String response, 18 | ResponseObject> responseObject) throws Exception { 19 | JSONArray notices = JsonHandler.getUniversalJsonArray(response, responseObject); 20 | if (notices == null) throw new NullPointerException("notices is null"); 21 | ArrayList noticeList = new ArrayList<>(); 22 | for (int i = 0; i < notices.length(); i++) { 23 | JSONObject noticesObject = notices.getJSONObject(i); 24 | Notice notice = Notice.fromJson(noticesObject); 25 | noticeList.add(notice); 26 | } 27 | return noticeList; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/Parser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | /** 7 | * Created by NashLegend on 2015/9/23 0023. 8 | */ 9 | public interface Parser { 10 | T parse(String response, ResponseObject responseObject) throws Exception; 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/PostCommentListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/7/8. 14 | */ 15 | 16 | public class PostCommentListParser implements Parser> { 17 | 18 | @Override 19 | public ArrayList parse(String response, 20 | ResponseObject> responseObject) throws Exception { 21 | ArrayList list = new ArrayList<>(); 22 | JSONArray comments = JsonHandler.getUniversalJsonArray(response, responseObject); 23 | assert comments != null; 24 | for (int i = 0; i < comments.length(); i++) { 25 | JSONObject jo = comments.getJSONObject(i); 26 | UComment comment = UComment.fromPostJson(jo); 27 | list.add(comment); 28 | } 29 | return list; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/PostCommentParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by NashLegend on 16/7/8. 11 | */ 12 | 13 | public class PostCommentParser implements Parser { 14 | @Override 15 | public UComment parse(String response, ResponseObject responseObject) 16 | throws Exception { 17 | JSONObject replyObject = JsonHandler.getUniversalJsonObject(response, responseObject); 18 | return UComment.fromPostJson(replyObject); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/PostListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Post; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class PostListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String jString, ResponseObject> responseObject) 18 | throws Exception { 19 | ArrayList list = new ArrayList<>(); 20 | JSONArray articles = JsonHandler.getUniversalJsonArray(jString, responseObject); 21 | assert articles != null; 22 | for (int i = 0; i < articles.length(); i++) { 23 | JSONObject jo = articles.getJSONObject(i); 24 | Post post = Post.fromJson(jo); 25 | // 无法获取titleImageUrl,也用不着,太TMD费流量了 26 | list.add(post); 27 | } 28 | return list; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/PostParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Post; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by NashLegend on 16/5/2. 11 | */ 12 | public class PostParser implements Parser { 13 | @Override 14 | public Post parse(String jString, ResponseObject responseObject) throws Exception { 15 | JSONObject postResult = JsonHandler.getUniversalJsonObject(jString, responseObject); 16 | return Post.fromJson(postResult); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/PublishPostParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.ResponseObject; 4 | 5 | import org.jsoup.Jsoup; 6 | import org.jsoup.nodes.Document; 7 | 8 | import java.util.regex.Matcher; 9 | import java.util.regex.Pattern; 10 | 11 | /** 12 | * Created by NashLegend on 16/7/8. 13 | */ 14 | 15 | public class PublishPostParser implements Parser { 16 | @Override 17 | public String parse(String response, ResponseObject responseObject) throws Exception { 18 | try { 19 | Document document = Jsoup.parse(response); 20 | String url = document.getElementsByTag("a").get(0).text(); 21 | Matcher matcher = Pattern.compile("/post/(\\d+)/").matcher(url); 22 | responseObject.ok = matcher.find(); 23 | if (responseObject.ok) { 24 | return matcher.group(1); 25 | } else { 26 | return ""; 27 | } 28 | } catch (Exception e) { 29 | if (response.contains("Redirecting")) { 30 | responseObject.ok = true; 31 | return ""; 32 | } else { 33 | throw e; 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/QuestionCommentListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class QuestionCommentListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String response, 18 | ResponseObject> responseObject) throws Exception { 19 | JSONArray comments = JsonHandler.getUniversalJsonArray(response, responseObject); 20 | ArrayList list = new ArrayList<>(); 21 | assert comments != null; 22 | for (int i = 0; i < comments.length(); i++) { 23 | JSONObject jsonObject = comments.getJSONObject(i); 24 | UComment comment = UComment.fromQuestionJson(jsonObject); 25 | list.add(comment); 26 | } 27 | return list; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/QuestionCommentParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UComment; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONObject; 8 | 9 | /** 10 | * Created by NashLegend on 16/5/2. 11 | */ 12 | public class QuestionCommentParser implements Parser { 13 | @Override 14 | public UComment parse(String response, ResponseObject responseObject) 15 | throws Exception { 16 | JSONObject jsonObject = JsonHandler.getUniversalJsonObject(response, responseObject); 17 | return UComment.fromQuestionJson(jsonObject); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/QuestionHtmlListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Question; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | import java.util.ArrayList; 7 | 8 | /** 9 | * Created by NashLegend on 16/5/2. 10 | */ 11 | public class QuestionHtmlListParser implements Parser> { 12 | @Override 13 | public ArrayList parse(String response, 14 | ResponseObject> responseObject) throws Exception { 15 | ArrayList questions = Question.fromHtmlList(response); 16 | responseObject.ok = true; 17 | return questions; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/QuestionListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Question; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | import java.util.ArrayList; 11 | 12 | /** 13 | * Created by NashLegend on 16/5/2. 14 | */ 15 | public class QuestionListParser implements Parser> { 16 | @Override 17 | public ArrayList parse(String response, 18 | ResponseObject> responseObject) throws Exception { 19 | ArrayList questions = new ArrayList<>(); 20 | JSONArray results = JsonHandler.getUniversalJsonArray(response, responseObject); 21 | assert results != null; 22 | for (int i = 0; i < results.length(); i++) { 23 | JSONObject jsonObject; 24 | Object object = results.get(i); 25 | if (object instanceof JSONObject) { 26 | jsonObject = (JSONObject) object; 27 | } else { 28 | continue; 29 | } 30 | Question question = Question.fromJson(jsonObject); 31 | questions.add(question); 32 | } 33 | return questions; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/QuestionParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import static net.nashlegend.sourcewall.request.JsonHandler.getUniversalJsonObject; 4 | 5 | import net.nashlegend.sourcewall.model.Question; 6 | import net.nashlegend.sourcewall.request.ResponseObject; 7 | 8 | /** 9 | * Created by NashLegend on 16/7/8. 10 | */ 11 | 12 | public class QuestionParser implements Parser { 13 | @Override 14 | public Question parse(String str, ResponseObject responseObject) throws Exception { 15 | return Question.fromJson(getUniversalJsonObject(str, responseObject)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ReminderListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Reminder; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | 9 | import java.util.ArrayList; 10 | 11 | /** 12 | * Created by NashLegend on 16/5/2. 13 | */ 14 | public class ReminderListParser implements Parser> { 15 | @Override 16 | public ArrayList parse(String str, ResponseObject> responseObject) 17 | throws Exception { 18 | JSONArray reminders = JsonHandler.getUniversalJsonArray(str, responseObject); 19 | if (reminders == null) throw new NullPointerException("reminders is null"); 20 | ArrayList noticeList = new ArrayList<>(); 21 | for (int i = 0; i < reminders.length(); i++) { 22 | noticeList.add(Reminder.fromJson(reminders.getJSONObject(i))); 23 | } 24 | return noticeList; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/ReminderNoticeNumParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.ReminderNoticeNum; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | /** 8 | * Created by NashLegend on 16/5/2. 9 | */ 10 | public class ReminderNoticeNumParser implements Parser { 11 | @Override 12 | public ReminderNoticeNum parse(String jString, ResponseObject responseObject) 13 | throws Exception { 14 | return ReminderNoticeNum.fromJson( 15 | JsonHandler.getUniversalJsonObject(jString, responseObject)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/SearchListParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.SearchItem; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | import org.jsoup.Jsoup; 7 | import org.jsoup.nodes.Document; 8 | import org.jsoup.nodes.Element; 9 | import org.jsoup.select.Elements; 10 | 11 | import java.util.ArrayList; 12 | 13 | /** 14 | * Created by NashLegend on 16/5/2. 15 | */ 16 | public class SearchListParser implements Parser> { 17 | @Override 18 | public ArrayList parse(String jString, 19 | ResponseObject> responseObject) throws Exception { 20 | Document document = Jsoup.parse(jString); 21 | Elements elements = document.getElementsByClass("title-detail"); 22 | ArrayList searchItemArrayList = new ArrayList<>(); 23 | for (Element element : elements) { 24 | searchItemArrayList.add(SearchItem.fromHtml(element)); 25 | } 26 | responseObject.ok = true; 27 | return searchItemArrayList; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/SimpleArticleParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.Article; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | import org.json.JSONArray; 8 | import org.json.JSONObject; 9 | 10 | /** 11 | * Created by NashLegend on 16/7/8. 12 | */ 13 | 14 | public class SimpleArticleParser implements Parser
{ 15 | @Override 16 | public Article parse(String response, ResponseObject
responseObject) throws Exception { 17 | JSONArray articlesArray = JsonHandler.getUniversalJsonArray(response, responseObject); 18 | if (articlesArray == null) throw new NullPointerException("articlesArray is null"); 19 | JSONObject articleObject = articlesArray.getJSONObject(0); 20 | return Article.fromJsonSimple(articleObject); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/StringParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.request.ResponseObject; 4 | 5 | /** 6 | * Created by NashLegend on 2015/9/23 0023. 7 | * 啥也不干,原样返回http的response 8 | */ 9 | public class StringParser implements Parser { 10 | 11 | @Override 12 | public String parse(String str, ResponseObject responseObject) throws Exception { 13 | responseObject.ok = true; 14 | return str; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/UpdateInfoParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UpdateInfo; 4 | import net.nashlegend.sourcewall.request.ResponseObject; 5 | 6 | import org.json.JSONObject; 7 | 8 | /** 9 | * Created by NashLegend on 2015/10/26 0026. 10 | */ 11 | public class UpdateInfoParser implements Parser { 12 | @Override 13 | public UpdateInfo parse(String str, ResponseObject responseObject) 14 | throws Exception { 15 | UpdateInfo info = UpdateInfo.fromJson(new JSONObject(str)); 16 | responseObject.ok = true; 17 | return info; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/request/parsers/UserInfoParser.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.request.parsers; 2 | 3 | import net.nashlegend.sourcewall.model.UserInfo; 4 | import net.nashlegend.sourcewall.request.JsonHandler; 5 | import net.nashlegend.sourcewall.request.ResponseObject; 6 | 7 | /** 8 | * Created by NashLegend on 16/7/8. 9 | */ 10 | 11 | public class UserInfoParser implements Parser { 12 | @Override 13 | public UserInfo parse(String response, ResponseObject responseObject) 14 | throws Exception { 15 | return UserInfo.fromJson(JsonHandler.getUniversalJsonObject(response, responseObject)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/simple/SimpleAnimationListener.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.simple; 2 | 3 | import android.animation.Animator; 4 | 5 | /** 6 | * Created by NashLegend on 16/7/15. 7 | */ 8 | 9 | public class SimpleAnimationListener implements Animator.AnimatorListener { 10 | @Override 11 | public void onAnimationStart(Animator animation) { 12 | 13 | } 14 | 15 | @Override 16 | public void onAnimationEnd(Animator animation) { 17 | 18 | } 19 | 20 | @Override 21 | public void onAnimationCancel(Animator animation) { 22 | 23 | } 24 | 25 | @Override 26 | public void onAnimationRepeat(Animator animation) { 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/simple/SimpleSubscriber.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.simple; 2 | 3 | import net.nashlegend.sourcewall.util.ErrorUtils; 4 | 5 | import rx.Subscriber; 6 | 7 | /** 8 | * Created by NashLegend on 16/9/10. 9 | */ 10 | 11 | public abstract class SimpleSubscriber extends Subscriber { 12 | @Override 13 | public void onCompleted() { 14 | 15 | } 16 | 17 | @Override 18 | public void onError(Throwable e) { 19 | ErrorUtils.onException(e); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/util/IOUtil.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.util; 2 | 3 | import java.io.Closeable; 4 | 5 | /** 6 | * Created by NashLegend on 2016/10/28. 7 | */ 8 | 9 | public class IOUtil { 10 | public static boolean closeQuietly(Closeable closeable) { 11 | try { 12 | closeable.close(); 13 | return true; 14 | } catch (Exception e) { 15 | ErrorUtils.onException(e); 16 | return false; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/util/ImageSizeMap.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.util; 2 | 3 | import android.graphics.Point; 4 | import android.text.TextUtils; 5 | 6 | import java.util.HashMap; 7 | 8 | /** 9 | * Created by NashLegend on 2015/3/30 0030 10 | */ 11 | public class ImageSizeMap { 12 | 13 | private static final HashMap BitmapSizes = new HashMap<>(); 14 | 15 | public static void put(String source, int width, int height) { 16 | put(source, new Point(width, height)); 17 | } 18 | 19 | public static void put(String source, Point point) { 20 | if (!TextUtils.isEmpty(source) && point != null && point.x > 0 && point.y > 0) { 21 | BitmapSizes.put(source, point); 22 | } 23 | } 24 | 25 | public static Point get(String source) { 26 | return BitmapSizes.get(source); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/util/RegUtil.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.util; 2 | 3 | import android.text.Html; 4 | 5 | /** 6 | * Created by NashLegend on 2014/9/15 0015 7 | */ 8 | public class RegUtil { 9 | 10 | public static final String OBJ = String.valueOf((char) 65532); 11 | 12 | public static String tryGetStringByLength(String str, int len) { 13 | if (str.length() > len) { 14 | return str.substring(0, len) + "..."; 15 | } else { 16 | return str; 17 | } 18 | } 19 | 20 | public static String clearHtmlByTag(String content, String tag) { 21 | return content.replaceAll("<" + tag + ">" + ".*?" + "", ""); 22 | } 23 | 24 | public static String clearHtmlBlockQuote(String content) { 25 | return clearHtmlByTag(content, "blockquote"); 26 | } 27 | 28 | /** 29 | * Html转纯文本无格式不带换行,但是保留图片标签 30 | */ 31 | public static String html2PlainTextWithImageTag(String content) { 32 | return Html.fromHtml( 33 | content.replaceAll("|.*?", "[图片]")).toString().replaceAll( 34 | OBJ, "[图片]").replaceAll("\n", ""); 35 | } 36 | 37 | /** 38 | * Html转纯文本无格式不带换行 39 | */ 40 | public static String html2PlainText(String content) { 41 | return Html.fromHtml(content).toString().replaceAll(OBJ, "[图片]").replaceAll("\n", ""); 42 | } 43 | 44 | /** 45 | * Html转纯文本无格式不带换行除去引用块 46 | */ 47 | public static String html2PlainTextWithoutBlockQuote(String content) { 48 | return html2PlainText(clearHtmlBlockQuote(content)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/util/TextUtil.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.util; 2 | 3 | /** 4 | * Created by Pan on 2016/10/15. 5 | */ 6 | 7 | public class TextUtil { 8 | public static boolean isAlphabetic(char c) { 9 | return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/util/Utils.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.util; 2 | 3 | /** 4 | * Created by NashLegend on 16/9/6. 5 | */ 6 | 7 | public class Utils { 8 | public static boolean equals(Object a, Object b) { 9 | return (a == b) || (a != null && a.equals(b)); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/AceView.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.FrameLayout; 6 | 7 | import net.nashlegend.sourcewall.model.AceModel; 8 | 9 | /** 10 | * Created by NashLegend on 2014/9/19 0019 11 | */ 12 | public abstract class AceView extends FrameLayout { 13 | 14 | public AceView(Context context) { 15 | super(context); 16 | } 17 | 18 | public AceView(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | } 21 | 22 | public AceView(Context context, AttributeSet attrs, int defStyle) { 23 | super(context, attrs, defStyle); 24 | } 25 | 26 | public abstract void setData(T t); 27 | 28 | public abstract T getData(); 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/FavorListItemView.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.LayoutInflater; 6 | import android.widget.TextView; 7 | 8 | import net.nashlegend.sourcewall.R; 9 | import net.nashlegend.sourcewall.model.Favor; 10 | 11 | import butterknife.BindView; 12 | import butterknife.ButterKnife; 13 | 14 | /** 15 | * Created by NashLegend on 2014/9/15 0015 16 | */ 17 | public class FavorListItemView extends AceView { 18 | 19 | @BindView(R.id.text_title) 20 | TextView title; 21 | @BindView(R.id.text_date) 22 | TextView textDate; 23 | 24 | private Favor mFavor; 25 | 26 | public FavorListItemView(Context context) { 27 | super(context); 28 | LayoutInflater inflater = (LayoutInflater) context.getSystemService( 29 | Context.LAYOUT_INFLATER_SERVICE); 30 | inflater.inflate(R.layout.layout_favor_item_view, this); 31 | ButterKnife.bind(this); 32 | } 33 | 34 | public FavorListItemView(Context context, AttributeSet attrs) { 35 | super(context, attrs); 36 | } 37 | 38 | public FavorListItemView(Context context, AttributeSet attrs, int defStyle) { 39 | super(context, attrs, defStyle); 40 | } 41 | 42 | @Override 43 | public void setData(Favor model) { 44 | mFavor = model; 45 | title.setText(mFavor.getTitle()); 46 | textDate.setText(mFavor.getCreateTime()); 47 | } 48 | 49 | @Override 50 | public Favor getData() { 51 | return mFavor; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/GroupItemView.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.widget.TextView; 6 | 7 | import net.nashlegend.sourcewall.R; 8 | import net.nashlegend.sourcewall.model.SubItem; 9 | 10 | /** 11 | * Created by NashLegend on 2014/10/31 0031 12 | */ 13 | public class GroupItemView extends AceView { 14 | private SubItem item; 15 | private TextView textView; 16 | 17 | public GroupItemView(Context context) { 18 | super(context); 19 | LayoutInflater inflater = (LayoutInflater) context.getSystemService( 20 | Context.LAYOUT_INFLATER_SERVICE); 21 | inflater.inflate(R.layout.layout_group_item_view, this); 22 | textView = (TextView) findViewById(R.id.text_subitem); 23 | } 24 | 25 | @Override 26 | public void setData(SubItem subItem) { 27 | item = subItem; 28 | textView.setText(item.getName()); 29 | } 30 | 31 | @Override 32 | public SubItem getData() { 33 | return item; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/SubItemView.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.widget.TextView; 6 | 7 | import net.nashlegend.sourcewall.R; 8 | import net.nashlegend.sourcewall.model.SubItem; 9 | 10 | /** 11 | * 左侧栏目名的view 12 | * Created by NashLegend on 2014/10/31 0031 13 | */ 14 | public class SubItemView extends AceView { 15 | private SubItem item; 16 | private TextView textView; 17 | 18 | public SubItemView(Context context) { 19 | super(context); 20 | LayoutInflater inflater = (LayoutInflater) context.getSystemService( 21 | Context.LAYOUT_INFLATER_SERVICE); 22 | inflater.inflate(R.layout.layout_subitem_view, this); 23 | textView = (TextView) findViewById(R.id.text_subitem); 24 | } 25 | 26 | public SubItem getSubItem() { 27 | return item; 28 | } 29 | 30 | @Override 31 | public void setData(SubItem subItem) { 32 | item = subItem; 33 | textView.setText(item.getName()); 34 | } 35 | 36 | @Override 37 | public SubItem getData() { 38 | return item; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/AdaptivePager.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common; 2 | 3 | import android.content.Context; 4 | import android.support.v4.view.ViewPager; 5 | import android.util.AttributeSet; 6 | import android.view.MotionEvent; 7 | 8 | import net.nashlegend.sourcewall.util.ErrorUtils; 9 | 10 | /** 11 | * Created by NashLegend on 2015/10/16 0016. 12 | */ 13 | public class AdaptivePager extends ViewPager { 14 | public AdaptivePager(Context context) { 15 | super(context); 16 | } 17 | 18 | public AdaptivePager(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | } 21 | 22 | @Override 23 | public boolean onTouchEvent(MotionEvent ev) { 24 | try { 25 | return super.onTouchEvent(ev); 26 | } catch (IllegalArgumentException ex) { 27 | ErrorUtils.onException(ex); 28 | } 29 | return false; 30 | } 31 | 32 | @Override 33 | public boolean onInterceptTouchEvent(MotionEvent ev) { 34 | try { 35 | return super.onInterceptTouchEvent(ev); 36 | } catch (IllegalArgumentException ex) { 37 | ErrorUtils.onException(ex); 38 | } 39 | return false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/ScaledImage/ImageViewState.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 David Morrissey 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package net.nashlegend.sourcewall.view.common.ScaledImage; 18 | 19 | import android.graphics.PointF; 20 | 21 | import java.io.Serializable; 22 | 23 | /** 24 | * Wraps the scale, center and orientation of a displayed image for easy restoration on screen 25 | * rotate. 26 | */ 27 | public class ImageViewState implements Serializable { 28 | 29 | private float scale; 30 | 31 | private float centerX; 32 | 33 | private float centerY; 34 | 35 | private int orientation; 36 | 37 | public ImageViewState(float scale, PointF center, int orientation) { 38 | this.scale = scale; 39 | this.centerX = center.x; 40 | this.centerY = center.y; 41 | this.orientation = orientation; 42 | } 43 | 44 | public float getScale() { 45 | return scale; 46 | } 47 | 48 | public PointF getCenter() { 49 | return new PointF(centerX, centerY); 50 | } 51 | 52 | public int getOrientation() { 53 | return orientation; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/ScaledImage/decoder/CompatDecoderFactory.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common.ScaledImage.decoder; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | /** 6 | * Compatibility factory to instantiate decoders with empty public constructors. 7 | * 8 | * @param The base type of the decoder this factory will produce. 9 | */ 10 | public class CompatDecoderFactory implements DecoderFactory { 11 | private Class clazz; 12 | 13 | public CompatDecoderFactory(@NonNull Class clazz) { 14 | this.clazz = clazz; 15 | } 16 | 17 | @Override 18 | public T make() throws IllegalAccessException, InstantiationException { 19 | return clazz.newInstance(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/ScaledImage/decoder/DecoderFactory.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common.ScaledImage.decoder; 2 | 3 | /** 4 | * Interface for decoder (and region decoder) factories. 5 | * 6 | * @param the class of decoder that will be produced. 7 | */ 8 | public interface DecoderFactory { 9 | /** 10 | * Produce a new instance of a decoder with type {@link T}. 11 | * 12 | * @return a new instance of your decoder. 13 | */ 14 | T make() throws IllegalAccessException, InstantiationException; 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/ScaledImage/decoder/ImageDecoder.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common.ScaledImage.decoder; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import android.net.Uri; 6 | 7 | /** 8 | * Interface for image decoding classes, allowing the default {@link 9 | * android.graphics.BitmapRegionDecoder} 10 | * based on the Skia library to be replaced with a custom class. 11 | */ 12 | public interface ImageDecoder { 13 | 14 | /** 15 | * Decode an image. When possible, initial setup work once in this method. This method 16 | * must return the dimensions of the image. The URI can be in one of the following formats: 17 | * File: file:///scard/picture.jpg 18 | * Asset: file:///android_asset/picture.png 19 | * Resource: android.resource://com.example.app/drawable/picture 20 | * 21 | * @param context Application context. A reference may be held, but must be cleared on recycle. 22 | * @param uri URI of the image. 23 | * @return Dimensions of the image. 24 | * @throws Exception if initialisation fails. 25 | */ 26 | Bitmap decode(Context context, Uri uri) throws Exception; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/ScalingImage.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.NonNull; 5 | import android.util.AttributeSet; 6 | import android.view.MotionEvent; 7 | 8 | import net.nashlegend.sourcewall.view.common.ScaledImage.SubsamplingScaleImageView; 9 | 10 | /** 11 | * Created by NashLegend on 2015/10/20 0020. 12 | */ 13 | public class ScalingImage extends SubsamplingScaleImageView { 14 | public ScalingImage(Context context, AttributeSet attr) { 15 | super(context, attr); 16 | } 17 | 18 | public ScalingImage(Context context) { 19 | super(context); 20 | } 21 | 22 | @Override 23 | public boolean onTouchEvent(@NonNull MotionEvent event) { 24 | try { 25 | return super.onTouchEvent(event); 26 | } catch (Exception e) { 27 | return false; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/shuffle/AskTagMovableButton.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common.shuffle; 2 | 3 | import android.content.Context; 4 | 5 | import net.nashlegend.sourcewall.data.database.gen.AskTag; 6 | 7 | /** 8 | * Created by NashLegend on 2015/1/20 0020 9 | */ 10 | public class AskTagMovableButton extends MovableButton { 11 | 12 | public AskTagMovableButton(Context context) { 13 | super(context); 14 | } 15 | 16 | public MovableButton cloneButton() { 17 | AskTagMovableButton button = new AskTagMovableButton(getContext()); 18 | LayoutParams params = new LayoutParams(ShuffleDesk.buttonWidth, ShuffleDesk.buttonHeight); 19 | button.setLayoutParams(params); 20 | button.setSection(section); 21 | return button; 22 | } 23 | 24 | @Override 25 | public AskTag getSection() { 26 | section.setOrder(getIndex()); 27 | section.setSelected(selected); 28 | return section; 29 | } 30 | 31 | @Override 32 | public void setSection(AskTag section) { 33 | this.section = section; 34 | setTitle(section.getName()); 35 | setSelected(section.getSelected()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/shuffle/DeskBase.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common.shuffle; 2 | 3 | /** 4 | * Created by NashLegend on 2015/1/22 0022 5 | */ 6 | public class DeskBase { 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/net/nashlegend/sourcewall/view/common/shuffle/GroupMovableButton.java: -------------------------------------------------------------------------------- 1 | package net.nashlegend.sourcewall.view.common.shuffle; 2 | 3 | import android.content.Context; 4 | 5 | import net.nashlegend.sourcewall.data.database.gen.MyGroup; 6 | 7 | /** 8 | * Created by NashLegend on 2015/1/20 0020 9 | */ 10 | public class GroupMovableButton extends MovableButton { 11 | 12 | public GroupMovableButton(Context context) { 13 | super(context); 14 | } 15 | 16 | public MovableButton cloneButton() { 17 | GroupMovableButton button = new GroupMovableButton(getContext()); 18 | LayoutParams params = new LayoutParams(ShuffleDesk.buttonWidth, ShuffleDesk.buttonHeight); 19 | button.setLayoutParams(params); 20 | button.setSection(section); 21 | return button; 22 | } 23 | 24 | @Override 25 | public MyGroup getSection() { 26 | section.setOrder(getIndex()); 27 | section.setSelected(selected); 28 | return section; 29 | } 30 | 31 | @Override 32 | public void setSection(MyGroup section) { 33 | this.section = section; 34 | setTitle(section.getName()); 35 | setSelected(section.getSelected()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libweibosdkcore.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/jniLibs/armeabi/libweibosdkcore.so -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/scale_in_center.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/anim/scale_out_center.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_out_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/color/color_section_font.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/color/color_text_link.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/color/dialog_button_text_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_answer_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_answer_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_basket_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_basket_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_day_night_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_day_night_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_image_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_image_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_image_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_image_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_insert_image_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_insert_image_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_insert_link_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_insert_link_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_link_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_link_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_notifications_active_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_notifications_active_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_notifications_none_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_notifications_none_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_posts_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_posts_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_publish_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_publish_group.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_publish_topic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_publish_topic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_question_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_question_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_send_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_send_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_send_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_send_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_setting_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_setting_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night-xhdpi/ic_touch_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-night-xhdpi/ic_touch_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/bg_header_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/bg_movable_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/bg_search_section.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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/bg_search_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/bg_tag_sticky.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/divider_wide.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/ic_badge.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/ic_section_group.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/ic_section_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/ic_section_question.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/ic_section_science.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-night/list_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/list_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/list_item_background_ripple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/check_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/check_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/chevron_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/chevron_down.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/chevron_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/chevron_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/default_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/default_avatar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/default_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/default_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/dustbin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/dustbin.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/dustbin_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/dustbin_outline.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/gif_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/gif_text.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/heart.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/heart_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/heart_outline.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_answer_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_answer_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_arrow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_arrow_left.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_basket_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_basket_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_broken_image_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_broken_image_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_close_grey_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_close_grey_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_comment.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_day_night_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_day_night_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_default_avatar_96dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_default_avatar_96dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_download.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_group_gray_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_group_gray_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_group_outline_gray_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_group_outline_gray_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_group_primary_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_group_primary_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_guokr_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_guokr_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home_gray_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_home_gray_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home_gray_outline_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_home_gray_outline_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_home_primary_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_home_primary_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_image_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_image_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_image_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_image_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_insert_image_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_insert_image_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_insert_link_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_insert_link_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_link_16dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_link_16dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_link_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_link_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_notifications_active_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_notifications_active_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_notifications_none_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_notifications_none_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_plus_one_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_plus_one_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_posts_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_posts_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_publish_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_publish_group.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_publish_topic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_publish_topic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_question_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_question_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_question_gray_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_question_gray_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_question_outline_gray_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_question_outline_gray_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_question_primary_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_question_primary_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_refresh_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_refresh_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_reply_color_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_reply_color_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_science_gray_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_science_gray_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_science_gray_outline_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_science_gray_outline_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_science_primary_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_science_primary_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_search_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_search_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_send_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_send_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_send_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_send_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_setting_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_setting_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_star_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_star_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_touch_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_touch_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_txt_image_16dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_txt_image_16dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_txt_image_gray_16dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/ic_txt_image_gray_16dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/left_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/left_shadow.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/like.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/link_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/link_gray.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/pencil.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/plus.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/refresh_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/refresh_big.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/white_like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NashLegend/SourceWall/a90e2faf5ed67aede165bde3a60291062a57a444/app/src/main/res/drawable-xhdpi/white_like.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_header_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_movable_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_search_section.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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_search_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_tag_sticky.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_tag_toast.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider_thin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider_wide.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_badge.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_section_group.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_section_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_section_question.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_section_science.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/list_item_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shadow_down.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shadow_up.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_browser.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 22 | 23 | 24 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_login.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | 16 | 23 | 24 | 25 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_message_center.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 14 | 15 | 22 | 23 | 24 | 25 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_my_answers.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 20 | 21 | 26 | 27 | 31 | 32 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_my_posts.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 20 | 21 | 26 | 27 | 31 | 32 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_my_questions.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 20 | 21 | 26 | 27 | 31 | 32 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_post_list.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 14 | 15 | 22 | 23 | 24 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_weibo_share.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/layout/button_movable.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 |