├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml └── runConfigurations.xml ├── Fun ├── .gitignore ├── build.gradle ├── libs │ ├── arm64-v8a │ │ └── liblocSDK6a.so │ ├── armeabi-v7a │ │ └── liblocSDK6a.so │ ├── armeabi │ │ └── liblocSDK6a.so │ ├── locSDK_6.13.jar │ ├── x86 │ │ └── liblocSDK6a.so │ └── x86_64 │ │ └── liblocSDK6a.so ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── xujun │ │ └── funapp │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── china_cities.db │ │ ├── litepal.xml │ │ └── yiyuan_newsClassify.json │ ├── ic_back-web.png │ ├── java │ │ └── com │ │ │ └── xujun │ │ │ └── funapp │ │ │ ├── BaseFragment.java │ │ │ ├── BaseListActivity.java │ │ │ ├── adapters │ │ │ ├── CityListAdapter.java │ │ │ ├── HeaderAdapter.java │ │ │ ├── HotCityGridAdapter.java │ │ │ ├── MultiPictureListAdapter.java │ │ │ ├── MultiYYNewsListAdapter.java │ │ │ ├── NewsGridAdapter.java │ │ │ ├── NewsListAdapter.java │ │ │ ├── PictureListAdapter.java │ │ │ ├── QsjsAdapter.java │ │ │ ├── ResultListAdapter.java │ │ │ ├── WeChatJingXuanAdapter.java │ │ │ ├── YYNewsListAdapter.java │ │ │ ├── YYNewsListGridAdapter.java │ │ │ └── YYNewsListStargAdapter.java │ │ │ ├── baiduMap │ │ │ └── MyLocationListener.java │ │ │ ├── beans │ │ │ ├── City.java │ │ │ ├── LocateState.java │ │ │ ├── NetInfo.java │ │ │ ├── NewsContentlistEntity.java │ │ │ ├── PictureClassify.java │ │ │ ├── PictureDetailBean.java │ │ │ ├── PictureListBean.java │ │ │ ├── Qsjs.java │ │ │ ├── QsjsDetail.java │ │ │ ├── Test.java │ │ │ ├── TxNews.java │ │ │ ├── TxNewsClassify.java │ │ │ ├── WeChatJingXuan.java │ │ │ ├── YYNews.java │ │ │ ├── YiYuanNewsClassify.java │ │ │ ├── YiYuanResponse.java │ │ │ └── test2.java │ │ │ ├── common │ │ │ ├── APP.java │ │ │ ├── ActivityCollector.java │ │ │ ├── BaseApp.java │ │ │ ├── BaseFragmentAdapter.java │ │ │ ├── BaseListFragment.java │ │ │ ├── BasePageFragment.java │ │ │ ├── BaseTopListFragment.java │ │ │ ├── BaseViewPagerFragemnt.java │ │ │ ├── BindingBaseFragment.java │ │ │ ├── Constants.java │ │ │ ├── DownloadConstants.java │ │ │ ├── PermissonListener.java │ │ │ ├── RequestResult.java │ │ │ ├── ThemeManager.java │ │ │ ├── ThreadManger.java │ │ │ ├── UnCatchExceptionHandler.java │ │ │ ├── YiYuanConstants.java │ │ │ ├── mvp │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── BaseMVPActivity.java │ │ │ │ ├── BasePresenter.java │ │ │ │ ├── BaseView.java │ │ │ │ └── DefaultContract.java │ │ │ ├── network │ │ │ │ ├── BaseFunc1.java │ │ │ │ ├── CustomException.java │ │ │ │ ├── CustomIntercept.java │ │ │ │ ├── GsonManger.java │ │ │ │ ├── HttpException.java │ │ │ │ ├── IRequestListener.java │ │ │ │ ├── NetUtils.java │ │ │ │ ├── RequestListener.java │ │ │ │ ├── juhe │ │ │ │ │ ├── BaseJuheEntity.java │ │ │ │ │ ├── JuHeApi.java │ │ │ │ │ └── JuHeApiManger.java │ │ │ │ └── yiyuan │ │ │ │ │ ├── BaseYYEntity.java │ │ │ │ │ ├── YYHttpManger.java │ │ │ │ │ ├── YiYuanApi.java │ │ │ │ │ └── YiYuanApiManger.java │ │ │ ├── onRefreshListener.java │ │ │ ├── recyclerView │ │ │ │ ├── BaseRecyclerAdapter.java │ │ │ │ ├── BaseRecyclerHolder.java │ │ │ │ ├── HeaderAndFooterRecyclerViewAdapter.java │ │ │ │ ├── LayoutMangerType.java │ │ │ │ ├── MultiItemAdapter.java │ │ │ │ ├── MultiItemTypeSupport.java │ │ │ │ ├── OnItemClickListener.java │ │ │ │ ├── RecyclerUtils.java │ │ │ │ └── WrapperUtils.java │ │ │ └── util │ │ │ │ ├── AnimationUtil.java │ │ │ │ ├── AppUtils.java │ │ │ │ ├── DbUtills.java │ │ │ │ ├── DialogUtils.java │ │ │ │ ├── PinyinUtils.java │ │ │ │ ├── ResourceUtils.java │ │ │ │ ├── SPUtils.java │ │ │ │ ├── UIUtils.java │ │ │ │ └── WriteLogUtil.java │ │ │ ├── db │ │ │ └── DBManager.java │ │ │ ├── image │ │ │ ├── GlideRequest.java │ │ │ ├── IimageListener.java │ │ │ ├── ImageLoaderUtils.java │ │ │ ├── ImageRequestManager.java │ │ │ └── PicassoRequest.java │ │ │ ├── model │ │ │ ├── NewsListModel.java │ │ │ ├── NewsModel.java │ │ │ ├── PictureDetailMOdel.java │ │ │ ├── PictureListModel.java │ │ │ ├── PictureModel.java │ │ │ ├── PreviousLifeDetailModel.java │ │ │ ├── PreviousLifeModel.java │ │ │ ├── WeChatModel.java │ │ │ └── YYNewsListModel.java │ │ │ ├── network │ │ │ ├── ApiManger.java │ │ │ ├── HttpManger.java │ │ │ ├── INetwork.java │ │ │ ├── INetworkListener.java │ │ │ ├── NetStateUtils.java │ │ │ ├── NetworkChangeListener.java │ │ │ ├── NetworkConfig.java │ │ │ ├── NetworkConnectChangedReceiver.java │ │ │ ├── NetworkManager.java │ │ │ ├── YiYuanApi.java │ │ │ ├── exception │ │ │ │ ├── AbsAPICallback.java │ │ │ │ ├── ApiException.java │ │ │ │ ├── DialogHelper.java │ │ │ │ ├── ERROR.java │ │ │ │ ├── ErrResponse.java │ │ │ │ ├── ExceptionEngine.java │ │ │ │ ├── GsonResponseBodyConverter.java │ │ │ │ ├── ResponseConverterFactory.java │ │ │ │ ├── ResultException.java │ │ │ │ └── ServerException.java │ │ │ ├── retrofit │ │ │ │ ├── ApiNet.java │ │ │ │ ├── BaiDuNewsConfig.java │ │ │ │ ├── DownLoadApi.java │ │ │ │ ├── OkHttpUtils.java │ │ │ │ ├── TnGouAPi.java │ │ │ │ ├── TnGouNet.java │ │ │ │ ├── TxApi.java │ │ │ │ └── TxNet.java │ │ │ └── retrofitclient │ │ │ │ ├── BaseInterceptor.java │ │ │ │ ├── BaseSubscriber.java │ │ │ │ ├── CaheInterceptor.java │ │ │ │ ├── CustomIntercept.java │ │ │ │ ├── ExceptionHandle.java │ │ │ │ ├── NetworkApi.java │ │ │ │ ├── NetworkUtil.java │ │ │ │ └── RetrofitClient.java │ │ │ ├── presenter │ │ │ ├── HomeContract.java │ │ │ ├── PictureDetailContract.java │ │ │ ├── PictureDetailPresenter.java │ │ │ ├── PreviousLifeContract.java │ │ │ ├── PreviousLifeDetailContract.java │ │ │ ├── PreviousLifeDetailPresenter.java │ │ │ ├── PreviousLifePresenter.java │ │ │ ├── WeChatContract.java │ │ │ └── WeChatPresenter.java │ │ │ ├── view │ │ │ ├── detail │ │ │ │ ├── HttpDownloadThread.java │ │ │ │ ├── NewsDetailActivity.java │ │ │ │ ├── PictureDetailActivity.java │ │ │ │ ├── PictureDetailActivity2.java │ │ │ │ ├── PictureDetailFragment.java │ │ │ │ ├── PicturePagerAdapter.java │ │ │ │ ├── UrlDetailActivity.java │ │ │ │ ├── WebViewActivity.java │ │ │ │ └── YYNewsDetailActivity.java │ │ │ ├── location │ │ │ │ ├── CityPickerActivity.java │ │ │ │ └── GPSLocationActivity.java │ │ │ ├── main │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MainFragmentFactory.java │ │ │ │ ├── TestActivity.java │ │ │ │ └── fragment │ │ │ │ │ ├── home │ │ │ │ │ └── HomeFragment.java │ │ │ │ │ ├── news │ │ │ │ │ ├── NewsContract.java │ │ │ │ │ ├── NewsListContract.java │ │ │ │ │ ├── YYNewsFragment.java │ │ │ │ │ ├── YYNewsListContract.java │ │ │ │ │ ├── YYNewsListFragment.java │ │ │ │ │ ├── YYNewsListPresenter.java │ │ │ │ │ └── YYNewsPresenter.java │ │ │ │ │ ├── picture │ │ │ │ │ ├── PictureFragment.java │ │ │ │ │ ├── PictureListContract.java │ │ │ │ │ ├── PictureListFragment.java │ │ │ │ │ ├── PictureListPresenter.java │ │ │ │ │ └── PicturePresenter.java │ │ │ │ │ └── setting │ │ │ │ │ ├── SettingContract.java │ │ │ │ │ ├── SettingFragment.java │ │ │ │ │ └── SettingPresenter.java │ │ │ ├── previouslife │ │ │ │ ├── PreviousLifeActivity.java │ │ │ │ └── PreviousLifeDetailActivity.java │ │ │ ├── search │ │ │ │ ├── SearchAdapter.java │ │ │ │ └── SearchWeChat.java │ │ │ └── wechat │ │ │ │ └── WechatActivity.java │ │ │ └── widget │ │ │ ├── CarouselView.java │ │ │ ├── DragImageView.java │ │ │ ├── ImageButtonWithText.java │ │ │ ├── MutiLayout.java │ │ │ ├── SettingClickItem.java │ │ │ ├── SettingSwitchItem.java │ │ │ ├── SideLetterBar.java │ │ │ ├── TabPagerIndicator.java │ │ │ ├── TitleView.java │ │ │ ├── WrapHeightGridView.java │ │ │ └── divider │ │ │ ├── DividerGridItemDecoration.java │ │ │ └── DividerItemDecoration.java │ └── res │ │ ├── drawable-hdpi │ │ ├── back.png │ │ ├── back_red.png │ │ ├── bottom_tab_bg.png │ │ ├── btn_normal.9.png │ │ ├── btn_pressed.9.png │ │ ├── button_red_normal.9.png │ │ ├── button_red_pressed.9.png │ │ ├── common_listview_headview_red_arrow.png │ │ ├── fortune.png │ │ ├── fortune_press.png │ │ ├── govaffairs.png │ │ ├── govaffairs_press.png │ │ ├── home.png │ │ ├── home_press.png │ │ ├── ic_empty_page.png │ │ ├── ic_error.png │ │ ├── ic_error_page.png │ │ ├── ic_launcher.png │ │ ├── ic_progress.png │ │ ├── icon_pic_grid_type.png │ │ ├── icon_pic_list_type.png │ │ ├── icon_share.png │ │ ├── icon_textsize.png │ │ ├── img_menu.png │ │ ├── meitu.png │ │ ├── meitu_press.png │ │ ├── menu_arr_normal.png │ │ ├── menu_arr_select.png │ │ ├── more.png │ │ ├── movie.png │ │ ├── movie_press.png │ │ ├── news.png │ │ ├── news_cate_arr.png │ │ ├── news_pic_default.png │ │ ├── news_press.png │ │ ├── newscenter.png │ │ ├── newscenter_press.png │ │ ├── pic_item_list_default.png │ │ ├── pic_list_item_bg.9.png │ │ ├── search.png │ │ ├── search_press.png │ │ ├── setting.png │ │ ├── setting_press.png │ │ ├── shi.png │ │ ├── shi_press.png │ │ ├── smartservice.png │ │ ├── smartservice_press.png │ │ ├── sport.png │ │ ├── sport_press.png │ │ ├── ssdk_oks_ptr_ptr.png │ │ ├── title_red_bg.png │ │ ├── wechat.png │ │ ├── wechat_press.png │ │ ├── xiaohua.png │ │ └── xiaohua_press.png │ │ ├── drawable │ │ ├── background_tab.xml │ │ ├── btn_bg.xml │ │ ├── icon_course.xml │ │ ├── icon_direct_seeding.xml │ │ ├── icon_home.xml │ │ ├── icon_me.xml │ │ ├── icon_me_green.xml │ │ ├── overlay_bg.xml │ │ ├── search_box_bg.xml │ │ ├── sel_back.xml │ │ ├── sel_bg_setting_item.xml │ │ ├── sel_bottom_tab_text.xml │ │ ├── sel_fortune.xml │ │ ├── sel_home.xml │ │ ├── sel_movie.xml │ │ ├── sel_news.xml │ │ ├── sel_picture.xml │ │ ├── sel_search.xml │ │ ├── sel_setting.xml │ │ ├── sel_shi.xml │ │ ├── sel_sport.xml │ │ ├── sel_wechat.xml │ │ └── sel_xiaohua.xml │ │ ├── layout-v21 │ │ ├── activity_web_view.xml │ │ ├── item_yy_news_list_one.xml │ │ └── item_yy_news_list_two.xml │ │ ├── layout │ │ ├── activity_base_list.xml │ │ ├── activity_city_list.xml │ │ ├── activity_gpslocation.xml │ │ ├── activity_main.xml │ │ ├── activity_news_detail.xml │ │ ├── activity_picture_detail.xml │ │ ├── activity_picture_detail2.xml │ │ ├── activity_previous_life_detail.xml │ │ ├── activity_search_we_chat.xml │ │ ├── activity_test.xml │ │ ├── activity_text.xml │ │ ├── activity_url_detail.xml │ │ ├── activity_web_view.xml │ │ ├── activity_yy_news_detail.xml │ │ ├── common_title_bar.xml │ │ ├── fragment_base_list.xml │ │ ├── fragment_base_list_top.xml │ │ ├── fragment_home.xml │ │ ├── fragment_news.xml │ │ ├── fragment_picture.xml │ │ ├── fragment_picture_list.xml │ │ ├── fragment_setting.xml │ │ ├── fragment_view_pager.xml │ │ ├── header_view_home.xml │ │ ├── header_view_test.xml │ │ ├── header_view_yiyuan_news.xml │ │ ├── item.xml │ │ ├── item_city_listview.xml │ │ ├── item_hot_city_gridview.xml │ │ ├── item_news_list.xml │ │ ├── item_news_list_grid.xml │ │ ├── item_news_list_strag.xml │ │ ├── item_picture_list.xml │ │ ├── item_picture_list_one.xml │ │ ├── item_picture_list_two.xml │ │ ├── item_qsjs.xml │ │ ├── item_search.xml │ │ ├── item_search_result_listview.xml │ │ ├── item_wechat_jingxuan.xml │ │ ├── item_yy_news_list_grid.xml │ │ ├── item_yy_news_list_one.xml │ │ ├── item_yy_news_list_starg.xml │ │ ├── item_yy_news_list_two.xml │ │ ├── loadpage_empty.xml │ │ ├── loadpage_error.xml │ │ ├── loadpage_loading.xml │ │ ├── test_icon.xml │ │ ├── view_hot_city.xml │ │ ├── view_image_text.xml │ │ ├── view_locate_city.xml │ │ ├── view_no_search_result.xml │ │ ├── view_search.xml │ │ ├── view_setting_click.xml │ │ ├── view_switch_setting.xml │ │ └── view_title.xml │ │ ├── mipmap-hdpi │ │ ├── bga_refresh_moooc.png │ │ ├── grid.png │ │ ├── ic_launcher.png │ │ ├── linear.png │ │ ├── menu.png │ │ └── strag.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ ├── area.png │ │ ├── ic_back.png │ │ ├── ic_launcher.png │ │ ├── ic_locate.png │ │ ├── ic_search.png │ │ ├── ic_search_clear.png │ │ ├── more.png │ │ ├── more_gray.png │ │ ├── progress.9.png │ │ ├── tangyang11.jpeg │ │ ├── tangyang7.jpg │ │ └── top.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── attrs_custom_view.xml │ │ ├── attrs_empty.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── ids.xml │ │ ├── strings.xml │ │ ├── style_bottom_tab.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── xujun │ └── funapp │ └── ExampleUnitTest.java ├── README.md ├── build.gradle ├── config.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── library ├── .gitignore ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── ru │ │ └── xujun │ │ └── touchgallery │ │ ├── gallerywidget │ │ ├── BasePagerAdapter.java │ │ ├── FilePagerAdapter.java │ │ ├── GalleryViewPager.java │ │ ├── InfinityFilePagerAdapter.java │ │ ├── InfinityUrlAdapter.java │ │ └── UrlPagerAdapter.java │ │ └── touchview │ │ ├── EclairMotionEvent.java │ │ ├── FileTouchImageView.java │ │ ├── InputStreamWrapper.java │ │ ├── TouchImageView.java │ │ ├── UrlTouchImageView.java │ │ └── WrapMotionEvent.java │ └── res │ ├── drawable-hdpi │ ├── ic_launcher.png │ └── no_photo.png │ ├── drawable-ldpi │ ├── ic_launcher.png │ └── no_photo.png │ ├── drawable-mdpi │ ├── ic_launcher.png │ └── no_photo.png │ ├── drawable-xhdpi │ ├── ic_launcher.png │ └── no_photo.png │ ├── layout │ └── main.xml │ └── values │ └── strings.xml ├── mylibrary ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── xujun │ │ └── mylibrary │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── xujun │ │ │ └── mylibrary │ │ │ ├── CountDownHelper.java │ │ │ ├── utils │ │ │ ├── ConvertUtils.java │ │ │ ├── DateUtils.java │ │ │ ├── FileUtil.java │ │ │ ├── HttpUtils.java │ │ │ ├── IOUtils.java │ │ │ ├── IntentUtils.java │ │ │ ├── KeyBoardUtil.java │ │ │ ├── LUtils.java │ │ │ ├── ListUtils.java │ │ │ ├── MD5.java │ │ │ ├── MD5Util.java │ │ │ ├── OptAnimationLoader.java │ │ │ ├── PermissionsChecker.java │ │ │ ├── SDCardUtils.java │ │ │ ├── SDScanerUtils.java │ │ │ ├── ScreenUtils.java │ │ │ ├── StatusCodeUtils.java │ │ │ ├── StringUtils.java │ │ │ ├── TimeUtil.java │ │ │ ├── ToastUtils.java │ │ │ ├── UriUtils.java │ │ │ └── ViewUtils.java │ │ │ └── widget │ │ │ ├── CarouselView.java │ │ │ └── ImageButtonWithText.java │ └── res │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable │ │ ├── back_gray.png │ │ ├── back_red.png │ │ ├── back_white.png │ │ ├── carousel_layout_page.xml │ │ └── sel_back.xml │ │ ├── layout │ │ ├── carousel_layout.xml │ │ ├── title_view.xml │ │ └── view_image_text.xml │ │ ├── mipmap │ │ └── tangyang7.jpg │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── xujun │ └── mylibrary │ └── ExampleUnitTest.java ├── settings.gradle ├── titleView ├── .gitignore ├── build.gradle ├── proguard-rules.pro ├── screenshot │ └── screen_shot.png └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── jarek │ │ └── titleview │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── jarek │ │ │ └── titleview │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── back_normal.png │ │ ├── ic_launcher.png │ │ └── icon_crop_rotate.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ ├── bar_button_right.png │ │ ├── ic_launcher.png │ │ ├── main_tab_dynamic_normal.png │ │ └── open_2x.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── jarek │ └── titleview │ └── ExampleUnitTest.java ├── titleviewlibrary ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── jarek │ │ └── library │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── jarek │ │ │ └── library │ │ │ ├── SimpleTitleViewListener.java │ │ │ └── TitleView.java │ └── res │ │ └── values │ │ ├── attr.xml │ │ ├── ids.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── jarek │ └── library │ └── ExampleUnitTest.java └── 基于Android的新闻客户端(概述 ).md /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | /app 11 | /keystore.properties 12 | /Fun/*.jks 13 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /Fun/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Fun/libs/arm64-v8a/liblocSDK6a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/libs/arm64-v8a/liblocSDK6a.so -------------------------------------------------------------------------------- /Fun/libs/armeabi-v7a/liblocSDK6a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/libs/armeabi-v7a/liblocSDK6a.so -------------------------------------------------------------------------------- /Fun/libs/armeabi/liblocSDK6a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/libs/armeabi/liblocSDK6a.so -------------------------------------------------------------------------------- /Fun/libs/locSDK_6.13.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/libs/locSDK_6.13.jar -------------------------------------------------------------------------------- /Fun/libs/x86/liblocSDK6a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/libs/x86/liblocSDK6a.so -------------------------------------------------------------------------------- /Fun/libs/x86_64/liblocSDK6a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/libs/x86_64/liblocSDK6a.so -------------------------------------------------------------------------------- /Fun/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Fun/src/androidTest/java/com/xujun/funapp/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp; 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 | } -------------------------------------------------------------------------------- /Fun/src/main/assets/china_cities.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/assets/china_cities.db -------------------------------------------------------------------------------- /Fun/src/main/assets/litepal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Fun/src/main/ic_back-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/ic_back-web.png -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp; 2 | 3 | import android.app.ActivityOptions; 4 | import android.content.Intent; 5 | import android.os.Parcelable; 6 | import android.support.v4.app.Fragment; 7 | 8 | import com.xujun.funapp.common.Constants; 9 | 10 | /** 11 | * @author xujun on 2016/12/28. 12 | * @email gdutxiaoxu@163.com 13 | */ 14 | 15 | public class BaseFragment extends Fragment { 16 | 17 | public void readyGo(Class clazz) { 18 | this.readyGo(clazz, null, ""); 19 | } 20 | 21 | public void readyGo(Class clazz, Parcelable parcelable) { 22 | this.readyGo(clazz, Constants.IntentConstants.DEFAULT_PARCEABLE_NAME, parcelable); 23 | } 24 | 25 | public void readyGo(Class clazz, String name, Parcelable parcelable) { 26 | Intent intent = new Intent(getActivity(), clazz); 27 | if (null != parcelable) { 28 | intent = intent.putExtra(name, parcelable); 29 | } 30 | startActivity(intent); 31 | } 32 | 33 | public void readyGo(Class clazz, String name, String value) { 34 | 35 | Intent intent = new Intent(getActivity(), clazz); 36 | if (null != value) { 37 | intent = intent.putExtra(name, value); 38 | } 39 | startActivity(intent); 40 | } 41 | 42 | protected T checkNotNull(T t) { 43 | if (t == null) { 44 | throw new NullPointerException(); 45 | } 46 | return t; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/adapters/HeaderAdapter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.adapters; 2 | 3 | import com.xujun.funapp.common.recyclerView.HeaderAndFooterRecyclerViewAdapter; 4 | 5 | /** 6 | * @author xujun on 2016/12/22. 7 | * @email gdutxiaoxu@163.com 8 | */ 9 | 10 | public class HeaderAdapter extends HeaderAndFooterRecyclerViewAdapter { 11 | } 12 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/adapters/QsjsAdapter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.adapters; 2 | 3 | import android.content.Context; 4 | import android.widget.TextView; 5 | 6 | import com.xujun.funapp.R; 7 | import com.xujun.funapp.beans.Qsjs; 8 | import com.xujun.funapp.common.recyclerView.BaseRecyclerAdapter; 9 | import com.xujun.funapp.common.recyclerView.BaseRecyclerHolder; 10 | import com.xujun.mylibrary.utils.StringUtils; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * @author xujun on 2016/12/28. 16 | * @email gdutxiaoxu@163.com 17 | */ 18 | 19 | public class QsjsAdapter extends BaseRecyclerAdapter { 20 | 21 | public QsjsAdapter(Context context, List datas) { 22 | super(context, R.layout.item_qsjs, datas); 23 | } 24 | 25 | @Override 26 | public void convert(BaseRecyclerHolder holder, Qsjs item, int position) { 27 | 28 | TextView tvTitle = holder.getView(R.id.tv_title); 29 | TextView tvDate = holder.getView(R.id.tv_date); 30 | String title = StringUtils.getStr(item.title); 31 | 32 | String date = StringUtils.getStr(item.date); 33 | 34 | tvTitle.setText(title); 35 | tvDate.setText(date); 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/City.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | /** 4 | * author zaaach on 2016/1/26. 5 | */ 6 | public class City { 7 | private String name; 8 | private String pinyin; 9 | 10 | public City() {} 11 | 12 | public City(String name, String pinyin) { 13 | this.name = name; 14 | this.pinyin = pinyin; 15 | } 16 | 17 | public String getName() { 18 | return name; 19 | } 20 | 21 | public void setName(String name) { 22 | this.name = name; 23 | } 24 | 25 | public String getPinyin() { 26 | return pinyin; 27 | } 28 | 29 | public void setPinyin(String pinyin) { 30 | this.pinyin = pinyin; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/LocateState.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | /** 4 | * author zaaach on 2016/1/26. 5 | */ 6 | public class LocateState { 7 | public static final int LOCATING = 111; 8 | public static final int FAILED = 666; 9 | public static final int SUCCESS = 888; 10 | } 11 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/NetInfo.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016/10/31 22:39 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class NetInfo { 9 | 10 | 11 | public boolean isConnected; 12 | public boolean isMobile; 13 | public boolean isWifi; 14 | public boolean isEnablaWifi; 15 | public boolean isEnableMobile; 16 | } 17 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/PictureClassify.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @ explain: 7 | * @ author:xujun on 2016/9/17 19:42 8 | * @ email:gdutxiaoxu@163.com 9 | */ 10 | public class PictureClassify { 11 | 12 | /** 13 | * status : true 14 | * tngou : [{"description":"性感美女","id":1,"keywords":"性感美女","name":"性感美女","seq":1, 15 | * "title":"性感美女"},{"description":"韩日美女","id":2,"keywords":"韩日美女","name":"韩日美女","seq":2, 16 | * "title":"韩日美女"},{"description":"丝袜美腿","id":3,"keywords":"丝袜美腿","name":"丝袜美腿","seq":3, 17 | * "title":"丝袜美腿"},{"description":"美女照片","id":4,"keywords":"美女照片","name":"美女照片","seq":4, 18 | * "title":"美女照片"},{"description":"美女写真","id":5,"keywords":"美女写真","name":"美女写真","seq":5, 19 | * "title":"美女写真"},{"description":"清纯美女","id":6,"keywords":"清纯美女","name":"清纯美女","seq":6, 20 | * "title":"清纯美女"},{"description":"性感车模","id":7,"keywords":"性感车模","name":"性感车模","seq":7, 21 | * "title":"性感车模"}] 22 | */ 23 | 24 | public boolean status; 25 | /** 26 | * description : 性感美女 27 | * id : 1 28 | * keywords : 性感美女 29 | * name : 性感美女 30 | * seq : 1 31 | * title : 性感美女 32 | */ 33 | 34 | public List tngou; 35 | 36 | public static class TngouBean { 37 | public YYNews description; 38 | public int id; 39 | public YYNews keywords; 40 | public YYNews name; 41 | public int seq; 42 | public YYNews title; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/Qsjs.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | /** 4 | * @author xujun on 2017/1/2. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | public class Qsjs { 9 | 10 | /** 11 | * day : 1/2 12 | * date : 1492年01月02日 13 | * title : 西班牙收复失地运动结束 14 | * e_id : 66 15 | */ 16 | 17 | public String day; 18 | public String date; 19 | public String title; 20 | public String e_id; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/QsjsDetail.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author xujun on 2017/1/3. 7 | * @email gdutxiaoxu@163.com 8 | */ 9 | 10 | public class QsjsDetail { 11 | 12 | public String e_id; 13 | public String title; 14 | public String content; 15 | public String picNo; 16 | public List picUrl; 17 | 18 | public static class PicUrl{ 19 | public String pic_title; 20 | public String id; 21 | public String url; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/Test.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @ explain: 7 | * @ author:xujun on 2016/10/1 10:52 8 | * @ email:gdutxiaoxu@163.com 9 | */ 10 | public class Test { 11 | 12 | public List para; 13 | 14 | public static class Text2{ 15 | public YYNews action; 16 | public YYNews timestamp; 17 | public YYNews token; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/TxNewsClassify.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016/10/28 16:01 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class TxNewsClassify { 9 | 10 | public String type; 11 | public String title; 12 | 13 | public TxNewsClassify(String type, String title) { 14 | this.type = type; 15 | this.title = title; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/YYNews.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author xujun on 2016/12/23. 7 | * @email gdutxiaoxu@163.com 8 | *

9 | * 易源新闻 10 | */ 11 | 12 | public class YYNews { 13 | 14 | public int ret_code; 15 | public PagebeanEntity pagebean; 16 | 17 | public static class PagebeanEntity { 18 | 19 | public int allPages; 20 | public int currentPage; 21 | public int allNum; 22 | public int maxResult; 23 | public List contentlist; 24 | 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/YiYuanResponse.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | /** 4 | * @author xujun on 2016/12/23. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | public class YiYuanResponse { 9 | 10 | public int showapi_res_code; 11 | public YYNews showapi_res_error; 12 | public T showapi_res_body; 13 | } 14 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/beans/test2.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.beans; 2 | 3 | /** 4 | * @author xujun on 2016/12/25. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | public class test2 { 9 | 10 | 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/ActivityCollector.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import android.app.Activity; 4 | import android.util.Log; 5 | 6 | import java.util.ArrayList; 7 | import java.util.Collections; 8 | import java.util.List; 9 | 10 | /** 11 | * @author xujun on 2016/12/27. 12 | * @email gdutxiaoxu@163.com 13 | */ 14 | 15 | public class ActivityCollector { 16 | 17 | public static final String TAG="ActivityCollector"; 18 | 19 | private static List mActivitys = new ArrayList<>(); 20 | 21 | public static void add(Activity activity) { 22 | mActivitys.add(activity); 23 | } 24 | 25 | public static void remove(Activity activity) { 26 | mActivitys.remove(activity); 27 | } 28 | 29 | public static Activity getTop() { 30 | if (mActivitys.isEmpty()) { 31 | return null; 32 | } 33 | return mActivitys.get(mActivitys.size() - 1); 34 | } 35 | 36 | public static void quit(){ 37 | try{ 38 | ArrayList activities = new ArrayList<>(); 39 | Collections.copy(activities,mActivitys); 40 | for (Activity a:activities) { 41 | if(!a.isFinishing()){ 42 | a.finish(); 43 | mActivitys.remove(activities); 44 | } 45 | 46 | } 47 | }catch (Exception e){ 48 | System.exit(0); 49 | Log.e(TAG, "quit: e=" +e.getMessage() ); 50 | } 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/BasePageFragment.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import android.os.Bundle; 4 | import android.support.v4.app.Fragment; 5 | 6 | /** 7 | * @ explain: 8 | * @ author:xujun on 2016-8-11 16:16 9 | * @ email:gdutxiaoxu@163.com 10 | */ 11 | public abstract class BasePageFragment extends Fragment { 12 | 13 | /** 14 | * 表示View是否被初始化 15 | */ 16 | protected boolean isViewInitiated; 17 | /** 18 | * 表示对用户是否可见 19 | */ 20 | protected boolean isVisibleToUser; 21 | /** 22 | * 表示数据是否初始化 23 | */ 24 | protected boolean isDataInitiated; 25 | 26 | @Override 27 | public void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | } 30 | 31 | @Override 32 | public void onActivityCreated(Bundle savedInstanceState) { 33 | super.onActivityCreated(savedInstanceState); 34 | isViewInitiated = true; 35 | prepareFetchData(); 36 | } 37 | 38 | @Override 39 | public void setUserVisibleHint(boolean isVisibleToUser) { 40 | super.setUserVisibleHint(isVisibleToUser); 41 | this.isVisibleToUser = isVisibleToUser; 42 | prepareFetchData(); 43 | } 44 | 45 | public abstract void fetchData(); 46 | 47 | public boolean prepareFetchData() { 48 | return prepareFetchData(false); 49 | } 50 | 51 | public boolean prepareFetchData(boolean forceUpdate) { 52 | if (isVisibleToUser && isViewInitiated && (!isDataInitiated || forceUpdate)) { 53 | fetchData(); 54 | isDataInitiated = true; 55 | return true; 56 | } 57 | return false; 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/BaseViewPagerFragemnt.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import android.support.design.widget.TabLayout; 4 | import android.support.v4.view.ViewPager; 5 | 6 | import com.xujun.funapp.R; 7 | import com.xujun.funapp.common.mvp.BasePresenter; 8 | import com.xujun.funapp.databinding.FragmentViewPagerBinding; 9 | 10 | /** 11 | * @ explain: 12 | * @ author:xujun on 2016/10/7 22:51 13 | * @ email:gdutxiaoxu@163.com 14 | */ 15 | public abstract class BaseViewPagerFragemnt

extends 16 | BindingBaseFragment { 17 | 18 | protected ViewPager mViewPager; 19 | 20 | private BaseFragmentAdapter mFragmentAdapter; 21 | private TabLayout mTabLayout; 22 | 23 | @Override 24 | protected int getContentViewLayoutID() { 25 | return R.layout.fragment_view_pager; 26 | } 27 | 28 | @Override 29 | protected void initView(FragmentViewPagerBinding binding) { 30 | mViewPager = binding.viewPager; 31 | mTabLayout = binding.tabLayout; 32 | mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE); 33 | mFragmentAdapter = getViewPagerAdapter(); 34 | mViewPager.setAdapter(mFragmentAdapter); 35 | mViewPager.setOffscreenPageLimit(setOffscreenPageLimit()); 36 | mTabLayout.setupWithViewPager(mViewPager); 37 | 38 | } 39 | 40 | /*ViewPager 保存的Fragment的数量*/ 41 | protected int setOffscreenPageLimit() { 42 | return 1; 43 | } 44 | 45 | /** 46 | * 这个方式是用来初始化ViewPager的adapter的 47 | * 48 | * @return 49 | */ 50 | protected abstract BaseFragmentAdapter getViewPagerAdapter(); 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/Constants.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import android.os.Environment; 4 | 5 | import java.io.File; 6 | 7 | /** 8 | * Created by xujun、on 2016/5/5. 9 | */ 10 | public class Constants { 11 | 12 | public final static String CONFIG = "config"; 13 | 14 | public final static String BaseCachePath = Environment.getExternalStoragePublicDirectory 15 | ("Download") + File.separator + APP.getInstance().getPackageName() + File.separator; 16 | 17 | 18 | 19 | public static class IntentConstants { 20 | public static final String DEFAULT_PARCEABLE_NAME = "default_parceable_name"; 21 | public static final String DEFAULT_STRING_NAME = "default_string_name"; 22 | public static final String TITLE_NAME = "title_name"; 23 | public static final int RESULT_CODE_PICK_CITY = 2333; 24 | public static final String KEY_PICKED_CITY = "picked_city"; 25 | } 26 | 27 | public static class URLConstants { 28 | public static final String URL_IMAGE_BASE = "http://tnfs.tngou.net/image"; 29 | } 30 | 31 | public static class SPConstants { 32 | //表示是否在WiFi的情况下 才加载图片,true表示在WiFi的情况下才加载图片 ,false而表示不是 33 | public static final String isIntelligentNoPic = "isIntelligentNoPic"; 34 | public static final String isNightMode = "isNightMode"; 35 | // 表示当前城市 36 | public static final String city = "city"; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/DownloadConstants.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016/6/12 09:13 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class DownloadConstants { 9 | 10 | //定义下载状态常量 11 | public static final int NONE = 0; //无状态 --> 等待 12 | public static final int WAITING = 1; //等待 --> 下载,暂停 13 | public static final int DOWNLOADING = 2; //下载中 --> 暂停,完成,错误 14 | public static final int PAUSE = 3; //暂停 --> 等待,下载 15 | public static final int FINISH = 4; //完成 --> 重新下载 16 | public static final int ERROR = 5; //错误 --> 等待 17 | } 18 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/PermissonListener.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author xujun on 2016/12/27. 7 | * @email gdutxiaoxu@163.com 8 | */ 9 | 10 | public interface PermissonListener { 11 | 12 | void onGranted(); 13 | 14 | void onDenied(List permisons); 15 | } 16 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/RequestResult.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | /** 4 | * @author xujun on 2017/1/3. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | //记录请求结果的状态,有三种类型,success,onError,empty 9 | public enum RequestResult { 10 | success, error, empty; 11 | } 12 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/UnCatchExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import com.orhanobut.logger.Logger; 4 | 5 | /** 6 | * @ explain: 7 | * @ author:xujun on 2016-8-18 15:01 8 | * @ email:gdutxiaoxu@163.com 9 | */ 10 | public class UnCatchExceptionHandler implements Thread.UncaughtExceptionHandler{ 11 | 12 | private static UnCatchExceptionHandler mInstance; 13 | 14 | @Override 15 | public void uncaughtException(Thread thread, Throwable ex) { 16 | if(ex!=null){ 17 | Logger.e(ex.toString()); 18 | } 19 | 20 | } 21 | 22 | public static UnCatchExceptionHandler getInstance(){ 23 | if(mInstance==null){ 24 | mInstance=new UnCatchExceptionHandler(); 25 | } 26 | return mInstance; 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/YiYuanConstants.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import java.util.HashMap; 6 | 7 | /** 8 | * @author xujun on 2016/12/28. 9 | * @email gdutxiaoxu@163.com 10 | */ 11 | 12 | public class YiYuanConstants { 13 | public static final String BASE_URL = "http://route.showapi.com/"; 14 | 15 | public static final String API_ID = "29571"; 16 | public static final String API_ID_KEY = "showapi_appid"; 17 | public static final String API_SECRET = "5bf00910e04a46998f6979f6da400f1e"; 18 | public static final String API_SIGN_KEY = "showapi_sign"; 19 | public static final String API_SIGN = API_SECRET; 20 | // String API_SIGN = MD5.encode(API_SECRET); 21 | 22 | public static final String WECHAT_JING_XUAN = BASE_URL + "582-2/"; 23 | public static final String NEWS_GET = BASE_URL + "109-35/"; 24 | public static final String NEWS_CLASSIFY = BASE_URL + "109-34/"; 25 | 26 | @NonNull 27 | public static HashMap getParamsMap() { 28 | HashMap map = new HashMap<>(); 29 | map.put(YiYuanConstants.API_ID_KEY, YiYuanConstants.API_ID); 30 | map.put(YiYuanConstants.API_SIGN_KEY, YiYuanConstants.API_SIGN); 31 | return map; 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/mvp/BasePresenter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.mvp; 2 | 3 | /** 4 | * Created by Domen、on 2016/4/22. 5 | */ 6 | public interface BasePresenter { 7 | 8 | void start(); 9 | 10 | void stop(); 11 | } 12 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/mvp/BaseView.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.mvp; 2 | 3 | /** 4 | * Created by Domen、on 2016/4/22. 5 | */ 6 | public interface BaseView { 7 | 8 | 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/mvp/DefaultContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.mvp; 2 | 3 | import org.simple.eventbus.EventBus; 4 | 5 | import java.lang.ref.WeakReference; 6 | 7 | 8 | 9 | /** 10 | * @ explain: 11 | * @ author:xujun on 2016-7-27 11:41 12 | * @ email:gdutxiaoxu@163.com 13 | */ 14 | public interface DefaultContract { 15 | 16 | interface View extends BaseView{ 17 | public void showProgress(); 18 | 19 | public void hideProgress(); 20 | 21 | public void onSuccess(T t); 22 | 23 | public void onError(Throwable throwable); 24 | 25 | public void onLocal(T t); 26 | } 27 | 28 | 29 | public static class Presenter implements BasePresenter { 30 | 31 | private final WeakReference mBaseViewWeakReference; 32 | 33 | @Override 34 | public void start() { 35 | EventBus.getDefault().register(this); 36 | } 37 | 38 | @Override 39 | public void stop() { 40 | EventBus.getDefault().unregister(this); 41 | mBaseViewWeakReference.clear(); 42 | 43 | } 44 | 45 | public Presenter(V view){ 46 | mBaseViewWeakReference = new WeakReference<>(view); 47 | } 48 | 49 | public V getView(){ 50 | return mBaseViewWeakReference.get(); 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/CustomException.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network; 2 | 3 | /** 4 | * @author meitu.xujun on 2017/4/18 14:07 5 | * @version 0.1 6 | */ 7 | 8 | public class CustomException extends Exception { 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/GsonManger.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network; 2 | 3 | import com.google.gson.Gson; 4 | 5 | import java.lang.reflect.Type; 6 | 7 | /** 8 | * @author xujun on 2016/12/25. 9 | * @email gdutxiaoxu@163.com 10 | */ 11 | 12 | public class GsonManger { 13 | 14 | private final Gson mGson; 15 | 16 | private GsonManger() { 17 | mGson = new Gson(); 18 | } 19 | 20 | public static GsonManger getInstance() { 21 | return Holder.mInstance; 22 | } 23 | 24 | private static class Holder { 25 | private static final GsonManger mInstance = new GsonManger(); 26 | } 27 | 28 | public String toJson(Object src) { 29 | return mGson.toJson(src); 30 | } 31 | 32 | public T fromJson(String json, Class clz) { 33 | 34 | return mGson.fromJson(json, clz); 35 | } 36 | 37 | public T fromJson(String json, Type type) { 38 | 39 | return mGson.fromJson(json, type); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/HttpException.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network; 2 | 3 | /** 4 | * @author meitu.xujun on 2017/4/8 17:26 5 | * @version 0.1 6 | */ 7 | 8 | public class HttpException { 9 | 10 | public static final int CUSTOM_ERROR_CODE=100; 11 | 12 | public int code; 13 | public Throwable e; 14 | public String errMsg; 15 | 16 | public HttpException(int code, Throwable e, String errMsg) { 17 | this.code = code; 18 | this.e = e; 19 | this.errMsg = errMsg; 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return "HttpException{" + 25 | "code=" + code + 26 | ", e=" + e + 27 | ", errMsg='" + errMsg + '\'' + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/IRequestListener.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network; 2 | 3 | /** 4 | * @author meitu.xujun on 2017/3/22 16:10 5 | * @version 0.1 6 | */ 7 | 8 | public interface IRequestListener { 9 | 10 | void onResponse(String response); 11 | void onFail(HttpException httpException); 12 | } 13 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/NetUtils.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network; 2 | 3 | /** 4 | * @author meitu.xujun on 2017/4/18 14:33 5 | * @version 0.1 6 | */ 7 | 8 | public class NetUtils { 9 | 10 | public static boolean isFirstPage(int page){ 11 | return page<=1; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/RequestListener.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016/10/19 23:40 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public interface RequestListener { 9 | 10 | public void onSuccess(T t); 11 | public void onError(Throwable throwable); 12 | } 13 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/juhe/BaseJuheEntity.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network.juhe; 2 | 3 | /** 4 | * @author xujun on 2017/1/2. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | public class BaseJuheEntity { 9 | 10 | public T result; 11 | public String reason; 12 | public int error_code; 13 | } 14 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/juhe/JuHeApi.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network.juhe; 2 | 3 | import java.util.Map; 4 | 5 | import okhttp3.ResponseBody; 6 | import retrofit2.http.FieldMap; 7 | import retrofit2.http.FormUrlEncoded; 8 | import retrofit2.http.POST; 9 | import retrofit2.http.Url; 10 | import rx.Observable; 11 | 12 | /** 13 | * @author xujun on 2017/1/2. 14 | * @email gdutxiaoxu@163.com 15 | */ 16 | 17 | public interface JuHeApi { 18 | 19 | 20 | String mBaseUrl="http://api.juheapi.com/"; 21 | String url_joke="http://japi.juhe.cn/joke/content/list.from?"; 22 | 23 | @FormUrlEncoded 24 | @POST 25 | Observable push(@Url String url, @FieldMap Map paramsMap); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/yiyuan/BaseYYEntity.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network.yiyuan; 2 | 3 | /** 4 | * @author xujun on 2016/12/25. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | public class BaseYYEntity { 9 | 10 | public int showapi_res_code; 11 | public String showapi_res_error; 12 | public Object showapi_res_body; 13 | 14 | public int getShowapi_res_code() { 15 | return showapi_res_code; 16 | } 17 | 18 | public void setShowapi_res_code(int showapi_res_code) { 19 | this.showapi_res_code = showapi_res_code; 20 | } 21 | 22 | public String getShowapi_res_error() { 23 | return showapi_res_error; 24 | } 25 | 26 | public void setShowapi_res_error(String showapi_res_error) { 27 | this.showapi_res_error = showapi_res_error; 28 | } 29 | 30 | public String getShowapi_res_body() { 31 | return showapi_res_body.toString(); 32 | } 33 | 34 | public void setShowapi_res_body(String showapi_res_body) { 35 | this.showapi_res_body = showapi_res_body; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/network/yiyuan/YiYuanApi.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.network.yiyuan; 2 | 3 | import java.util.Map; 4 | 5 | import okhttp3.ResponseBody; 6 | import retrofit2.http.FieldMap; 7 | import retrofit2.http.FormUrlEncoded; 8 | import retrofit2.http.POST; 9 | import retrofit2.http.Url; 10 | import rx.Observable; 11 | 12 | /** 13 | * @author xujun on 2016/12/24. 14 | * @email gdutxiaoxu@163.com 15 | */ 16 | 17 | public interface YiYuanApi { 18 | 19 | String API_ID = "29571"; 20 | String API_ID_KEY = "showapi_appid"; 21 | String API_SECRET = "5bf00910e04a46998f6979f6da400f1e"; 22 | String API_SIGN_KEY = "showapi_sign"; 23 | // String API_SIGN = MD5.encode(API_SECRET); 24 | String API_SIGN = API_SECRET; 25 | 26 | String mBaseUrl = "https://route.showapi.com/"; 27 | 28 | // http://route.showapi 29 | // .com/109-34?showapi_appid=29571&showapi_sign=5bf00910e04a46998f6979f6da400f1e 30 | 31 | 32 | // https://route.showapi.com/109-35?channelId=&channelName=&maxResult=20&needAllList=0 33 | // &needContent=0&needHtml=0&page=1&showapi_appid=29457&showapi_timestamp=20161225101701 34 | // &title=足球&showapi_sign=99af1a0e6ad027c261b8965972b4e42b 35 | 36 | @FormUrlEncoded 37 | @POST() 38 | Observable excutePush(@Url String url, @FieldMap Map paramsMap); 39 | 40 | 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/onRefreshListener.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common; 2 | 3 | import android.view.ViewGroup; 4 | 5 | /** 6 | * @ explain: 7 | * @ author:xujun on 2016/10/17 20:23 8 | * @ email:gdutxiaoxu@163.com 9 | */ 10 | public interface onRefreshListener { 11 | 12 | void onRefresh(ViewGroup viewGroup); 13 | void onLoadMore(ViewGroup viewGroup); 14 | } 15 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/recyclerView/LayoutMangerType.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.recyclerView; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016/11/9 11:24 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public enum LayoutMangerType { 9 | Linear, Grid, Strag 10 | } 11 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/recyclerView/MultiItemTypeSupport.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.recyclerView; 2 | 3 | /** 4 | * @author xujun on 2016/12/29. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | public interface MultiItemTypeSupport { 9 | 10 | public int getItemType(T t,int position); 11 | public int getLayoutId(int itemType); 12 | } 13 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/util/DbUtills.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.util; 2 | 3 | import org.litepal.crud.DataSupport; 4 | 5 | /** 6 | * @ explain: 7 | * @ author:xujun on 2016/5/19 15:48 8 | * @ email:gdutxiaoxu@163.com 9 | */ 10 | public class DbUtills { 11 | 12 | 13 | public static void saveAll(String user,String readType,Class clz){ 14 | DataSupport.deleteAll(clz,"user=?and readType=?",user,readType); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/util/PinyinUtils.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.util; 2 | 3 | import android.text.TextUtils; 4 | 5 | import java.util.regex.Pattern; 6 | 7 | /** 8 | * author zaaach on 2016/1/28. 9 | */ 10 | public class PinyinUtils { 11 | /** 12 | * 获取拼音的首字母(大写) 13 | * @param pinyin 14 | * @return 15 | */ 16 | public static String getFirstLetter(final String pinyin){ 17 | if (TextUtils.isEmpty(pinyin)) return "定位"; 18 | String c = pinyin.substring(0, 1); 19 | Pattern pattern = Pattern.compile("^[A-Za-z]+$"); 20 | if (pattern.matcher(c).matches()){ 21 | return c.toUpperCase(); 22 | } else if ("0".equals(c)){ 23 | return "定位"; 24 | } else if ("1".equals(c)){ 25 | return "热门"; 26 | } 27 | return "定位"; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/common/util/ResourceUtils.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.common.util; 2 | 3 | import com.xujun.mylibrary.utils.IOUtils; 4 | 5 | import java.io.BufferedReader; 6 | import java.io.InputStreamReader; 7 | 8 | import static com.xujun.funapp.common.util.UIUtils.getResources; 9 | 10 | /** 11 | * @author xujun on 2016/12/24. 12 | * @email gdutxiaoxu@163.com 13 | */ 14 | 15 | public class ResourceUtils { 16 | 17 | public static String getFromAssets(String fileName) { 18 | StringBuffer sb = new StringBuffer(); 19 | InputStreamReader inputReader=null; 20 | try { 21 | inputReader = new InputStreamReader(getResources().getAssets().open 22 | (fileName)); 23 | BufferedReader bufReader = new BufferedReader(inputReader); 24 | String line = ""; 25 | while ((line = bufReader.readLine()) != null) sb.append(line); 26 | return sb.toString(); 27 | } catch (Exception e) { 28 | e.printStackTrace(); 29 | }finally { 30 | IOUtils.close(inputReader); 31 | } 32 | return sb.toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/image/IimageListener.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.image; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.widget.ImageView; 6 | 7 | /** 8 | * @author xujun on 2016/12/23. 9 | * @email gdutxiaoxu@163.com 10 | */ 11 | 12 | public interface IimageListener { 13 | 14 | 15 | 16 | void display(Context context, ImageView imageView, String url, int progressId, int errorId, 17 | Object tag); 18 | 19 | void display(Context context, ImageView imageView, String url, int progressId, int errorId); 20 | 21 | void display(Context context, ImageView imageView, String url, int progressId); 22 | 23 | void display(Context context, ImageView imageView, String url); 24 | 25 | void display(Context context, ImageView imageView, Uri uri); 26 | } 27 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/image/ImageRequestManager.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.image; 2 | 3 | /** 4 | * @author xujun on 2016/12/23. 5 | * @email gdutxiaoxu@163.com 6 | */ 7 | 8 | public class ImageRequestManager { 9 | 10 | public static final String type_Glide="Glide"; 11 | public static final String type_Picasso="Picasso"; 12 | public static final String type_default =type_Glide; 13 | 14 | private ImageRequestManager(){ 15 | 16 | } 17 | 18 | public static IimageListener getRequest(){ 19 | return getRequest(type_default); 20 | 21 | } 22 | 23 | public static IimageListener getRequest(String type){ 24 | switch (type){ 25 | case type_Glide: 26 | return new GlideRequest(); 27 | 28 | case type_Picasso: 29 | return new PicassoRequest(); 30 | 31 | default: 32 | return new GlideRequest(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/image/PicassoRequest.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.image; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.widget.ImageView; 6 | 7 | /** 8 | * @author xujun on 2017/1/13. 9 | * @email gdutxiaoxu@163.com 10 | */ 11 | 12 | public class PicassoRequest implements IimageListener { 13 | 14 | @Override 15 | public void display(Context context, ImageView imageView, String url, int progressId, int 16 | errorId, Object tag) { 17 | // Picasso.with(context).load(url).placeholder(progressId).error(errorId).tag(tag).into(imageView); 18 | } 19 | 20 | @Override 21 | public void display(Context context, ImageView imageView, String url, int progressId, int 22 | errorId) { 23 | // Picasso.with(context).load(url).placeholder(progressId).error(errorId).into(imageView); 24 | } 25 | 26 | @Override 27 | public void display(Context context, ImageView imageView, String url, int progressId) { 28 | // Picasso.with(context).load(url).placeholder(progressId).into(imageView); 29 | } 30 | 31 | @Override 32 | public void display(Context context, ImageView imageView, String url) { 33 | // Picasso.with(context).load(url).into(imageView); 34 | } 35 | 36 | @Override 37 | public void display(Context context, ImageView imageView, Uri uri) { 38 | // Picasso.with(context).load(uri).into(imageView); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/model/PictureDetailMOdel.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.model; 2 | 3 | import com.orhanobut.logger.Logger; 4 | import com.xujun.funapp.beans.PictureDetailBean; 5 | import com.xujun.funapp.network.retrofit.TnGouNet; 6 | import com.xujun.funapp.common.network.RequestListener; 7 | import com.xujun.funapp.network.retrofit.TnGouAPi; 8 | 9 | import rx.Observable; 10 | import rx.android.schedulers.AndroidSchedulers; 11 | import rx.functions.Action1; 12 | import rx.schedulers.Schedulers; 13 | 14 | /** 15 | * @ explain: 16 | * @ author:xujun on 2016/10/19 23:39 17 | * @ email:gdutxiaoxu@163.com 18 | */ 19 | public class PictureDetailMOdel { 20 | 21 | public void getPictureList(int id, final RequestListener listener){ 22 | 23 | TnGouAPi tnGouAPi = TnGouNet.getInstance().getTnGouAPi(); 24 | Observable observable = tnGouAPi.getPictureDetail(id); 25 | observable.subscribeOn(Schedulers.io()) 26 | .observeOn(AndroidSchedulers.mainThread()) 27 | .subscribe(new Action1() { 28 | @Override 29 | public void call(PictureDetailBean pictureDetailBean) { 30 | if(listener!=null){ 31 | listener.onSuccess(pictureDetailBean); 32 | } 33 | 34 | } 35 | }, new Action1() { 36 | @Override 37 | public void call(Throwable throwable) { 38 | Logger.i(throwable.getMessage()); 39 | if(listener!=null){ 40 | listener.onError(throwable); 41 | } 42 | 43 | } 44 | }); 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/model/PictureModel.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.model; 2 | 3 | import com.xujun.funapp.beans.PictureClassify; 4 | import com.xujun.funapp.network.retrofit.TnGouNet; 5 | import com.xujun.funapp.network.retrofit.TnGouAPi; 6 | 7 | import org.simple.eventbus.EventBus; 8 | 9 | import java.util.List; 10 | 11 | import rx.Observable; 12 | import rx.android.schedulers.AndroidSchedulers; 13 | import rx.functions.Action1; 14 | import rx.schedulers.Schedulers; 15 | 16 | /** 17 | * @ explain: 18 | * @ author:xujun on 2016/9/17 20:24 19 | * @ email:gdutxiaoxu@163.com 20 | */ 21 | public class PictureModel { 22 | 23 | public static void getPictureClassify() { 24 | TnGouAPi tnGouAPi = TnGouNet.getInstance().getTnGouAPi(); 25 | Observable observable = tnGouAPi.pictureClassify(); 26 | observable.subscribeOn(Schedulers.io()) 27 | .observeOn(AndroidSchedulers.mainThread()) 28 | .subscribe(new Action1() { 29 | @Override 30 | public void call(PictureClassify pictureClassify) { 31 | List tngou = pictureClassify.tngou; 32 | EventBus.getDefault().post(pictureClassify); 33 | 34 | } 35 | }, new Action1() { 36 | @Override 37 | public void call(Throwable throwable) { 38 | EventBus.getDefault().post(throwable); 39 | } 40 | }); 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/model/PreviousLifeDetailModel.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.model; 2 | 3 | import com.xujun.funapp.common.network.juhe.JuHeApiManger; 4 | 5 | import java.util.Map; 6 | 7 | import rx.Subscriber; 8 | 9 | /** 10 | * @author xujun on 2016/12/28. 11 | * @email gdutxiaoxu@163.com 12 | */ 13 | 14 | public class PreviousLifeDetailModel { 15 | 16 | public void getData(String url, Map paramsMap, Subscriber subscriber) { 17 | JuHeApiManger.getInstance().excutePushString(url,paramsMap,subscriber); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/model/PreviousLifeModel.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.model; 2 | 3 | import com.xujun.funapp.common.network.juhe.JuHeApiManger; 4 | 5 | import java.util.Map; 6 | 7 | import rx.Subscriber; 8 | 9 | /** 10 | * @author xujun on 2016/12/28. 11 | * @email gdutxiaoxu@163.com 12 | */ 13 | 14 | public class PreviousLifeModel { 15 | 16 | public void getData(String url, Map paramsMap, Subscriber subscriber) { 17 | JuHeApiManger.getInstance().excutePushString(url,paramsMap,subscriber); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/model/WeChatModel.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.model; 2 | 3 | import com.xujun.funapp.common.network.yiyuan.YYHttpManger; 4 | 5 | import java.util.Map; 6 | 7 | import rx.Subscriber; 8 | 9 | /** 10 | * @author xujun on 2016/12/28. 11 | * @email gdutxiaoxu@163.com 12 | */ 13 | 14 | public class WeChatModel { 15 | 16 | public void getData(String url, Map paramsMap, Subscriber subscriber) { 17 | YYHttpManger.getInstance().push(url,paramsMap,subscriber); 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/HttpManger.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network; 2 | 3 | import rx.Observable; 4 | import rx.Subscriber; 5 | import rx.Subscription; 6 | import rx.android.schedulers.AndroidSchedulers; 7 | import rx.schedulers.Schedulers; 8 | 9 | /** 10 | * @author xujun on 2016/12/24. 11 | * @email gdutxiaoxu@163.com 12 | */ 13 | 14 | public class HttpManger { 15 | 16 | private HttpManger() { 17 | 18 | } 19 | 20 | public static HttpManger getInstance() { 21 | return Holder.mInstance; 22 | } 23 | 24 | private static class Holder { 25 | private static final HttpManger mInstance = new HttpManger(); 26 | } 27 | 28 | public Subscription doHttpDeal(Observable observable, Subscriber subscriber) { 29 | return observable.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) 30 | .unsubscribeOn(Schedulers.io()).subscribe(subscriber); 31 | } 32 | 33 | public static class LiftAllTransformer implements Observable.Transformer { 34 | 35 | 36 | @Override 37 | public Observable call(Observable observable) { 38 | return (Observable)observable.subscribeOn(Schedulers.io()).// 指定在IO线程执行耗时操作 39 | unsubscribeOn(Schedulers.io()). 40 | observeOn(AndroidSchedulers.mainThread());//指定Subscrible在主线程回调 41 | } 42 | } 43 | 44 | public LiftAllTransformer getTransformer(){ 45 | return new LiftAllTransformer(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/INetwork.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network; 2 | 3 | /** 4 | * @ explain:新增 5 | * @ author:xujun on 2016-7-19 17:54 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public interface INetwork { 9 | 10 | /** 11 | * 拿到BaseURl; 12 | * @return 13 | */ 14 | 15 | String getBaseUrl(); 16 | String getUploadUrl(); 17 | String getDownloadUrl(); 18 | String getHostName(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/INetworkListener.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network; 2 | 3 | import com.xujun.funapp.common.network.RequestListener; 4 | 5 | import java.util.Map; 6 | 7 | /** 8 | * @author xujun on 2016/12/23. 9 | * @email gdutxiaoxu@163.com 10 | */ 11 | 12 | public interface INetworkListener { 13 | 14 | public void excuteGet(String url, Map paramsMap , final RequestListener requestListener); 15 | public void excutePush(String url, Map paramsMap, final RequestListener requestListener); 16 | public void json(String url,String jsonStr,final RequestListener requestListener); 17 | } 18 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/NetworkManager.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network; 2 | 3 | import com.xujun.funapp.network.retrofitclient.RetrofitClient; 4 | 5 | /** 6 | * @author xujun on 2016/12/23. 7 | * @email gdutxiaoxu@163.com 8 | */ 9 | 10 | public class NetworkManager { 11 | 12 | public static INetworkListener getInstance(){ 13 | return RetrofitClient.getInstance(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/exception/ApiException.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.exception; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016-7-19 12:07 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class ApiException extends Exception { 9 | 10 | private final int code; 11 | private String displayMessage; 12 | 13 | public static final int UNKNOWN = 1000; 14 | public static final int PARSE_ERROR = 1001; 15 | public String message; 16 | 17 | public ApiException(Throwable throwable, int code) { 18 | super(throwable); 19 | this.code = code; 20 | } 21 | 22 | public int getCode() { 23 | return code; 24 | } 25 | public String getDisplayMessage() { 26 | return displayMessage; 27 | } 28 | public void setDisplayMessage(String msg) { 29 | this.displayMessage = msg + "(code:" + code + ")"; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/exception/ERROR.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.exception; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016-7-19 14:53 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | /** 9 | * 约定异常 10 | */ 11 | 12 | public class ERROR { 13 | /** 14 | * 未知错误 15 | */ 16 | public static final int UNKNOWN = 1000; 17 | /** 18 | * 解析错误 19 | */ 20 | public static final int PARSE_ERROR = 1001; 21 | /** 22 | * 网络错误 23 | */ 24 | public static final int NETWORD_ERROR = 1002; 25 | /** 26 | * 协议出错 27 | */ 28 | public static final int HTTP_ERROR = 1003; 29 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/exception/ErrResponse.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.exception; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016-7-19 12:01 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class ErrResponse { 9 | String msg; 10 | 11 | public String getMsg() { 12 | return msg; 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/exception/GsonResponseBodyConverter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.exception; 2 | 3 | import com.google.gson.Gson; 4 | import com.orhanobut.logger.Logger; 5 | 6 | import java.io.IOException; 7 | import java.lang.reflect.Type; 8 | 9 | import okhttp3.ResponseBody; 10 | import retrofit2.Converter; 11 | 12 | /** 13 | * @ explain:chu 14 | * @ author:xujun on 2016-7-19 11:57 15 | * @ email:gdutxiaoxu@163.com 16 | */ 17 | public class GsonResponseBodyConverter implements Converter { 18 | private final Gson gson; 19 | private final Type type; 20 | 21 | public GsonResponseBodyConverter(Gson gson, Type type) { 22 | this.gson = gson; 23 | this.type = type; 24 | } 25 | 26 | @Override 27 | public T convert(ResponseBody value) throws IOException { 28 | String response = value.string(); 29 | try { 30 | // 打印出返回的信息,不管是成功还是失败 31 | // Logger.json(response); 32 | Logger.d(response); 33 | //ResultResponse 只解析result字段,Response为我们定义的基类 34 | /* Response resultResponse = gson.fromJson(response, Response.class); 35 | //成功的时候 36 | if (resultResponse.isSuccess()) { 37 | //result==0表示成功返回,继续用本来的Model类解析 38 | return gson.fromJson(response, type_default); 39 | // 40 | } else { 41 | //ErrResponse 将msg解析为异常消息文本 42 | ErrResponse errResponse = gson.fromJson(response, ErrResponse.class); 43 | throw new ResultException(resultResponse.getStatus_code(), errResponse.getMsg()); 44 | }*/ 45 | } finally { 46 | } 47 | return gson.fromJson(response, type); 48 | } 49 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/exception/ResultException.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.exception; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016-7-19 11:54 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class ResultException extends RuntimeException { 9 | 10 | private int errCode = 0; 11 | 12 | public ResultException(int errCode, String msg) { 13 | super(msg); 14 | this.errCode = errCode; 15 | } 16 | 17 | public int getErrCode() { 18 | return errCode; 19 | } 20 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/exception/ServerException.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.exception; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016-7-19 14:54 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class ServerException extends RuntimeException { 9 | public int code; 10 | public String message; 11 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/retrofit/BaiDuNewsConfig.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.retrofit; 2 | 3 | import com.xujun.funapp.beans.TxNewsClassify; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * @ explain: 10 | * @ author:xujun on 2016/10/28 16:03 11 | * @ email:gdutxiaoxu@163.com 12 | */ 13 | public class BaiDuNewsConfig { 14 | 15 | static BaiDuNewsConfig mInstance; 16 | 17 | List mList; 18 | 19 | public static BaiDuNewsConfig getInstance(){ 20 | if(mInstance==null){ 21 | mInstance=new BaiDuNewsConfig(); 22 | } 23 | return mInstance; 24 | 25 | } 26 | 27 | public static final String[] mTitles=new String[]{ 28 | "世界","科技","体育" 29 | }; 30 | 31 | public static final String[] mTypes=new String[]{ 32 | "world","keji","tiyu" 33 | }; 34 | 35 | public List getList(){ 36 | if(mList==null){ 37 | mList=new ArrayList<>(); 38 | for(int i=0;i downLoadImage(); 15 | 16 | @GET("getImg") 17 | Call downLoad(String url); 18 | } 19 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/retrofit/TnGouAPi.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.retrofit; 2 | 3 | import com.xujun.funapp.beans.PictureClassify; 4 | import com.xujun.funapp.beans.PictureDetailBean; 5 | import com.xujun.funapp.beans.PictureListBean; 6 | import com.xujun.funapp.beans.Test; 7 | 8 | import okhttp3.ResponseBody; 9 | import retrofit2.Call; 10 | import retrofit2.http.Body; 11 | import retrofit2.http.Field; 12 | import retrofit2.http.FormUrlEncoded; 13 | import retrofit2.http.GET; 14 | import retrofit2.http.POST; 15 | import retrofit2.http.Query; 16 | import rx.Observable; 17 | 18 | /** 19 | * Created by xujun、on 2016/4/20. 20 | */ 21 | public interface TnGouAPi { 22 | //检验MD5 23 | @GET("checkImg") 24 | Observable checkMD5(@Query("md5") String MD5); 25 | 26 | // 获取图片列表 27 | @GET("tnfs/api/list") 28 | Observable getPictureList(@Query("page") String page, 29 | @Query("rows") String rows, 30 | @Query("id") int id); 31 | 32 | @FormUrlEncoded 33 | @POST("updateGestureCode") 34 | Observable updateGestureCode(@Field("staffNo") String staffNo, 35 | @Field("gestureCode") String gestureCode, @Field 36 | ("state") int state); 37 | 38 | //获取图片分类 39 | @GET("tnfs/api/classify") 40 | Observable pictureClassify(); 41 | 42 | @POST("/api.php") 43 | Call getTest(@Body Test test); 44 | 45 | // http://www.tngou.net/tnfs/api/show?id=9 46 | 47 | // 获取图片列表 48 | @GET("tnfs/api/show") 49 | Observable getPictureDetail(@Query("id") int id); 50 | 51 | } 52 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/retrofit/TxApi.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.retrofit; 2 | 3 | import com.xujun.funapp.beans.TxNews; 4 | 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Headers; 7 | import retrofit2.http.Path; 8 | import retrofit2.http.Query; 9 | import rx.Observable; 10 | 11 | /** 12 | * @ explain: 13 | * @ author:xujun on 2016/10/28 15:19 14 | * @ email:gdutxiaoxu@163.com 15 | */ 16 | public interface TxApi { 17 | 18 | /* http://apis.baidu.com/txapi/social/social*/ 19 | 20 | 21 | @GET("txapi/{type_default}/{type_default}") 22 | Observable getNews(@Path("type_default") String type, @Query("num") int num, 23 | @Query("page") int page); 24 | 25 | 26 | 27 | @GET("txapi/tiYu/tiYu") 28 | Observable tiYu(@Query("num") int num, @Query("page") int page); 29 | 30 | @Headers({"apikey:81bf9da930c7f9825a3c3383f1d8d766" ,"Content-Type:application/json"}) 31 | @GET("txapi/world/world") 32 | Observable world(@Query("num") int num, @Query("page") int page); 33 | 34 | @Headers({"apikey:81bf9da930c7f9825a3c3383f1d8d766" ,"Content-Type:application/json"}) 35 | @GET("txapi/keji/keji") 36 | Observable keji(@Query("num") int num, @Query("page") int page); 37 | 38 | @Headers({"apikey:81bf9da930c7f9825a3c3383f1d8d766" ,"Content-Type:application/json"}) 39 | @GET("txapi/social/social") 40 | Observable social(@Query("num") int num, @Query("page") int page); 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/retrofitclient/BaseInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.retrofitclient; 2 | import java.io.IOException; 3 | import java.util.Map; 4 | import java.util.Set; 5 | 6 | import okhttp3.Interceptor; 7 | import okhttp3.Request; 8 | import okhttp3.Response; 9 | 10 | /** 11 | * BaseInterceptor 12 | * Created by LIUYONGKUI726 on 2016-06-30. 13 | * {@link # https://github.com/NeglectedByBoss/RetrofitClient} 14 | */ 15 | public class BaseInterceptor implements Interceptor{ 16 | private Map headers; 17 | public BaseInterceptor(Map headers) { 18 | this.headers = headers; 19 | } 20 | 21 | @Override 22 | public Response intercept(Chain chain) throws IOException { 23 | 24 | 25 | Request.Builder builder = chain.request() 26 | .newBuilder(); 27 | 28 | if (headers != null && headers.size() > 0) { 29 | Set keys = headers.keySet(); 30 | for (String headerKey : keys) { 31 | builder.addHeader(headerKey, headers.get(headerKey)).build(); 32 | } 33 | } 34 | return chain.proceed(builder.build()); 35 | 36 | } 37 | } -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/retrofitclient/CustomIntercept.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.retrofitclient; 2 | 3 | import com.xujun.funapp.common.util.WriteLogUtil; 4 | 5 | import java.io.IOException; 6 | import java.util.Locale; 7 | 8 | import okhttp3.Interceptor; 9 | import okhttp3.Request; 10 | import okhttp3.Response; 11 | 12 | /** 13 | * @author xujun on 2016/12/23. 14 | * @email gdutxiaoxu@163.com 15 | */ 16 | 17 | public class CustomIntercept implements Interceptor { 18 | @Override 19 | public Response intercept(Chain chain) throws IOException { 20 | Response response = null; 21 | Request request = null; 22 | try { 23 | request = chain.request(); 24 | response=chain.proceed(request); 25 | WriteLogUtil.i("请求的url是" + request.url()); 26 | } catch (IOException e) { 27 | throw new HttpIOException(request, e); 28 | } 29 | 30 | 31 | return response; 32 | } 33 | 34 | private static class HttpIOException extends IOException { 35 | 36 | HttpIOException(final Request request, final IOException e) { 37 | super(String.format(Locale.US, "IOException during http request. Request= %s", 38 | request), e); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/network/retrofitclient/NetworkApi.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.network.retrofitclient; 2 | 3 | import com.xujun.funapp.beans.YiYuanNewsClassify; 4 | import com.xujun.funapp.beans.YiYuanResponse; 5 | 6 | import java.util.Map; 7 | 8 | import okhttp3.RequestBody; 9 | import okhttp3.ResponseBody; 10 | import retrofit2.http.Body; 11 | import retrofit2.http.GET; 12 | import retrofit2.http.POST; 13 | import retrofit2.http.Path; 14 | import retrofit2.http.QueryMap; 15 | import retrofit2.http.Url; 16 | import rx.Observable; 17 | 18 | /** 19 | * @author xujun on 2016/12/23. 20 | * @email gdutxiaoxu@163.com 21 | */ 22 | 23 | public interface NetworkApi { 24 | 25 | public final static String mBaseUrl = "https://route.showapi.com/109-34/"; 26 | 27 | @GET 28 | Observable executeGet(@Url String url, @QueryMap Map paramsMap); 29 | 30 | @POST 31 | Observable executePost(@Url String url, 32 | // @Header("") String authorization, 33 | @QueryMap Map maps); 34 | 35 | @POST("./") 36 | Observable json(@Url String url, @Body RequestBody jsonStr); 37 | 38 | @GET("{url}") 39 | Observable testPath(@Path("url") String url, @QueryMap Map paramsMap); 40 | 41 | @GET 42 | Observable> testUrl(@Url String url, 43 | @QueryMap 44 | Map paramsMap); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/presenter/HomeContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.presenter; 2 | 3 | import com.xujun.funapp.common.mvp.BaseView; 4 | import com.xujun.funapp.common.mvp.DefaultContract; 5 | 6 | /** 7 | * @author xujun on 2016/12/27. 8 | * @email gdutxiaoxu@163.com 9 | */ 10 | 11 | public interface HomeContract { 12 | 13 | public interface View extends BaseView{ 14 | 15 | } 16 | 17 | 18 | public class Presenter extends DefaultContract.Presenter { 19 | 20 | public Presenter(HomeContract.View view) { 21 | super(view); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/presenter/PictureDetailContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.presenter; 2 | 3 | import com.xujun.funapp.beans.PictureDetailBean; 4 | import com.xujun.funapp.common.mvp.BasePresenter; 5 | import com.xujun.funapp.common.mvp.BaseView; 6 | 7 | /** 8 | * @ explain: 9 | * @ author:xujun on 2016/10/19 22:58 10 | * @ email:gdutxiaoxu@163.com 11 | */ 12 | public class PictureDetailContract { 13 | 14 | 15 | 16 | public interface View extends BaseView{ 17 | void onReceivePictureList(PictureDetailBean pictureDetailBean); 18 | 19 | } 20 | 21 | public interface Presenter extends BasePresenter{ 22 | void getPictureList(int id); 23 | void getComments(int id); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/presenter/PictureDetailPresenter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.presenter; 2 | 3 | import com.xujun.funapp.beans.PictureDetailBean; 4 | import com.xujun.funapp.common.mvp.DefaultContract; 5 | import com.xujun.funapp.model.PictureDetailMOdel; 6 | import com.xujun.funapp.common.network.RequestListener; 7 | 8 | /** 9 | * @ explain:图片详情的Presenter 10 | * @ author:xujun on 2016/10/19 23:12 11 | * @ email:gdutxiaoxu@163.com 12 | */ 13 | public class PictureDetailPresenter extends DefaultContract.Presenter 14 | implements PictureDetailContract.Presenter { 15 | 16 | 17 | 18 | PictureDetailMOdel mModel=new PictureDetailMOdel(); 19 | 20 | public PictureDetailPresenter(PictureDetailContract.View view) { 21 | super(view); 22 | 23 | } 24 | 25 | @Override 26 | public void getPictureList(int id) { 27 | mModel.getPictureList(id, new RequestListener() { 28 | @Override 29 | public void onSuccess(PictureDetailBean pictureDetailBean) { 30 | PictureDetailContract.View view = getView(); 31 | if(view!=null){ 32 | view.onReceivePictureList(pictureDetailBean); 33 | } 34 | } 35 | 36 | @Override 37 | public void onError(Throwable throwable) { 38 | 39 | } 40 | }); 41 | } 42 | 43 | @Override 44 | public void getComments(int id) { 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/presenter/PreviousLifeContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.presenter; 2 | 3 | import com.xujun.funapp.common.mvp.BasePresenter; 4 | import com.xujun.funapp.common.mvp.BaseView; 5 | 6 | /** 7 | * @author xujun on 2016/12/28. 8 | * @email gdutxiaoxu@163.com 9 | */ 10 | 11 | public interface PreviousLifeContract { 12 | 13 | public interface View extends BaseView { 14 | 15 | public void onReveive(String s); 16 | 17 | public void onError(Throwable throwable); 18 | 19 | } 20 | 21 | public interface Presenter extends BasePresenter { 22 | public void getData(String url,String date); 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/presenter/PreviousLifeDetailContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.presenter; 2 | 3 | import com.xujun.funapp.common.mvp.BasePresenter; 4 | import com.xujun.funapp.common.mvp.BaseView; 5 | 6 | /** 7 | * @author xujun on 2016/12/28. 8 | * @email gdutxiaoxu@163.com 9 | */ 10 | 11 | public interface PreviousLifeDetailContract { 12 | 13 | public interface View extends BaseView { 14 | 15 | public void onReveive(String s); 16 | 17 | public void onError(Throwable throwable); 18 | 19 | } 20 | 21 | public interface Presenter extends BasePresenter { 22 | public void getData(String url, String e_id); 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/presenter/WeChatContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.presenter; 2 | 3 | import com.xujun.funapp.common.mvp.BasePresenter; 4 | import com.xujun.funapp.common.mvp.BaseView; 5 | 6 | /** 7 | * @author xujun on 2016/12/28. 8 | * @email gdutxiaoxu@163.com 9 | */ 10 | 11 | public interface WeChatContract { 12 | 13 | public interface View extends BaseView { 14 | 15 | public void onReveive(String s); 16 | 17 | public void onError(Throwable throwable); 18 | 19 | } 20 | 21 | public interface Presenter extends BasePresenter { 22 | public void getData(String url, String typeId,String key,int page, int needContent); 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/presenter/WeChatPresenter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.presenter; 2 | 3 | import com.xujun.funapp.common.YiYuanConstants; 4 | import com.xujun.funapp.common.mvp.DefaultContract; 5 | import com.xujun.funapp.model.WeChatModel; 6 | 7 | import java.util.HashMap; 8 | 9 | import rx.Subscriber; 10 | 11 | /** 12 | * @author xujun on 2016/12/28. 13 | * @email gdutxiaoxu@163.com 14 | */ 15 | 16 | public class WeChatPresenter extends DefaultContract.Presenter 17 | implements WeChatContract.Presenter { 18 | 19 | private final WeChatModel mWeChatModel; 20 | 21 | public WeChatPresenter(WeChatContract.View view) { 22 | super(view); 23 | mWeChatModel = new WeChatModel(); 24 | } 25 | 26 | 27 | 28 | @Override 29 | public void getData(String url, String typeId,String key,int page, int needContent) { 30 | HashMap map = YiYuanConstants.getParamsMap(); 31 | map.put("typeId",typeId); 32 | map.put("key",key); 33 | map.put("page",page); 34 | map.put("needContent",needContent); 35 | mWeChatModel.getData(url, map, new Subscriber() { 36 | @Override 37 | public void onCompleted() { 38 | 39 | } 40 | 41 | @Override 42 | public void onError(Throwable e) { 43 | WeChatContract.View view = getView(); 44 | if(view!=null){ 45 | view.onError(e); 46 | } 47 | } 48 | 49 | @Override 50 | public void onNext(String s) { 51 | WeChatContract.View view = getView(); 52 | if(view!=null){ 53 | view.onReveive(s); 54 | } 55 | 56 | } 57 | }); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/MainFragmentFactory.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main; 2 | 3 | import android.support.v4.app.Fragment; 4 | 5 | import com.xujun.funapp.view.main.fragment.home.HomeFragment; 6 | import com.xujun.funapp.view.main.fragment.news.YYNewsFragment; 7 | import com.xujun.funapp.view.main.fragment.picture.PictureFragment; 8 | import com.xujun.funapp.view.main.fragment.setting.SettingFragment; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * @ explain: 15 | * @ author:xujun on 2016/9/17 20:02 16 | * @ email:gdutxiaoxu@163.com 17 | */ 18 | public class MainFragmentFactory { 19 | 20 | private List mFragmentList; 21 | private static MainFragmentFactory mInstance; 22 | 23 | public static MainFragmentFactory getInstance() { 24 | if (mInstance == null) { 25 | mInstance = new MainFragmentFactory(); 26 | } 27 | return mInstance; 28 | } 29 | 30 | public Fragment get(int position) { 31 | if (mFragmentList == null) { 32 | mFragmentList = new ArrayList<>(); 33 | mFragmentList.add(new HomeFragment()); 34 | mFragmentList.add(new YYNewsFragment()); 35 | mFragmentList.add(new PictureFragment()); 36 | mFragmentList.add(new SettingFragment()); 37 | } 38 | 39 | return mFragmentList.get(position); 40 | 41 | } 42 | 43 | public List getFragmentList() { 44 | return mFragmentList; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/TestActivity.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | import com.xujun.funapp.R; 7 | 8 | public class TestActivity extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_test); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/news/NewsContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.news; 2 | 3 | import com.xujun.funapp.common.mvp.BasePresenter; 4 | import com.xujun.funapp.common.mvp.BaseView; 5 | 6 | import java.util.Map; 7 | 8 | /** 9 | * @ explain: 10 | * @ author:xujun on 2016/10/27 22:31 11 | * @ email:gdutxiaoxu@163.com 12 | */ 13 | public class NewsContract { 14 | 15 | public interface View extends BaseView{ 16 | 17 | } 18 | 19 | public interface Presenter extends BasePresenter{ 20 | 21 | void getNewsClassify(String url, Map paramsMap); 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/news/NewsListContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.news; 2 | 3 | import com.xujun.funapp.beans.TxNews; 4 | import com.xujun.funapp.common.mvp.BasePresenter; 5 | import com.xujun.funapp.common.mvp.BaseView; 6 | 7 | /** 8 | * @ explain: 9 | * @ author:xujun on 2016/10/27 23:40 10 | * @ email:gdutxiaoxu@163.com 11 | */ 12 | public class NewsListContract { 13 | 14 | public interface View extends BaseView { 15 | 16 | void onReceiveNews(TxNews txNews); 17 | void onReceiveNewsError(Throwable error); 18 | 19 | } 20 | 21 | public interface Presenter extends BasePresenter { 22 | 23 | void getNews(String type, int page, int num); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/news/YYNewsListContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.news; 2 | 3 | import com.xujun.funapp.beans.NewsContentlistEntity; 4 | import com.xujun.funapp.common.mvp.BasePresenter; 5 | import com.xujun.funapp.common.mvp.BaseView; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @ explain: 11 | * @ author:xujun on 2016/10/27 23:40 12 | * @ email:gdutxiaoxu@163.com 13 | */ 14 | public class YYNewsListContract { 15 | 16 | public interface View extends BaseView { 17 | 18 | void onReceiveNews(String result); 19 | void onReceiveNewsError(Throwable error); 20 | void onReceiveLocal(int page, List list); 21 | 22 | } 23 | 24 | public interface Presenter extends BasePresenter { 25 | 26 | void getNews(String channelId, String channelName, int page, int maxResult); 27 | 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/news/YYNewsPresenter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.news; 2 | 3 | import com.xujun.funapp.common.mvp.DefaultContract; 4 | import com.xujun.funapp.common.util.WriteLogUtil; 5 | import com.xujun.funapp.model.NewsModel; 6 | 7 | import java.util.Map; 8 | 9 | import rx.Subscriber; 10 | 11 | /** 12 | * @ explain: 13 | * @ author:xujun on 2016/9/17 20:32 14 | * @ email:gdutxiaoxu@163.com 15 | */ 16 | public class YYNewsPresenter extends DefaultContract.Presenter 17 | implements NewsContract.Presenter{ 18 | 19 | private final NewsModel mNewsModel; 20 | 21 | public YYNewsPresenter(DefaultContract.View view) { 22 | super(view); 23 | mNewsModel = new NewsModel(); 24 | } 25 | 26 | @Override 27 | public void getNewsClassify(String url, Map paramsMap) { 28 | Subscriber subscriber = new Subscriber() { 29 | @Override 30 | public void onCompleted() { 31 | 32 | } 33 | 34 | @Override 35 | public void onError(Throwable e) { 36 | e.printStackTrace(); 37 | DefaultContract.View view = getView(); 38 | WriteLogUtil.e(" e="+e.getMessage()); 39 | if(view!=null){ 40 | view.onError(e); 41 | } 42 | } 43 | 44 | @Override 45 | public void onNext(String result) { 46 | DefaultContract.View view = getView(); 47 | // WriteLogUtil.i(" 请求成功="); 48 | if(view!=null){ 49 | view.onSuccess(result); 50 | } 51 | } 52 | 53 | }; 54 | mNewsModel.getNewsClassify(url,paramsMap,subscriber); 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/picture/PictureListContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.picture; 2 | 3 | import com.xujun.funapp.common.mvp.BasePresenter; 4 | import com.xujun.funapp.common.mvp.BaseView; 5 | import com.xujun.funapp.common.mvp.DefaultContract; 6 | 7 | /** 8 | * @ explain: 9 | * @ author:xujun on 2016/9/18 21:18 10 | * @ email:gdutxiaoxu@163.com 11 | */ 12 | public class PictureListContract { 13 | 14 | public interface View extends DefaultContract.View { 15 | 16 | } 17 | 18 | public interface Presenter

extends BasePresenter{ 19 | 20 | void getPictureList(String page, String rows, int id); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/picture/PictureListPresenter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.picture; 2 | 3 | import com.xujun.funapp.beans.PictureListBean; 4 | import com.xujun.funapp.common.mvp.DefaultContract; 5 | import com.xujun.funapp.model.PictureListModel; 6 | import com.xujun.funapp.common.network.RequestListener; 7 | 8 | /** 9 | * @ explain: 10 | * @ author:xujun on 2016/9/18 21:17 11 | * @ email:gdutxiaoxu@163.com 12 | */ 13 | public class PictureListPresenter extends DefaultContract.Presenter 14 | implements PictureListContract.Presenter { 15 | 16 | 17 | public static final String[] tags = new String[]{ 18 | "0", "1", "2", "3", "4", "5", "6", "7" 19 | }; 20 | private final PictureListModel mModel; 21 | 22 | 23 | public PictureListPresenter(PictureListContract.View view) { 24 | super(view); 25 | mModel = new PictureListModel(); 26 | } 27 | 28 | @Override 29 | public void getPictureList(String page, String rows, int id) { 30 | mModel.getPictureList(page, rows, id, new RequestListener() { 31 | @Override 32 | public void onSuccess(PictureListBean pictureListBean) { 33 | PictureListContract.View view = getView(); 34 | if (view != null) { 35 | view.onSuccess(pictureListBean); 36 | } 37 | } 38 | 39 | @Override 40 | public void onError(Throwable throwable) { 41 | PictureListContract.View view = getView(); 42 | if (view != null) { 43 | view.onError(throwable); 44 | 45 | } 46 | } 47 | }); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/picture/PicturePresenter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.picture; 2 | 3 | import com.xujun.funapp.beans.PictureClassify; 4 | import com.xujun.funapp.common.mvp.DefaultContract; 5 | import com.xujun.funapp.model.PictureModel; 6 | 7 | import org.simple.eventbus.Subscriber; 8 | 9 | /** 10 | * @ explain: 11 | * @ author:xujun on 2016/9/17 20:32 12 | * @ email:gdutxiaoxu@163.com 13 | */ 14 | public class PicturePresenter extends DefaultContract.Presenter { 15 | 16 | public PicturePresenter(DefaultContract.View view) { 17 | super(view); 18 | } 19 | 20 | 21 | @Subscriber 22 | public void onReceive(PictureClassify pictureClassify){ 23 | DefaultContract.View view = getView(); 24 | if(view!=null){ 25 | view.onSuccess(pictureClassify); 26 | } 27 | } 28 | 29 | public void getPictureClassify(){ 30 | PictureModel.getPictureClassify(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/setting/SettingContract.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.setting; 2 | 3 | import com.xujun.funapp.common.mvp.BasePresenter; 4 | import com.xujun.funapp.common.mvp.BaseView; 5 | 6 | /** 7 | * @ explain: 8 | * @ author:xujun on 2016/11/2 11:03 9 | * @ email:gdutxiaoxu@163.com 10 | */ 11 | public interface SettingContract { 12 | 13 | public interface View extends BaseView{ 14 | 15 | } 16 | 17 | public interface Presenter extends BasePresenter{ 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/main/fragment/setting/SettingPresenter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.main.fragment.setting; 2 | 3 | /** 4 | * @ explain: 5 | * @ author:xujun on 2016/11/2 11:04 6 | * @ email:gdutxiaoxu@163.com 7 | */ 8 | public class SettingPresenter implements SettingContract.Presenter { 9 | @Override 10 | public void start() { 11 | 12 | } 13 | 14 | @Override 15 | public void stop() { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/view/search/SearchAdapter.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.view.search; 2 | 3 | import android.content.Context; 4 | import android.widget.TextView; 5 | 6 | import com.xujun.funapp.R; 7 | import com.xujun.funapp.common.recyclerView.BaseRecyclerAdapter; 8 | import com.xujun.funapp.common.recyclerView.BaseRecyclerHolder; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author meitu.xujun on 2017/4/27 13:48 14 | * @version 0.1 15 | */ 16 | 17 | public class SearchAdapter extends BaseRecyclerAdapter { 18 | 19 | public SearchAdapter(Context context, List datas) { 20 | super(context, R.layout.item_search, datas); 21 | } 22 | 23 | @Override 24 | public void convert(BaseRecyclerHolder holder, String item, int position) { 25 | TextView tv=holder.getView(R.id.tv); 26 | String s = mDatas.get(position); 27 | tv.setText(s); 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Fun/src/main/java/com/xujun/funapp/widget/WrapHeightGridView.java: -------------------------------------------------------------------------------- 1 | package com.xujun.funapp.widget; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.GridView; 6 | 7 | /** 8 | * author zaaach on 2015/1/26. 9 | */ 10 | public class WrapHeightGridView extends GridView { 11 | public WrapHeightGridView(Context context) { 12 | this(context, null); 13 | } 14 | 15 | public WrapHeightGridView(Context context, AttributeSet attrs) { 16 | this(context, attrs, 0); 17 | } 18 | 19 | public WrapHeightGridView(Context context, AttributeSet attrs, int defStyleAttr) { 20 | super(context, attrs, defStyleAttr); 21 | } 22 | 23 | @Override 24 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 25 | int heightSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); 26 | super.onMeasure(widthMeasureSpec, heightSpec); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/back.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/back_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/back_red.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/bottom_tab_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/bottom_tab_bg.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/btn_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/btn_normal.9.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/btn_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/btn_pressed.9.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/button_red_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/button_red_normal.9.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/button_red_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/button_red_pressed.9.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/common_listview_headview_red_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/common_listview_headview_red_arrow.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/fortune.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/fortune.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/fortune_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/fortune_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/govaffairs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/govaffairs.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/govaffairs_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/govaffairs_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/home.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/home_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/home_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/ic_empty_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/ic_empty_page.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/ic_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/ic_error.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/ic_error_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/ic_error_page.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/ic_progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/ic_progress.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/icon_pic_grid_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/icon_pic_grid_type.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/icon_pic_list_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/icon_pic_list_type.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/icon_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/icon_share.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/icon_textsize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/icon_textsize.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/img_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/img_menu.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/meitu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/meitu.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/meitu_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/meitu_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/menu_arr_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/menu_arr_normal.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/menu_arr_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/menu_arr_select.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/more.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/movie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/movie.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/movie_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/movie_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/news.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/news_cate_arr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/news_cate_arr.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/news_pic_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/news_pic_default.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/news_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/news_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/newscenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/newscenter.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/newscenter_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/newscenter_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/pic_item_list_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/pic_item_list_default.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/pic_list_item_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/pic_list_item_bg.9.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/search.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/search_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/search_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/setting.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/setting_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/setting_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/shi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/shi.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/shi_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/shi_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/smartservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/smartservice.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/smartservice_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/smartservice_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/sport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/sport.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/sport_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/sport_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/ssdk_oks_ptr_ptr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/ssdk_oks_ptr_ptr.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/title_red_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/title_red_bg.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/wechat.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/wechat_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/wechat_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/xiaohua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/xiaohua.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable-hdpi/xiaohua_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdutxiaoxu/FunAPP/78952b38d81ffecfe67ac63bd3f63da6e312eeb2/Fun/src/main/res/drawable-hdpi/xiaohua_press.png -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/background_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/btn_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/icon_direct_seeding.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 29 | 30 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/overlay_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/search_box_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_back.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_bg_setting_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_bottom_tab_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_fortune.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_movie.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_news.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_picture.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_setting.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_shi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_sport.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_wechat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/drawable/sel_xiaohua.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Fun/src/main/res/layout/activity_gpslocation.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |