├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── BaiduLBS_Android.jar │ ├── IndoorscapeAlbumPlugin.jar │ ├── arm64-v8a │ │ ├── libBaiduMapSDK_base_v4_0_0.so │ │ ├── libBaiduMapSDK_cloud_v4_0_0.so │ │ ├── libBaiduMapSDK_map_v4_0_0.so │ │ ├── libBaiduMapSDK_radar_v4_0_0.so │ │ ├── libBaiduMapSDK_search_v4_0_0.so │ │ ├── libBaiduMapSDK_util_v4_0_0.so │ │ └── liblocSDK7.so │ ├── armeabi-v7a │ │ └── liblocSDK7.so │ ├── armeabi │ │ ├── libBaiduMapSDK_base_v4_0_0.so │ │ ├── libBaiduMapSDK_map_v4_0_0.so │ │ ├── libBaiduMapSDK_util_v4_0_0.so │ │ └── liblocSDK7.so │ ├── httpmime-4.1.2.jar │ ├── x86 │ │ └── liblocSDK7.so │ └── x86_64 │ │ └── liblocSDK7.so ├── proguard-rules.pro ├── src │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── leonwang │ │ │ └── app │ │ │ └── chinashop │ │ │ └── ExampleInstrumentedTest.java │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ │ ├── china_cities.db │ │ │ ├── location.db │ │ │ └── weather.db │ │ ├── java │ │ │ └── com │ │ │ │ └── leonwang │ │ │ │ └── app │ │ │ │ └── chinashop │ │ │ │ ├── adapter │ │ │ │ ├── CityListAdapter.java │ │ │ │ ├── HotCityGridAdapter.java │ │ │ │ ├── LolVideoAdapter.java │ │ │ │ ├── NewsPagerAdapter.java │ │ │ │ ├── RefreshCallback.java │ │ │ │ ├── ResultListAdapter.java │ │ │ │ ├── SwipeAdapter.java │ │ │ │ ├── SwipeAdapter1.java │ │ │ │ ├── TopNewsAdapter.java │ │ │ │ ├── VedioPagerAdapter.java │ │ │ │ ├── ZhiShuAdapter.java │ │ │ │ └── vhs │ │ │ │ │ ├── LolVideoViewHolder.java │ │ │ │ │ ├── TopNewsViewHolder.java │ │ │ │ │ └── baseVhs │ │ │ │ │ ├── DefVH.java │ │ │ │ │ └── MoreVH.java │ │ │ │ ├── baidulocation │ │ │ │ ├── LocationService.java │ │ │ │ └── Utils.java │ │ │ │ ├── base │ │ │ │ ├── RxAppCompatBaseActivity.java │ │ │ │ └── RxLazyBaseFragment.java │ │ │ │ ├── config │ │ │ │ ├── App.java │ │ │ │ ├── AppManager.java │ │ │ │ └── FragmentFactory.java │ │ │ │ ├── db │ │ │ │ └── dao │ │ │ │ │ ├── CityDao.java │ │ │ │ │ ├── DBManager.java │ │ │ │ │ ├── DBOpenHelper.java │ │ │ │ │ ├── LocateState.java │ │ │ │ │ └── bean │ │ │ │ │ └── City.java │ │ │ │ ├── entity │ │ │ │ ├── TopNewsEntity.java │ │ │ │ ├── VideoEntity.java │ │ │ │ ├── WeatherAqiEntity.java │ │ │ │ ├── WeatherDay5Entity.java │ │ │ │ ├── WeatherMZEntity.java │ │ │ │ └── WeatherNowEntity.java │ │ │ │ ├── iml │ │ │ │ ├── SwipeHelper.java │ │ │ │ ├── SwipeItemCallback.java │ │ │ │ └── SwipeRefreshCallback.java │ │ │ │ ├── net │ │ │ │ ├── RetrofitHelper.java │ │ │ │ └── api │ │ │ │ │ ├── LolVedioService.java │ │ │ │ │ ├── TopNewsService.java │ │ │ │ │ ├── WeatherAqiService.java │ │ │ │ │ ├── WeatherDay5Service.java │ │ │ │ │ ├── WeatherMZService.java │ │ │ │ │ └── WeatherNowService.java │ │ │ │ ├── rx │ │ │ │ ├── EventBusUtils.java │ │ │ │ └── RxBus.java │ │ │ │ ├── ui │ │ │ │ ├── activity │ │ │ │ │ ├── CityLocationActivity.java │ │ │ │ │ ├── LolVedioActivity.java │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── NewsDetailActivity.java │ │ │ │ │ └── SplashActivity.java │ │ │ │ └── fragment │ │ │ │ │ ├── DeveloperFragment.java │ │ │ │ │ ├── DeveloperFragmentCopy.java │ │ │ │ │ ├── NewsFragment.java │ │ │ │ │ ├── VideoFragment.java │ │ │ │ │ ├── ZhihuFragment.java │ │ │ │ │ └── itemFragment │ │ │ │ │ ├── NewsItemFragment.java │ │ │ │ │ └── VideoItemFragment.java │ │ │ │ ├── utils │ │ │ │ ├── AnimUtils.java │ │ │ │ ├── AssetsCopyUtil.java │ │ │ │ ├── CacheUtil.java │ │ │ │ ├── ColorUtils.java │ │ │ │ ├── CommonUtils.java │ │ │ │ ├── ConstantUtils.java │ │ │ │ ├── DateTimeUtil.java │ │ │ │ ├── DecodeUtil.java │ │ │ │ ├── DensityUtil.java │ │ │ │ ├── GpsUtil.java │ │ │ │ ├── JsonUtils.java │ │ │ │ ├── LayoutHelper.java │ │ │ │ ├── LogUtils.java │ │ │ │ ├── MathUtils.java │ │ │ │ ├── NetworkUtil.java │ │ │ │ ├── PermissionUtils.java │ │ │ │ ├── ScreenUtil.java │ │ │ │ ├── SnackBarUtils.java │ │ │ │ ├── StringUtils.java │ │ │ │ ├── TextUtil.java │ │ │ │ ├── ToastUtils.java │ │ │ │ ├── ViewUtils.java │ │ │ │ ├── WeatherIconUtil.java │ │ │ │ └── WebUtil.java │ │ │ │ └── widget │ │ │ │ ├── AqiView.java │ │ │ │ ├── CustomEmptyView.java │ │ │ │ ├── HourForeCastView.java │ │ │ │ ├── LoadMoreRecyclerView.java │ │ │ │ ├── MSwipeRefreshLayout.java │ │ │ │ ├── MyListView.java │ │ │ │ ├── PinyinUtils.java │ │ │ │ ├── SideLetterBar.java │ │ │ │ ├── SunRiseView.java │ │ │ │ ├── SwipeRecyclerView.java │ │ │ │ ├── WeekForecastView.java │ │ │ │ ├── WindForecastView.java │ │ │ │ ├── WindmillView.java │ │ │ │ ├── WrapHeightGridView.java │ │ │ │ └── weather │ │ │ │ ├── BaseAnimView.java │ │ │ │ ├── BaseLine.java │ │ │ │ ├── CloudyView.java │ │ │ │ ├── FogView.java │ │ │ │ ├── HazeLine.java │ │ │ │ ├── RainOrSnowLine.java │ │ │ │ ├── RainSnowHazeView.java │ │ │ │ ├── SkyView.java │ │ │ │ ├── Star.java │ │ │ │ ├── SunnyDayView.java │ │ │ │ └── SunnyNightView.java │ │ └── res │ │ │ ├── anim │ │ │ ├── activity_close_enter.xml │ │ │ ├── activity_close_exit.xml │ │ │ ├── activity_open_enter.xml │ │ │ ├── activity_open_exit.xml │ │ │ ├── anim_left_enter.xml │ │ │ ├── anim_left_exit.xml │ │ │ ├── anim_right_enter.xml │ │ │ └── anim_right_exit.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── ic_arrow_back.png │ │ │ ├── ic_centa_square_logo.png │ │ │ ├── ic_table_normal.9.png │ │ │ ├── loading_image.png │ │ │ ├── progress_outer.png │ │ │ └── zy.png │ │ │ ├── drawable-xxhdpi │ │ │ └── ic_zy_logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── ic_about_change_log.png │ │ │ ├── ic_about_support.png │ │ │ ├── ic_add_white.png │ │ │ ├── ic_baoxue.png │ │ │ ├── ic_baoyu.png │ │ │ ├── ic_chuanyizhishu_white.png │ │ │ ├── ic_cloudy.png │ │ │ ├── ic_cloudy_night.png │ │ │ ├── ic_contact_alipay.png │ │ │ ├── ic_contact_contact.png │ │ │ ├── ic_contact_donate.png │ │ │ ├── ic_contact_email.png │ │ │ ├── ic_contact_notice.png │ │ │ ├── ic_contact_qqgroup.png │ │ │ ├── ic_contact_weibo.png │ │ │ ├── ic_daxue.png │ │ │ ├── ic_dayu.png │ │ │ ├── ic_delete.png │ │ │ ├── ic_dialog_select_pic.png │ │ │ ├── ic_drawer_about.png │ │ │ ├── ic_drawer_add.png │ │ │ ├── ic_drawer_check_update.png │ │ │ ├── ic_drawer_contact.png │ │ │ ├── ic_drawer_help.png │ │ │ ├── ic_drawer_manage.png │ │ │ ├── ic_drawer_setting.png │ │ │ ├── ic_fog.png │ │ │ ├── ic_gantanhao.png │ │ │ ├── ic_leizhenyu.png │ │ │ ├── ic_liangshaizhishu_white.png │ │ │ ├── ic_locate_city.png │ │ │ ├── ic_mai.png │ │ │ ├── ic_match.png │ │ │ ├── ic_na.png │ │ │ ├── ic_notification_alarm.png │ │ │ ├── ic_overcast.png │ │ │ ├── ic_rectangle.png │ │ │ ├── ic_right_arrow.png │ │ │ ├── ic_settings_animation.png │ │ │ ├── ic_settings_custom.png │ │ │ ├── ic_settings_houtai.png │ │ │ ├── ic_settings_notification.png │ │ │ ├── ic_settings_others.png │ │ │ ├── ic_settings_widget.png │ │ │ ├── ic_sun.png │ │ │ ├── ic_sun_night.png │ │ │ ├── ic_time_white.png │ │ │ ├── ic_unknow.png │ │ │ ├── ic_weather_tip.png │ │ │ ├── ic_xiaoxue.png │ │ │ ├── ic_xiaoyu.png │ │ │ ├── ic_xichezhishu_white.png │ │ │ ├── ic_yes_animation.png │ │ │ ├── ic_yujiaxue.png │ │ │ ├── ic_yundongzhishu_white.png │ │ │ ├── ic_zhenxue.png │ │ │ ├── ic_zhongxue.png │ │ │ ├── ic_zhongyu.png │ │ │ ├── ic_ziwaixian_white.png │ │ │ ├── nav_night.png │ │ │ ├── widget_big_clock_simple.png │ │ │ ├── widget_clock_more.png │ │ │ ├── widget_clock_simple.png │ │ │ ├── widget_clock_week.png │ │ │ └── widget_no_clock_simple.png │ │ │ ├── drawable │ │ │ ├── corner_btn.xml │ │ │ ├── custom_progress.xml │ │ │ ├── ic_action_clear.xml │ │ │ ├── ic_action_voice.xml │ │ │ ├── ic_chevron_right_gray_24dp.xml │ │ │ ├── ic_file_download.xml │ │ │ ├── item_table_selector.xml │ │ │ ├── line_button_bg.xml │ │ │ ├── line_button_normal.xml │ │ │ ├── line_button_pressed.xml │ │ │ ├── mask_news_detail_photo.xml │ │ │ ├── overlay_bg.xml │ │ │ ├── progress_bar_horizontal.xml │ │ │ ├── progress_dialog_bg.xml │ │ │ ├── progress_horizontal_material.xml │ │ │ ├── search_box_bg.xml │ │ │ └── shape_rectangle_f0.xml │ │ │ ├── layout │ │ │ ├── act_news_detail.xml │ │ │ ├── activity_city_list.xml │ │ │ ├── activity_lol_video.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_newsdetails.xml │ │ │ ├── activity_splash.xml │ │ │ ├── aqi.xml │ │ │ ├── arrow_table.xml │ │ │ ├── content_main.xml │ │ │ ├── fragment_developer.xml │ │ │ ├── fragment_item.xml │ │ │ ├── fragment_news.xml │ │ │ ├── fragment_news_item.xml │ │ │ ├── fragment_video.xml │ │ │ ├── fragment_video_item.xml │ │ │ ├── fragment_zhihu.xml │ │ │ ├── item_city_listview.xml │ │ │ ├── item_hot_city_gridview.xml │ │ │ ├── item_living_index_simple.xml │ │ │ ├── item_search_result_listview.xml │ │ │ ├── item_swipe_def.xml │ │ │ ├── item_swipe_more.xml │ │ │ ├── item_videos.xml │ │ │ ├── layout_custom_load.xml │ │ │ ├── layout_empty.xml │ │ │ ├── layout_progress_dialog.xml │ │ │ ├── layout_special_custom_load.xml │ │ │ ├── layout_toolbar.xml │ │ │ ├── list_foot_loading.xml │ │ │ ├── opt_item.xml │ │ │ ├── sun_rise.xml │ │ │ ├── swiperecyclerview.xml │ │ │ ├── top_news_item.xml │ │ │ ├── view_hot_city.xml │ │ │ ├── view_locate_city.xml │ │ │ ├── view_no_search_result.xml │ │ │ ├── view_search.xml │ │ │ ├── wind.xml │ │ │ └── zhishu.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── happyreader_logo.png │ │ │ ├── ic_launcher.png │ │ │ ├── ic_locate.png │ │ │ ├── ic_search.png │ │ │ ├── ic_search_clear.png │ │ │ └── toolbar_logo.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── main_icon_code.png │ │ │ ├── main_icon_news.png │ │ │ ├── main_icon_vedio.png │ │ │ └── main_icon_zhihu.png │ │ │ ├── values-hdpi │ │ │ └── dimens.xml │ │ │ ├── values-v19 │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ ├── dimens.xml │ │ │ └── strings.xml │ │ │ ├── values-xhdpi │ │ │ └── dimens.xml │ │ │ ├── values-xxhdpi │ │ │ └── dimens.xml │ │ │ ├── values-xxxhdpi │ │ │ └── dimens.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── drawables.xml │ │ │ ├── ids.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ └── test │ │ └── java │ │ └── com │ │ └── leonwang │ │ └── app │ │ └── chinashop │ │ └── ExampleUnitTest.java └── weiyue.jks ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── ijkplayerlibrary ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── tv │ │ └── danmaku │ │ └── ijk │ │ └── media │ │ └── player │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── tv │ │ │ └── danmaku │ │ │ └── ijk │ │ │ └── media │ │ │ └── player │ │ │ ├── AbstractMediaPlayer.java │ │ │ ├── AndroidMediaPlayer.java │ │ │ ├── IMediaPlayer.java │ │ │ ├── ISurfaceTextureHolder.java │ │ │ ├── ISurfaceTextureHost.java │ │ │ ├── IjkLibLoader.java │ │ │ ├── IjkMediaCodecInfo.java │ │ │ ├── IjkMediaMeta.java │ │ │ ├── IjkMediaPlayer.java │ │ │ ├── MediaInfo.java │ │ │ ├── MediaPlayerProxy.java │ │ │ ├── TextureMediaPlayer.java │ │ │ ├── annotations │ │ │ ├── AccessedByNative.java │ │ │ └── CalledByNative.java │ │ │ ├── exceptions │ │ │ └── IjkMediaException.java │ │ │ ├── ffmpeg │ │ │ └── FFmpegApi.java │ │ │ ├── misc │ │ │ ├── AndroidMediaFormat.java │ │ │ ├── AndroidTrackInfo.java │ │ │ ├── IMediaDataSource.java │ │ │ ├── IMediaFormat.java │ │ │ ├── ITrackInfo.java │ │ │ ├── IjkMediaFormat.java │ │ │ └── IjkTrackInfo.java │ │ │ ├── pragma │ │ │ ├── DebugLog.java │ │ │ └── Pragma.java │ │ │ └── widget │ │ │ ├── IMediaController.java │ │ │ ├── IRenderView.java │ │ │ ├── IjkVideoView.java │ │ │ ├── MeasureHelper.java │ │ │ ├── MediaPlayerCompat.java │ │ │ ├── SurfaceRenderView.java │ │ │ └── TextureRenderView.java │ ├── jniLibs │ │ ├── arm64-v8a │ │ │ ├── libijkffmpeg.so │ │ │ ├── libijkplayer.so │ │ │ └── libijksdl.so │ │ ├── armeabi-v7a │ │ │ ├── libijkffmpeg.so │ │ │ ├── libijkplayer.so │ │ │ └── libijksdl.so │ │ ├── armeabi │ │ │ ├── libijkffmpeg.so │ │ │ ├── libijkplayer.so │ │ │ └── libijksdl.so │ │ └── x86 │ │ │ ├── libijkffmpeg.so │ │ │ ├── libijkplayer.so │ │ │ └── libijksdl.so │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── tv │ └── danmaku │ └── ijk │ └── media │ └── player │ └── ExampleUnitTest.java ├── screenshot ├── downloadimage.jpg ├── wechat.jpg ├── 天气.gif ├── 视频.gif └── 资讯.gif ├── settings.gradle └── superplayerlibrary ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src ├── androidTest └── java │ └── com │ └── superplayer │ └── library │ └── ApplicationTest.java ├── main ├── AndroidManifest.xml ├── java │ └── com │ │ └── superplayer │ │ └── library │ │ ├── SuperPlayer.java │ │ ├── SuperPlayerManage.java │ │ ├── Test.java │ │ ├── mediaplayer │ │ ├── IMediaController.java │ │ ├── IRenderView.java │ │ ├── IjkVideoView.java │ │ ├── MeasureHelper.java │ │ ├── SurfaceRenderView.java │ │ └── TextureRenderView.java │ │ └── utils │ │ ├── NetUtils.java │ │ └── SuperPlayerUtils.java └── res │ ├── drawable-hdpi │ └── ic_launcher.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── drawable-xhdpi │ ├── ic_back.png │ ├── ic_brightness_6_white_36dp.png │ ├── ic_center_pause.png │ ├── ic_center_play.png │ ├── ic_chevron_left_white_36dp.png │ ├── ic_circles.png │ ├── ic_enlarge.png │ ├── ic_fullscreen_exit_white_24dp.png │ ├── ic_fullscreen_exit_white_36dp.png │ ├── ic_fullscreen_white_24dp.png │ ├── ic_launcher.png │ ├── ic_live_number.png │ ├── ic_not_fullscreen.png │ ├── ic_pause.png │ ├── ic_play.png │ ├── ic_play_arrow_white_24dp.png │ ├── ic_play_circle_outline_white_36dp.png │ ├── ic_setting.png │ ├── ic_share.png │ ├── ic_stop_white_24dp.png │ ├── ic_volume_off_white_36dp.png │ └── ic_volume_up_white_36dp.png │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── drawable │ ├── app_video_center_bg.xml │ ├── bg_jky_player_continue.xml │ └── jky_player_progressbar.xml │ ├── layout │ ├── view_super_player.xml │ ├── view_super_player_bottom.xml │ ├── view_super_player_center.xml │ ├── view_super_player_control.xml │ └── view_super_player_top.xml │ └── values │ ├── strings.xml │ └── styles.xml └── test └── java └── com └── superplayer └── library └── ExampleUnitTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | .gradle/ 3 | .idea/ 4 | app/build/ 5 | build/ 6 | local.properties 7 | *.iml -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | .gradle/ 3 | .idea/ 4 | app/build/ 5 | build/ 6 | gradle/ 7 | local.properties 8 | *.iml 9 | -------------------------------------------------------------------------------- /app/libs/BaiduLBS_Android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/BaiduLBS_Android.jar -------------------------------------------------------------------------------- /app/libs/IndoorscapeAlbumPlugin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/IndoorscapeAlbumPlugin.jar -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libBaiduMapSDK_base_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/arm64-v8a/libBaiduMapSDK_base_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libBaiduMapSDK_cloud_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/arm64-v8a/libBaiduMapSDK_cloud_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libBaiduMapSDK_map_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/arm64-v8a/libBaiduMapSDK_map_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libBaiduMapSDK_radar_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/arm64-v8a/libBaiduMapSDK_radar_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libBaiduMapSDK_search_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/arm64-v8a/libBaiduMapSDK_search_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/libBaiduMapSDK_util_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/arm64-v8a/libBaiduMapSDK_util_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/arm64-v8a/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/arm64-v8a/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/armeabi-v7a/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/armeabi-v7a/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/armeabi/libBaiduMapSDK_base_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/armeabi/libBaiduMapSDK_base_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/armeabi/libBaiduMapSDK_map_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/armeabi/libBaiduMapSDK_map_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/armeabi/libBaiduMapSDK_util_v4_0_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/armeabi/libBaiduMapSDK_util_v4_0_0.so -------------------------------------------------------------------------------- /app/libs/armeabi/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/armeabi/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/httpmime-4.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/httpmime-4.1.2.jar -------------------------------------------------------------------------------- /app/libs/x86/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/x86/liblocSDK7.so -------------------------------------------------------------------------------- /app/libs/x86_64/liblocSDK7.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/libs/x86_64/liblocSDK7.so -------------------------------------------------------------------------------- /app/src/androidTest/java/com/leonwang/app/chinashop/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.leonwang.app.chinashop", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/assets/china_cities.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/assets/china_cities.db -------------------------------------------------------------------------------- /app/src/main/assets/location.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/assets/location.db -------------------------------------------------------------------------------- /app/src/main/assets/weather.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/assets/weather.db -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/HotCityGridAdapter.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.BaseAdapter; 8 | import android.widget.TextView; 9 | 10 | import com.leonwang.app.chinashop.R; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | 16 | 17 | /** 18 | * author zaaach on 2016/1/26. 19 | */ 20 | public class HotCityGridAdapter extends BaseAdapter { 21 | private Context mContext; 22 | private List mCities; 23 | 24 | public HotCityGridAdapter(Context context) { 25 | this.mContext = context; 26 | mCities = new ArrayList<>(); 27 | mCities.add("北京"); 28 | mCities.add("上海"); 29 | mCities.add("广州"); 30 | mCities.add("深圳"); 31 | mCities.add("杭州"); 32 | mCities.add("南京"); 33 | mCities.add("天津"); 34 | mCities.add("武汉"); 35 | mCities.add("重庆"); 36 | } 37 | 38 | @Override 39 | public int getCount() { 40 | return mCities == null ? 0 : mCities.size(); 41 | } 42 | 43 | @Override 44 | public String getItem(int position) { 45 | return mCities == null ? null : mCities.get(position); 46 | } 47 | 48 | @Override 49 | public long getItemId(int position) { 50 | return position; 51 | } 52 | 53 | @Override 54 | public View getView(int position, View view, ViewGroup parent) { 55 | HotCityViewHolder holder; 56 | if (view == null){ 57 | view = LayoutInflater.from(mContext).inflate(R.layout.item_hot_city_gridview, parent, false); 58 | holder = new HotCityViewHolder(); 59 | holder.name = (TextView) view.findViewById(R.id.tv_hot_city_name); 60 | view.setTag(holder); 61 | }else{ 62 | holder = (HotCityViewHolder) view.getTag(); 63 | } 64 | holder.name.setText(mCities.get(position)); 65 | return view; 66 | } 67 | 68 | public static class HotCityViewHolder{ 69 | TextView name; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/LolVideoAdapter.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.v7.widget.RecyclerView; 5 | import android.view.View; 6 | import android.widget.ImageView; 7 | 8 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 9 | import com.leonwang.app.chinashop.R; 10 | import com.leonwang.app.chinashop.adapter.vhs.LolVideoViewHolder; 11 | import com.leonwang.app.chinashop.config.App; 12 | import com.leonwang.app.chinashop.entity.VideoEntity.DataEntity; 13 | import com.leonwang.app.chinashop.iml.SwipeItemCallback; 14 | 15 | /** 16 | * 当前类注释: 17 | * Author :LeonWang 18 | * Created 2016/9/27.16:27 19 | * Description: 20 | * E-mail:lijiawangjun@gmail.com 21 | */ 22 | 23 | public class LolVideoAdapter extends SwipeAdapter1 { 24 | 25 | 26 | public LolVideoAdapter(Context context, SwipeItemCallback swipeItemCallback) { 27 | super(context, swipeItemCallback); 28 | } 29 | 30 | @Override 31 | protected int userLayoutResId() { 32 | return R.layout.item_videos; 33 | } 34 | 35 | @Override 36 | protected LolVideoViewHolder createUserViewHolder(View view) { 37 | return new LolVideoViewHolder(view); 38 | } 39 | 40 | @Override 41 | protected LolVideoViewHolder castVH(RecyclerView.ViewHolder holder) { 42 | return (LolVideoViewHolder) holder; 43 | } 44 | 45 | @Override 46 | public void bindUserViewHolder(LolVideoViewHolder holder, int position) { 47 | mList.size(); 48 | DataEntity dataEntity = mList.get(position); 49 | holder.mTvTitle.setText(dataEntity.getTitle()); 50 | holder.mTvDesc.setText(dataEntity.getDesc()); 51 | holder.mIvNews.setScaleType(ImageView.ScaleType.FIT_XY); 52 | App.getInstance().displayImage(dataEntity.getPic_url(),holder.mIvNews,0,true, DiskCacheStrategy.ALL); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/NewsPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.support.v4.app.FragmentManager; 5 | import android.support.v4.app.FragmentPagerAdapter; 6 | 7 | import com.leonwang.app.chinashop.config.FragmentFactory; 8 | import com.leonwang.app.chinashop.ui.fragment.itemFragment.NewsItemFragment; 9 | import com.leonwang.app.chinashop.utils.ConstantUtils; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * 当前类注释:首页新闻模块 15 | * Author :LeonWang 16 | * Created 2016/9/22.15:04 17 | * Description: 18 | * E-mail:lijiawangjun@gmail.com 19 | */ 20 | 21 | public class NewsPagerAdapter extends FragmentPagerAdapter{ 22 | private List mTabTitleList; 23 | 24 | public NewsPagerAdapter(FragmentManager fm,List list) { 25 | super(fm); 26 | mTabTitleList = list; 27 | } 28 | 29 | @Override 30 | public Fragment getItem(int position) { 31 | NewsItemFragment fragment = 32 | (NewsItemFragment) FragmentFactory.creatNewsFragment(mTabTitleList.get(position)); 33 | ConstantUtils.ENewsType[] newsTypes = ConstantUtils.ENewsType.values(); 34 | fragment.setNewsType(newsTypes[position]); 35 | return fragment; 36 | } 37 | 38 | @Override 39 | public int getCount() { 40 | return mTabTitleList.size(); 41 | } 42 | 43 | @Override 44 | public CharSequence getPageTitle(int position) { 45 | return mTabTitleList.get(position); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/RefreshCallback.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter; 2 | 3 | 4 | import com.leonwang.app.chinashop.iml.SwipeRefreshCallback; 5 | 6 | /** 7 | * Author :LeonWang 8 | *

9 | * Created 2016/9/26.15:03 10 | *

11 | * 描述:刷新回调 12 | */ 13 | 14 | public abstract class RefreshCallback implements SwipeRefreshCallback { 15 | 16 | @Override 17 | public void refreshComplete() { 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/ResultListAdapter.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.BaseAdapter; 8 | import android.widget.TextView; 9 | import com.leonwang.app.chinashop.R; 10 | import com.leonwang.app.chinashop.db.dao.bean.City; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * author zaaach on 2016/1/26. 16 | */ 17 | public class ResultListAdapter extends BaseAdapter { 18 | private Context mContext; 19 | private List mCities; 20 | 21 | public ResultListAdapter(Context mContext, List mCities) { 22 | this.mCities = mCities; 23 | this.mContext = mContext; 24 | } 25 | 26 | public void changeData(List list){ 27 | if (mCities == null){ 28 | mCities = list; 29 | }else{ 30 | mCities.clear(); 31 | mCities.addAll(list); 32 | } 33 | notifyDataSetChanged(); 34 | } 35 | 36 | @Override 37 | public int getCount() { 38 | return mCities == null ? 0 : mCities.size(); 39 | } 40 | 41 | @Override 42 | public City getItem(int position) { 43 | return mCities == null ? null : mCities.get(position); 44 | } 45 | 46 | @Override 47 | public long getItemId(int position) { 48 | return position; 49 | } 50 | 51 | @Override 52 | public View getView(int position, View view, ViewGroup parent) { 53 | ResultViewHolder holder; 54 | if (view == null){ 55 | view = LayoutInflater.from(mContext).inflate(R.layout.item_search_result_listview, parent, false); 56 | holder = new ResultViewHolder(); 57 | holder.name = (TextView) view.findViewById(R.id.tv_item_result_listview_name); 58 | view.setTag(holder); 59 | }else{ 60 | holder = (ResultViewHolder) view.getTag(); 61 | } 62 | holder.name.setText(mCities.get(position).getName()); 63 | return view; 64 | } 65 | 66 | public static class ResultViewHolder{ 67 | TextView name; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/SwipeAdapter1.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter; 2 | 3 | import android.content.Context; 4 | import android.support.annotation.LayoutRes; 5 | import android.support.v7.widget.RecyclerView; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | import com.leonwang.app.chinashop.iml.SwipeItemCallback; 10 | 11 | 12 | /** 13 | * Author :LeonWang 14 | *

15 | * Created 2016/9/26.15:03 16 | *

17 | * 描述:一种ViewType基类 18 | */ 19 | 20 | public abstract class SwipeAdapter1 extends SwipeAdapter { 21 | 22 | public SwipeAdapter1(Context context, SwipeItemCallback swipeItemCallback) { 23 | super(context, swipeItemCallback); 24 | } 25 | 26 | /** 27 | * 用户item布局id 28 | */ 29 | @LayoutRes 30 | protected abstract int userLayoutResId(); 31 | 32 | /** 33 | * 创建用户ViewHolder 34 | */ 35 | protected abstract UVH createUserViewHolder(View view); 36 | 37 | @Override 38 | public UVH userViewHolder(ViewGroup parent, int viewType) { 39 | return createUserViewHolder(mLayoutInflater.inflate(userLayoutResId(), parent, false)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/VedioPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.support.v4.app.FragmentManager; 5 | import android.support.v4.app.FragmentPagerAdapter; 6 | 7 | import com.leonwang.app.chinashop.config.FragmentFactory; 8 | import com.leonwang.app.chinashop.ui.fragment.itemFragment.VideoItemFragment; 9 | import com.leonwang.app.chinashop.utils.ConstantUtils; 10 | import com.leonwang.app.chinashop.utils.LogUtils; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * 当前类注释:视频模块 16 | * Author :LeonWang 17 | * Created 2016/9/22.15:04 18 | * Description: 19 | * E-mail:lijiawangjun@gmail.com 20 | */ 21 | 22 | public class VedioPagerAdapter extends FragmentPagerAdapter{ 23 | private List mTabTitleList; 24 | 25 | public VedioPagerAdapter(FragmentManager fm, List list) { 26 | super(fm); 27 | mTabTitleList = list; 28 | LogUtils.d("----------------mTabTitleList长度--------------"+mTabTitleList.size()); 29 | } 30 | 31 | @Override 32 | public Fragment getItem(int position) { 33 | VideoItemFragment fragment = 34 | (VideoItemFragment) FragmentFactory.creatVedioFragment(mTabTitleList.get(position)); 35 | ConstantUtils.LolType[] lolTypes = ConstantUtils.LolType.values(); 36 | fragment.setLolType(lolTypes[position]); 37 | return fragment; 38 | } 39 | 40 | @Override 41 | public int getCount() { 42 | return mTabTitleList.size(); 43 | } 44 | 45 | @Override 46 | public CharSequence getPageTitle(int position) { 47 | return mTabTitleList.get(position); 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/LolVideoViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter.vhs; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.leonwang.app.chinashop.R; 9 | 10 | import butterknife.BindView; 11 | import butterknife.ButterKnife; 12 | 13 | /** 14 | * 当前类注释: 15 | * Author :LeonWang 16 | * Created 2016/9/27.16:23 17 | * Description: 18 | * E-mail:lijiawangjun@gmail.com 19 | */ 20 | 21 | public class LolVideoViewHolder extends RecyclerView.ViewHolder { 22 | 23 | 24 | @BindView(R.id.ivNews) 25 | public ImageView mIvNews; 26 | @BindView(R.id.tvTitle) 27 | public TextView mTvTitle; 28 | @BindView(R.id.tvDesc) 29 | public TextView mTvDesc; 30 | 31 | public LolVideoViewHolder(View itemView) { 32 | super(itemView); 33 | // LayoutInflater.from(App.getInstance()).inflate(R.layout.item_videos, null); 34 | ButterKnife.bind(this, itemView); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/TopNewsViewHolder.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter.vhs; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | import android.view.View; 5 | import android.widget.ImageView; 6 | import android.widget.TextView; 7 | 8 | import com.leonwang.app.chinashop.R; 9 | 10 | import butterknife.BindView; 11 | import butterknife.ButterKnife; 12 | 13 | /** 14 | * 当前类注释:新闻 15 | * Author :LeonWang 16 | * Created 2016/9/23.14:37 17 | * Description: 18 | * E-mail:lijiawangjun@gmail.com 19 | */ 20 | 21 | public class TopNewsViewHolder extends RecyclerView.ViewHolder { 22 | 23 | @BindView(R.id.tv_tab) 24 | public TextView mTvTab; 25 | @BindView(R.id.tv_tab2) 26 | public TextView mTvTab2; 27 | @BindView(R.id.tv_title) 28 | public TextView mTvTitle; 29 | @BindView(R.id.tv_desc) 30 | public TextView mTvDesc; 31 | @BindView(R.id.iv_item) 32 | public ImageView mImageView; 33 | @BindView(R.id.tv_time) 34 | public TextView mTvTime; 35 | 36 | public TopNewsViewHolder(View itemView) { 37 | super(itemView); 38 | ButterKnife.bind(this, itemView); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/baseVhs/DefVH.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter.vhs.baseVhs; 2 | 3 | import android.support.v7.widget.AppCompatTextView; 4 | import android.support.v7.widget.RecyclerView; 5 | import android.view.View; 6 | import android.widget.ImageView; 7 | 8 | import com.leonwang.app.chinashop.R; 9 | 10 | 11 | /** 12 | * Author :LeonWang 13 | *

14 | * Created 2016/9/26.15:03 15 | *

16 | * 描述:默认VH 17 | */ 18 | @SuppressWarnings("all") 19 | public class DefVH extends RecyclerView.ViewHolder { 20 | 21 | public ImageView mImgSwipeDef; 22 | public AppCompatTextView mAtvSwipeDef; 23 | 24 | public DefVH(View itemView) { 25 | super(itemView); 26 | mImgSwipeDef = (ImageView) itemView.findViewById(R.id.img_swipe_def); 27 | mAtvSwipeDef = (AppCompatTextView) itemView.findViewById(R.id.atv_swipe_def); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/adapter/vhs/baseVhs/MoreVH.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.adapter.vhs.baseVhs; 2 | 3 | import android.support.v7.widget.AppCompatTextView; 4 | import android.support.v7.widget.RecyclerView; 5 | import android.view.View; 6 | import android.widget.ProgressBar; 7 | 8 | import com.leonwang.app.chinashop.R; 9 | 10 | 11 | /** 12 | * Author :LeonWang 13 | *

14 | * Created 2016/9/26.15:03 15 | *

16 | * 描述:更多VH 17 | */ 18 | 19 | public class MoreVH extends RecyclerView.ViewHolder { 20 | 21 | public AppCompatTextView mAtvSwipeMore; 22 | public ProgressBar mPbSwipeMore; 23 | 24 | public MoreVH(View itemView) { 25 | super(itemView); 26 | mAtvSwipeMore = (AppCompatTextView) itemView.findViewById(R.id.atv_swipe_more); 27 | mPbSwipeMore = (ProgressBar) itemView.findViewById(R.id.pb_swipe_more); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/baidulocation/Utils.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.baidulocation; 2 | 3 | public class Utils { 4 | public final static String CoorType_GCJ02 = "gcj02"; 5 | public final static String CoorType_BD09LL= "bd09ll"; 6 | public final static String CoorType_BD09MC= "bd09"; 7 | /*** 8 | *61 : GPS定位结果,GPS定位成功。 9 | *62 : 无法获取有效定位依据,定位失败,请检查运营商网络或者wifi网络是否正常开启,尝试重新请求定位。 10 | *63 : 网络异常,没有成功向服务器发起请求,请确认当前测试手机网络是否通畅,尝试重新请求定位。 11 | *65 : 定位缓存的结果。 12 | *66 : 离线定位结果。通过requestOfflineLocaiton调用时对应的返回结果。 13 | *67 : 离线定位失败。通过requestOfflineLocaiton调用时对应的返回结果。 14 | *68 : 网络连接失败时,查找本地离线定位时对应的返回结果。 15 | *161: 网络定位结果,网络定位定位成功。 16 | *162: 请求串密文解析失败。 17 | *167: 服务端定位失败,请您检查是否禁用获取位置信息权限,尝试重新请求定位。 18 | *502: key参数错误,请按照说明文档重新申请KEY。 19 | *505: key不存在或者非法,请按照说明文档重新申请KEY。 20 | *601: key服务被开发者自己禁用,请按照说明文档重新申请KEY。 21 | *602: key mcode不匹配,您的ak配置过程中安全码设置有问题,请确保:sha1正确,“;”分号是英文状态;且包名是您当前运行应用的包名,请按照说明文档重新申请KEY。 22 | *501~700:key验证失败,请按照说明文档重新申请KEY。 23 | */ 24 | 25 | public static float[] EARTH_WEIGHT = {0.1f,0.2f,0.4f,0.6f,0.8f}; // 推算计算权重_地球 26 | //public static float[] MOON_WEIGHT = {0.0167f,0.033f,0.067f,0.1f,0.133f}; 27 | //public static float[] MARS_WEIGHT = {0.034f,0.068f,0.152f,0.228f,0.304f}; 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/config/FragmentFactory.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.config; 2 | 3 | import com.leonwang.app.chinashop.base.RxLazyBaseFragment; 4 | import com.leonwang.app.chinashop.ui.fragment.itemFragment.NewsItemFragment; 5 | import com.leonwang.app.chinashop.ui.fragment.itemFragment.VideoItemFragment; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | /** 11 | * 当前类注释:缓存fragment工厂类 12 | * Author :LeonWang 13 | * Created 2016/9/22.15:08 14 | * Description: 15 | * E-mail:lijiawangjun@gmail.com 16 | */ 17 | 18 | public class FragmentFactory { 19 | 20 | private static Map mCache = new HashMap<>(); 21 | 22 | //新闻fragment 23 | public static RxLazyBaseFragment creatNewsFragment(String tag) { 24 | RxLazyBaseFragment fragment = mCache.get(tag); 25 | if (fragment == null) { 26 | fragment = new NewsItemFragment(); 27 | mCache.put(tag, fragment); 28 | } 29 | return fragment; 30 | } 31 | 32 | //视频fragment 33 | public static RxLazyBaseFragment creatVedioFragment(String tag) { 34 | RxLazyBaseFragment fragment = mCache.get(tag); 35 | if (fragment == null) { 36 | fragment = new VideoItemFragment(); 37 | mCache.put(tag, fragment); 38 | } 39 | return fragment; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/db/dao/DBOpenHelper.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.db.dao; 2 | 3 | import android.content.Context; 4 | import android.database.sqlite.SQLiteDatabase; 5 | import android.database.sqlite.SQLiteOpenHelper; 6 | 7 | public class DBOpenHelper extends SQLiteOpenHelper { 8 | private static final String DBNAME = "weather.db"; 9 | 10 | private static final int VERSION = 2; 11 | 12 | public DBOpenHelper(Context context) { 13 | super(context, DBNAME, null, VERSION); 14 | } 15 | 16 | @Override 17 | public void onCreate(SQLiteDatabase db) { 18 | 19 | } 20 | 21 | @Override 22 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 23 | onCreate(db); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/db/dao/LocateState.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.db.dao; 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 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/db/dao/bean/City.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.db.dao.bean; 2 | 3 | /** 4 | * Created by ghbha on 2016/4/27. 5 | */ 6 | public class City { 7 | private String provinceName; 8 | private String cityName; 9 | private String areaName; 10 | private String weatherId; 11 | private String areaId; 12 | private String name; 13 | private String pinyin; 14 | 15 | public City() {} 16 | 17 | public City(String name, String pinyin) { 18 | this.name = name; 19 | this.pinyin = pinyin; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public void setName(String name) { 27 | this.name = name; 28 | } 29 | 30 | public String getPinyin() { 31 | return pinyin; 32 | } 33 | 34 | public void setPinyin(String pinyin) { 35 | this.pinyin = pinyin; 36 | } 37 | 38 | public String getProvinceName() { 39 | return provinceName; 40 | } 41 | 42 | public void setProvinceName(String provinceName) { 43 | this.provinceName = provinceName; 44 | } 45 | 46 | public String getCityName() { 47 | return cityName; 48 | } 49 | 50 | public void setCityName(String cityName) { 51 | this.cityName = cityName; 52 | } 53 | 54 | public String getAreaName() { 55 | return areaName; 56 | } 57 | 58 | public void setAreaName(String areaName) { 59 | this.areaName = areaName; 60 | } 61 | 62 | public String getWeatherId() { 63 | return weatherId; 64 | } 65 | 66 | public void setWeatherId(String weatherId) { 67 | this.weatherId = weatherId; 68 | } 69 | 70 | public String getAreaId() { 71 | return areaId; 72 | } 73 | 74 | public void setAreaId(String areaId) { 75 | this.areaId = areaId; 76 | } 77 | 78 | @Override 79 | public String toString() { 80 | return "City{" + 81 | "provinceName='" + provinceName + '\'' + 82 | ", cityName='" + cityName + '\'' + 83 | ", areaName='" + areaName + '\'' + 84 | ", weatherId='" + weatherId + '\'' + 85 | ", areaId='" + areaId + '\'' + 86 | ", name='" + name + '\'' + 87 | ", pinyin='" + pinyin + '\'' + 88 | '}'; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/iml/SwipeHelper.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.iml; 2 | 3 | import android.support.v7.widget.RecyclerView; 4 | import android.view.ViewGroup; 5 | 6 | /** 7 | * Created by guilin on 16/7/15. 8 | *

9 | * 描述:列表刷新帮助类 10 | */ 11 | 12 | public interface SwipeHelper { 14 | 15 | DVH defViewHolder(ViewGroup parent); 16 | 17 | MVH moreViewHolder(ViewGroup parent); 18 | 19 | UVH userViewHolder(ViewGroup parent, int viewType); 20 | 21 | void bindDefViewHolder(DVH holder); 22 | 23 | void bindMoreViewHolder(MVH holder); 24 | 25 | void bindUserViewHolder(UVH holder, int position); 26 | 27 | int userDataCount(); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/iml/SwipeItemCallback.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.iml; 2 | 3 | import android.view.View; 4 | 5 | /** 6 | * Created by guilin on 16/7/15. 7 | *

8 | * 描述:swipe列表点击回调 9 | */ 10 | 11 | public interface SwipeItemCallback { 12 | 13 | void callback(View view, int position, E e); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/iml/SwipeRefreshCallback.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.iml; 2 | 3 | /** 4 | * Created by guilin on 16/7/15. 5 | *

6 | * 描述:刷新回调 7 | */ 8 | 9 | public interface SwipeRefreshCallback { 10 | 11 | /** 12 | * 下拉刷新 13 | */ 14 | void downRefresh(); 15 | 16 | /** 17 | * 加载更多 18 | * 19 | * @param count 用户数据 20 | */ 21 | void upRefresh(int count); 22 | 23 | /** 24 | * 刷新完成 25 | */ 26 | void refreshComplete(); 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/net/api/LolVedioService.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.net.api; 2 | 3 | import com.leonwang.app.chinashop.entity.VideoEntity; 4 | 5 | import java.util.Map; 6 | 7 | import retrofit2.http.GET; 8 | import retrofit2.http.QueryMap; 9 | import rx.Observable; 10 | 11 | /** 12 | * 当前类注释:LOL视频 13 | * Author :LeonWang 14 | * Created 2016/9/27.13:45 15 | * Description: 16 | * E-mail:lijiawangjun@gmail.com 17 | */ 18 | 19 | public interface LolVedioService { 20 | 21 | /* @GET("rest/ItemsService/videos{}") 22 | Observable getLolVideoUrl(@Path("catid") String catid, 23 | @Path("catwordid") String catwordid, 24 | @Path("page") String curPage, 25 | @Path("t_") String t_, 26 | @Path("p_") String p_);*/ 27 | 28 | 29 | @GET("rest/ItemsService/videos") 30 | Observable getLolVideoUrl(@QueryMap Map params); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/net/api/TopNewsService.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.net.api; 2 | 3 | import com.leonwang.app.chinashop.entity.TopNewsEntity; 4 | 5 | import retrofit2.http.Field; 6 | import retrofit2.http.FormUrlEncoded; 7 | import retrofit2.http.POST; 8 | import rx.Observable; 9 | 10 | 11 | /** 12 | * 当前类注释:新闻头条数据请求 13 | * Author :LeonWang 14 | * Created 2016/9/23.9:52 15 | * Description: 16 | * E-mail:lijiawangjun@gmail.com 17 | */ 18 | 19 | public interface TopNewsService { 20 | 21 | //---->toutiao/index 22 | @FormUrlEncoded 23 | @POST("toutiao/index") 24 | Observable getNews(@Field("type")String type, @Field("key") String data); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherAqiService.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.net.api; 2 | 3 | import com.leonwang.app.chinashop.entity.WeatherAqiEntity; 4 | 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Query; 7 | import rx.Observable; 8 | 9 | /** 10 | * 当前类注释:小米天气实时指数 11 | * Author :LeonWang 12 | * Created 2016/9/29.17:05 13 | * Description: 14 | * E-mail:lijiawangjun@gmail.com 15 | */ 16 | 17 | public interface WeatherAqiService { 18 | 19 | @GET("wtr/data/aqi") 20 | Observable getAqiWeather(@Query("city_id") String cityId); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherDay5Service.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.net.api; 2 | 3 | import com.leonwang.app.chinashop.entity.WeatherDay5Entity; 4 | 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Query; 7 | import rx.Observable; 8 | 9 | /** 10 | * 当前类注释:小米天气未来五天数据 11 | * Author :LeonWang 12 | * Created 2016/9/29.16:59 13 | * Description: 14 | * E-mail:lijiawangjun@gmail.com 15 | */ 16 | 17 | public interface WeatherDay5Service { 18 | 19 | @GET("wtr-v2/temp/forecast") 20 | Observable getDay5Weather(@Query("cityId") String cityId); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherMZService.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.net.api; 2 | 3 | import com.leonwang.app.chinashop.entity.WeatherMZEntity; 4 | 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Path; 7 | import rx.Observable; 8 | 9 | /** 10 | * 当前类注释:魅族天气 11 | * Author :LeonWang 12 | * Created 2016/9/30.10:06 13 | * Description: 14 | * E-mail:lijiawangjun@gmail.com 15 | */ 16 | 17 | public interface WeatherMZService { 18 | 19 | @GET("/1.0/weather/{cityid}.json") 20 | Observable getMZWeather(@Path("cityid")String cityid); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/net/api/WeatherNowService.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.net.api; 2 | 3 | import com.leonwang.app.chinashop.entity.WeatherNowEntity; 4 | 5 | import retrofit2.http.GET; 6 | import retrofit2.http.Query; 7 | import rx.Observable; 8 | 9 | /** 10 | * 当前类注释:小米天气实时数据 11 | * Author :LeonWang 12 | * Created 2016/9/29.17:02 13 | * Description: 14 | * E-mail:lijiawangjun@gmail.com 15 | */ 16 | 17 | public interface WeatherNowService { 18 | 19 | @GET("wtr-v2/temp/realtime") 20 | Observable getNowWeather(@Query("cityId") String cityId); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/rx/EventBusUtils.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.rx; 2 | 3 | import org.greenrobot.eventbus.EventBus; 4 | 5 | /** 6 | *eventbus工具类 7 | */ 8 | public class EventBusUtils { 9 | 10 | private EventBusUtils() { 11 | } 12 | 13 | /** 14 | * 注册EventBus 15 | */ 16 | public static void register(Object subscriber) { 17 | if (!EventBus.getDefault().isRegistered(subscriber)) 18 | EventBus.getDefault().register(subscriber); 19 | } 20 | 21 | /** 22 | * 取消注册EventBus 23 | */ 24 | public static void unregister(Object subscriber) { 25 | EventBus.getDefault().unregister(subscriber); 26 | } 27 | 28 | /** 29 | * 发布订阅事件 30 | */ 31 | public static void post(Object subscriber) { 32 | EventBus.getDefault().post(subscriber); 33 | } 34 | 35 | /** 36 | * 发布粘性订阅事件 37 | */ 38 | public static void postSticky(Object subscriber) { 39 | EventBus.getDefault().postSticky(subscriber); 40 | } 41 | 42 | /** 43 | * 移除指定的粘性订阅事件 44 | * @param eventType class的字节码,例如:String.class 45 | */ 46 | public static void removeStickyEvent(Class eventType) { 47 | T stickyEvent = EventBus.getDefault().getStickyEvent(eventType); 48 | if (stickyEvent != null) { 49 | EventBus.getDefault().removeStickyEvent((T) stickyEvent); 50 | } 51 | } 52 | 53 | /** 54 | * 移除所有的粘性订阅事件 55 | */ 56 | public static void removeAllStickyEvents() { 57 | EventBus.getDefault().removeAllStickyEvents(); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/rx/RxBus.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.rx; 2 | 3 | 4 | import rx.Observable; 5 | import rx.subjects.PublishSubject; 6 | import rx.subjects.SerializedSubject; 7 | import rx.subjects.Subject; 8 | 9 | /** 10 | * Created by LeonWang on 16/9/20 17:51 11 | * RxBus 12 | *

13 | * Subject同时充当了Observer和Observable的角色,Subject是非线程安全的, 14 | * 要避免该问题,需要将 Subject转换为一个 SerializedSubject , 15 | * 上述RxBus类中把线程非安全的PublishSubject包装成线程安全的Subject。 16 | *

17 | * PublishSubject只会把在订阅发生的时间点之后来自原始Observable的数据发射给观察者 18 | *

19 | * ofType操作符只发射指定类型的数据,其内部就是filter+cast 20 | * 21 | *

22 | * 当然也可以使用依赖的eventbus3.0 23 | */ 24 | public class RxBus 25 | { 26 | 27 | private static volatile RxBus mInstance; 28 | 29 | private final Subject bus; 30 | 31 | 32 | public RxBus() 33 | { 34 | 35 | bus = new SerializedSubject<>(PublishSubject.create()); 36 | } 37 | 38 | /** 39 | * 单例模式RxBus2 40 | * 41 | * @return 42 | */ 43 | public static RxBus getInstance() 44 | { 45 | 46 | RxBus rxBus = mInstance; 47 | if (mInstance == null) 48 | { 49 | synchronized (RxBus.class) 50 | { 51 | rxBus = mInstance; 52 | if (mInstance == null) 53 | { 54 | rxBus = new RxBus(); 55 | mInstance = rxBus; 56 | } 57 | } 58 | } 59 | 60 | return rxBus; 61 | } 62 | 63 | 64 | /** 65 | * 发送消息 66 | * 67 | * @param object 68 | */ 69 | public void post(Object object) 70 | { 71 | 72 | bus.onNext(object); 73 | } 74 | 75 | /** 76 | * 接收消息 77 | * 78 | * @param eventType 79 | * @param 80 | * @return 81 | */ 82 | public Observable toObserverable(Class eventType) 83 | { 84 | 85 | return bus.ofType(eventType); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/ui/fragment/ZhihuFragment.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.ui.fragment; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.leonwang.app.chinashop.R; 6 | import com.leonwang.app.chinashop.base.RxLazyBaseFragment; 7 | 8 | /** 9 | * 当前类注释:知乎 10 | * Author :LeonWang 11 | * Created 2016/9/22.13:17 12 | * Description: 13 | * E-mail:lijiawangjun@gmail.com 14 | */ 15 | 16 | public class ZhihuFragment extends RxLazyBaseFragment { 17 | 18 | public static ZhihuFragment newInstance(String param3) { 19 | ZhihuFragment zhihuFragment = new ZhihuFragment(); 20 | Bundle args = new Bundle(); 21 | args.putString("args3",param3); 22 | zhihuFragment.setArguments(args); 23 | return zhihuFragment; 24 | } 25 | 26 | @Override 27 | public int getLayoutResId() { 28 | return R.layout.fragment_zhihu; 29 | } 30 | 31 | @Override 32 | protected void finishCreateView(Bundle savedInstanceState) { 33 | 34 | } 35 | 36 | @Override 37 | protected void lazyLoad() { 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/AssetsCopyUtil.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import android.content.Context; 4 | 5 | import java.io.File; 6 | import java.io.FileOutputStream; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | import java.io.OutputStream; 10 | 11 | /** 12 | * Created by ghbha on 2016/4/27. 13 | */ 14 | public class AssetsCopyUtil { 15 | /** 16 | * 将asseet当中的数据库文件拷到程序目录 17 | */ 18 | public static void copyEmbassy2Databases(Context activity, 19 | String filePath, String fileName) { 20 | 21 | File oldfile = new File(filePath, fileName); 22 | 23 | if (oldfile.exists()) 24 | return; 25 | 26 | File file = new File(filePath, fileName); 27 | 28 | if (file.exists()) 29 | return; 30 | 31 | file.getParentFile().mkdirs(); 32 | 33 | InputStream in = null; 34 | OutputStream out = null; 35 | 36 | try { 37 | 38 | out = new FileOutputStream(file); 39 | byte[] buff = new byte[1024]; 40 | int len = 0; 41 | in = activity.getAssets().open(fileName); 42 | while ((len = in.read(buff)) > 0) { 43 | out.write(buff, 0, len); 44 | } 45 | out.flush(); 46 | in.close(); 47 | 48 | } catch (IOException e) { 49 | e.printStackTrace(); 50 | } finally { 51 | try { 52 | if (out != null) 53 | out.close(); 54 | } catch (IOException e) { 55 | e.printStackTrace(); 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/CommonUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.leonwang.app.chinashop.utils; 18 | 19 | import android.content.Context; 20 | import android.content.pm.PackageInfo; 21 | import android.content.pm.PackageManager.NameNotFoundException; 22 | 23 | import com.leonwang.app.chinashop.R; 24 | 25 | 26 | /** 27 | * Android通用工具方法 28 | * @author LeonWang 29 | * @version 1.0 30 | * @created 2016-9-19 31 | */ 32 | public class CommonUtils 33 | { 34 | 35 | /** 36 | * 获取系统版本名称 37 | */ 38 | public static String getVersionName(Context context)//获取版本号 39 | { 40 | try { 41 | PackageInfo pi=context.getPackageManager().getPackageInfo(context.getPackageName(), 0); 42 | return pi.versionName; 43 | } catch (NameNotFoundException e) { 44 | e.printStackTrace(); 45 | return context.getString(R.string.versionname_unknown); 46 | } 47 | } 48 | /** 49 | * 获取系统版本号 50 | * @param context 51 | * @return 52 | */ 53 | public static int getVersionCode(Context context)//获取版本号(内部识别号) 54 | { 55 | try { 56 | PackageInfo pi=context.getPackageManager().getPackageInfo(context.getPackageName(), 0); 57 | return pi.versionCode; 58 | } catch (NameNotFoundException e) { 59 | // TODO Auto-generated catch block 60 | e.printStackTrace(); 61 | return 0; 62 | } 63 | } 64 | 65 | /** 66 | * 获取线程堆栈信息 67 | * @return 68 | */ 69 | public static StackTraceElement getCallerStackTraceElement() { 70 | return Thread.currentThread().getStackTrace()[4]; 71 | } 72 | public static StackTraceElement getCurrentStackTraceElement() { 73 | return Thread.currentThread().getStackTrace()[3]; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/DensityUtil.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import android.annotation.TargetApi; 4 | import android.app.Activity; 5 | import android.content.Context; 6 | import android.graphics.Point; 7 | import android.os.Build; 8 | import android.util.DisplayMetrics; 9 | import android.view.Display; 10 | import android.view.WindowManager; 11 | 12 | /** 13 | * dp->px && px->dp 14 | */ 15 | public class DensityUtil { 16 | 17 | private static int[] deviceWidthHeight = new int[2]; 18 | public static int[] getDeviceInfo(Context context) { 19 | if ((deviceWidthHeight[0] == 0) && (deviceWidthHeight[1] == 0)) { 20 | DisplayMetrics metrics = new DisplayMetrics(); 21 | ((Activity) context).getWindowManager().getDefaultDisplay() 22 | .getMetrics(metrics); 23 | 24 | deviceWidthHeight[0] = metrics.widthPixels; 25 | deviceWidthHeight[1] = metrics.heightPixels; 26 | } 27 | return deviceWidthHeight; 28 | } 29 | /** 30 | * 31 | * @param context 上下文 32 | * @param dpValue dp数值 33 | * @return dp to px 34 | */ 35 | public static int dip2px(Context context, float dpValue) { 36 | final float scale = context.getResources().getDisplayMetrics().density; 37 | return (int) (dpValue * scale + 0.5f); 38 | 39 | } 40 | /** 41 | * 获取屏幕尺寸 42 | */ 43 | @SuppressWarnings("deprecation") 44 | @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) 45 | public static Point getScreenSize(Context context){ 46 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); 47 | Display display = windowManager.getDefaultDisplay(); 48 | if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR2){ 49 | return new Point(display.getWidth(), display.getHeight()); 50 | }else{ 51 | Point point = new Point(); 52 | display.getSize(point); 53 | return point; 54 | } 55 | } 56 | /** 57 | * 58 | * @param context 上下文 59 | * @param pxValue px的数值 60 | * @return px to dp 61 | */ 62 | public static int px2dip(Context context, float pxValue) { 63 | final float scale = context.getResources().getDisplayMetrics().density; 64 | return (int) (pxValue / scale + 0.5f); 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/GpsUtil.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import android.content.Context; 4 | import android.util.Log; 5 | 6 | import com.baidu.location.BDLocationListener; 7 | import com.baidu.location.LocationClient; 8 | import com.baidu.location.LocationClientOption; 9 | 10 | public class GpsUtil { 11 | 12 | private LocationClient mLocationClient; 13 | private Context context = null; 14 | 15 | /** 16 | * 初始化 17 | */ 18 | public GpsUtil(Context ctx, BDLocationListener locationListener) { 19 | context = ctx; 20 | try { 21 | mLocationClient = new LocationClient(context.getApplicationContext()); 22 | mLocationClient.registerLocationListener(locationListener); //注册监听函数 23 | initLocation(); 24 | mLocationClient.start(); 25 | } catch (Exception e) { 26 | Log.e("GpsUtil error : ", e.getMessage(), e); 27 | } 28 | } 29 | 30 | public void stop() { 31 | mLocationClient.stop(); 32 | } 33 | 34 | public void start() { 35 | mLocationClient.start(); 36 | } 37 | 38 | private void initLocation() { 39 | LocationClientOption option = new LocationClientOption(); 40 | option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy 41 | );//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备 42 | //option.setCoorType("bd09ll");//可选,默认gcj02,设置返回的定位结果坐标系 43 | //int span=1000; 44 | //option.setScanSpan(span);//可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的 45 | option.setIsNeedAddress(true);//可选,设置是否需要地址信息,默认不需要 46 | //option.setOpenGps(true);//可选,默认false,设置是否使用gps 47 | //option.setLocationNotify(true);//可选,默认false,设置是否当gps有效时按照1S1次频率输出GPS结果 48 | //option.setIsNeedLocationDescribe(true);//可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近” 49 | //option.setIsNeedLocationPoiList(true);//可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到 50 | option.setIgnoreKillProcess(false);//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死 51 | option.SetIgnoreCacheException(true);//可选,默认false,设置是否收集CRASH信息,默认收集 52 | option.setEnableSimulateGps(false);//可选,默认false,设置是否需要过滤gps仿真结果,默认需要 53 | mLocationClient.setLocOption(option); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/JsonUtils.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.JsonObject; 5 | import com.google.gson.JsonSyntaxException; 6 | 7 | import java.lang.reflect.Type; 8 | 9 | /** 10 | * 当前类注释:json转换工具类 11 | * Author :LeonWang 12 | * Created 2016/9/120.09:52 13 | * Description: 14 | * E-mail:lijiawangjun@gmail.com 15 | */ 16 | public class JsonUtils { 17 | 18 | private static Gson mGson = new Gson(); 19 | 20 | /** 21 | * 将对象准换为json字符串 22 | * @param object 23 | * @param 24 | * @return 25 | */ 26 | public static String serialize(T object) { 27 | return mGson.toJson(object); 28 | } 29 | 30 | /** 31 | * 将json字符串转换为对象 32 | * @param json 33 | * @param clz 34 | * @param 35 | * @return 36 | */ 37 | public static T deserialize(String json, Class clz) throws JsonSyntaxException { 38 | return mGson.fromJson(json, clz); 39 | } 40 | 41 | /** 42 | * 将json对象转换为实体对象 43 | * @param json 44 | * @param clz 45 | * @param 46 | * @return 47 | * @throws JsonSyntaxException 48 | */ 49 | public static T deserialize(JsonObject json, Class clz) throws JsonSyntaxException { 50 | return mGson.fromJson(json, clz); 51 | } 52 | 53 | /** 54 | * 将json字符串转换为对象 55 | * @param json 56 | * @param type 57 | * @param 58 | * @return 59 | */ 60 | public static T deserialize(String json, Type type) throws JsonSyntaxException { 61 | return mGson.fromJson(json, type); 62 | } 63 | 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/LayoutHelper.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import android.content.Context; 4 | import android.graphics.Color; 5 | import android.support.v7.widget.GridLayoutManager; 6 | import android.support.v7.widget.LinearLayoutManager; 7 | import android.support.v7.widget.StaggeredGridLayoutManager; 8 | 9 | import com.leonwang.app.chinashop.R; 10 | import com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration; 11 | 12 | /** 13 | * Created by marno on 2016/6/7/11:23. 14 | */ 15 | public class LayoutHelper { 16 | 17 | public static LinearLayoutManager getLinearLayout(Context context) { 18 | return new LinearLayoutManager(context); 19 | } 20 | 21 | 22 | public static GridLayoutManager getGridLayout(Context context, int count) { 23 | return new GridLayoutManager(context, count); 24 | } 25 | 26 | public static StaggeredGridLayoutManager getVerticalStagLayout() { 27 | return new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL); 28 | } 29 | 30 | 31 | public static HorizontalDividerItemDecoration getHorizontalDivider_5(Context context) { 32 | return new HorizontalDividerItemDecoration.Builder(context) 33 | .color(Color.WHITE) 34 | .sizeResId(R.dimen.five) 35 | .build(); 36 | } 37 | 38 | public static HorizontalDividerItemDecoration getHorizontalDivider_6(Context context) { 39 | return new HorizontalDividerItemDecoration.Builder(context) 40 | .color(Color.parseColor("#f5f5f5")) 41 | .sizeResId(R.dimen.eight) 42 | .build(); 43 | } 44 | 45 | public static HorizontalDividerItemDecoration getHorizontalDividerTranslate(Context context) { 46 | return new HorizontalDividerItemDecoration.Builder(context) 47 | .color(Color.TRANSPARENT) 48 | .sizeResId(R.dimen.nine) 49 | .build(); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/MathUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.leonwang.app.chinashop.utils; 18 | 19 | /** 20 | * LeonWang 21 | */ 22 | public class MathUtils { 23 | 24 | private MathUtils() { } 25 | 26 | public static float constrain(float min, float max, float v) { 27 | return Math.max(min, Math.min(max, v)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/NetworkUtil.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import android.content.Context; 4 | import android.net.ConnectivityManager; 5 | import android.net.NetworkInfo; 6 | 7 | public class NetworkUtil { 8 | 9 | @SuppressWarnings("static-access") 10 | public static boolean checkWifi(Context ctx) { 11 | boolean isWifiConnect = true; 12 | ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE); 13 | 14 | //check the networkInfos numbers 15 | NetworkInfo[] networkInfos = cm.getAllNetworkInfo(); 16 | for (int i = 0; i < networkInfos.length; i++) { 17 | if (networkInfos[i].getState() == NetworkInfo.State.CONNECTED) { 18 | if (networkInfos[i].getType() == cm.TYPE_MOBILE) { 19 | isWifiConnect = false; 20 | } 21 | if (networkInfos[i].getType() == cm.TYPE_WIFI) { 22 | isWifiConnect = true; 23 | } 24 | } 25 | } 26 | return isWifiConnect; 27 | } 28 | 29 | public static boolean checkNetwork(Context ctx) { 30 | ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE); 31 | 32 | NetworkInfo[] networkInfos = cm.getAllNetworkInfo(); 33 | for (int i = 0; i < networkInfos.length; i++) { 34 | if (networkInfos[i].getState() == NetworkInfo.State.CONNECTED) { 35 | return true; 36 | } 37 | } 38 | 39 | return false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/PermissionUtils.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | /** 4 | * 当前类注释:gps定位权限 5 | * Author :LeonWang 6 | * Created 2016/9/30.12:37 7 | * Description: 8 | * E-mail:lijiawangjun@gmail.com 9 | */ 10 | 11 | public class PermissionUtils { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/ScreenUtil.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import android.content.Context; 4 | import android.util.TypedValue; 5 | import android.view.WindowManager; 6 | 7 | 8 | public final class ScreenUtil { 9 | 10 | public static int getScreenWidth(Context context) { 11 | WindowManager wm = (WindowManager) context 12 | .getSystemService(Context.WINDOW_SERVICE); 13 | return wm.getDefaultDisplay().getWidth(); 14 | } 15 | 16 | 17 | public static int getScreenHeight(Context context) { 18 | WindowManager wm = (WindowManager) context 19 | .getSystemService(Context.WINDOW_SERVICE); 20 | return wm.getDefaultDisplay().getHeight(); 21 | } 22 | 23 | public static int Dp2Px(Context context, float dp) { 24 | final float scale = context.getResources().getDisplayMetrics().density; 25 | return (int) (dp * scale + 0.5f); 26 | } 27 | 28 | /** 29 | * 将px值转换为dip或dp值,保证尺寸大小不变 30 | * 31 | * @param pxValue 32 | * @param scale 33 | * (DisplayMetrics类中属性density) 34 | * @return 35 | */ 36 | public static int px2dip(Context context, float pxValue) { 37 | final float scale = context.getResources().getDisplayMetrics().density; 38 | return (int) (pxValue / scale + 0.5f); 39 | } 40 | 41 | /** 42 | * 获得状态栏的高度 43 | * 44 | * @param context 45 | * @return 46 | */ 47 | public static int getStatusBarHeight(Context context) { 48 | int result = 0; 49 | int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); 50 | if (resourceId > 0) { 51 | result = context.getResources().getDimensionPixelSize(resourceId); 52 | } 53 | return result; 54 | } 55 | 56 | public static int getSp(Context context, float value) { 57 | return (int) TypedValue 58 | .applyDimension(TypedValue.COMPLEX_UNIT_SP, value, context.getResources() 59 | .getDisplayMetrics()); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/StringUtils.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | /** 4 | * author zaaach on 2016/1/26. 5 | */ 6 | public class StringUtils { 7 | /** 8 | * 提取出城市或者县 9 | * @param city 10 | * @param district 11 | * @return 12 | */ 13 | public static String extractLocation(final String city, final String district){ 14 | return district.contains("县") ? district.substring(0, district.length() - 1) : city.substring(0, city.length() - 1); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/TextUtil.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | /** 4 | * Created by ghbha on 2016/5/9. 5 | */ 6 | public class TextUtil { 7 | public static String getFormatArea(String areaName) { 8 | if (areaName.length() > 2 && areaName.contains("县")) { 9 | areaName = areaName.replace("县", ""); 10 | } else if (areaName.contains("市")) { 11 | areaName = areaName.replace("市", ""); 12 | } else if (areaName.contains("新区")) { 13 | areaName = areaName.replace("新区",""); 14 | } else if (areaName.contains("区")) { 15 | areaName = areaName.replace("区",""); 16 | } 17 | return areaName; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/ToastUtils.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | import android.content.Context; 4 | import android.os.Handler; 5 | import android.widget.Toast; 6 | 7 | /** 8 | * 当前类注释:toast工具类 9 | * Author :LeonWang 10 | * Created 2016/9/27.10:50 11 | * Description: 12 | * 问题:同时显示多个Toast信息提示框,会放在队列中,等前一个Toast关闭后才会显示下一个Toast。 13 | * 原因:Toast是Android用来显示信息的一种机制,跟Dialog不一样的是没有焦点,过一定的时间会自动消失 14 | * 解决方案:为了解决解决Toast重复显示问题,每次创建Toast我们先做下判断,如果有Toast显示,直接改变Toast里面的文字即可 15 | *

16 | * E-mail:lijiawangjun@gmail.com 17 | */ 18 | 19 | public class ToastUtils { 20 | private static Toast mToast; 21 | private static Handler mHandler = new Handler(); 22 | 23 | 24 | private static Runnable runnable = new Runnable() { 25 | @Override 26 | public void run() { 27 | if(mToast!=null) { 28 | mToast.cancel(); 29 | } 30 | } 31 | }; 32 | 33 | /** 34 | * 35 | * @param context 上下文对象 36 | * @param text 提示信息 37 | * @param duration 显示时间 38 | */ 39 | public synchronized static void showToast(Context context, String text, int duration){ 40 | mHandler.removeCallbacks(runnable); 41 | if(mToast == null){//Toast第一次使用,初始化 42 | //你也可以自定义Toast的布局 43 | mToast = Toast.makeText(context,text,duration); 44 | mToast.show(); 45 | }else{ 46 | mToast.setText(text); 47 | } 48 | mHandler.postDelayed(runnable,1000); 49 | } 50 | 51 | public static void showToast(Context context,String text){ 52 | showToast(context, text, Toast.LENGTH_LONG); 53 | } 54 | 55 | public static void showToast(Context context,int resId){ 56 | String text = context.getResources().getString(resId); 57 | showToast(context,text,Toast.LENGTH_LONG); 58 | } 59 | 60 | public static void showToast(Context context,int resId,int duration){ 61 | String text = context.getResources().getString(resId); 62 | showToast(context,text,duration); 63 | } 64 | } 65 | 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/utils/WeatherIconUtil.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.utils; 2 | 3 | 4 | import com.leonwang.app.chinashop.R; 5 | 6 | /** 7 | * Created by ghbha on 2016/5/15. 8 | */ 9 | public class WeatherIconUtil { 10 | 11 | public static int getWeatherIconID(String weatherCondition) { 12 | if (weatherCondition.equals("晴")) { 13 | return R.drawable.ic_ziwaixian_white; 14 | } 15 | if (weatherCondition.equals("阴")) { 16 | return R.drawable.ic_overcast; 17 | } 18 | if (weatherCondition.equals("多云")) { 19 | return R.drawable.ic_cloudy; 20 | } 21 | if (weatherCondition.equals("雾")) { 22 | return R.drawable.ic_fog; 23 | } 24 | if (weatherCondition.equals("小雨")) { 25 | return R.drawable.ic_xiaoyu; 26 | } 27 | if (weatherCondition.equals("小雪")) { 28 | return R.drawable.ic_xiaoxue; 29 | } 30 | if (weatherCondition.equals("中雨")) { 31 | return R.drawable.ic_zhongyu; 32 | } 33 | if (weatherCondition.equals("阵雨")) { 34 | return R.drawable.ic_baoyu; 35 | } 36 | if (weatherCondition.equals("雷阵雨")) { 37 | return R.drawable.ic_leizhenyu; 38 | } 39 | if (weatherCondition.equals("阵雪")) { 40 | return R.drawable.ic_zhenxue; 41 | } 42 | if (weatherCondition.equals("中雪")) { 43 | return R.drawable.ic_zhongxue; 44 | } 45 | if (weatherCondition.equals("大雪")) { 46 | return R.drawable.ic_daxue; 47 | } 48 | if (weatherCondition.equals("暴雪")) { 49 | return R.drawable.ic_baoxue; 50 | } 51 | if (weatherCondition.equals("雨夹雪")) { 52 | return R.drawable.ic_yujiaxue; 53 | } 54 | if (weatherCondition.equals("霾") || weatherCondition.equals("浮尘") || weatherCondition.equals("扬沙")) { 55 | return R.drawable.ic_mai; 56 | } 57 | if (weatherCondition.contains("雷")) { 58 | return R.drawable.ic_cloudy; 59 | } 60 | return R.drawable.ic_dayu; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/MSwipeRefreshLayout.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget; 2 | 3 | import android.content.Context; 4 | import android.support.v4.widget.SwipeRefreshLayout; 5 | import android.util.AttributeSet; 6 | 7 | /** 8 | * Author :LeonWang 9 | *

10 | * Created 2016/9/26.15:03 11 | *

12 | * 描述:继承{@link SwipeRefreshLayout},解决页面初始化立即刷新问题 13 | */ 14 | 15 | public class MSwipeRefreshLayout extends SwipeRefreshLayout { 16 | 17 | private boolean mMeasured; 18 | private boolean mPreMeasureRefreshing; 19 | 20 | public MSwipeRefreshLayout(Context context) { 21 | this(context, null); 22 | } 23 | 24 | public MSwipeRefreshLayout(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | } 27 | 28 | @Override 29 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 30 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 31 | if (!mMeasured) { 32 | mMeasured = true; 33 | setRefreshing(mPreMeasureRefreshing); 34 | } 35 | } 36 | 37 | @Override 38 | public void setRefreshing(boolean refreshing) { 39 | if (mMeasured) { 40 | super.setRefreshing(refreshing); 41 | } else { 42 | mPreMeasureRefreshing = refreshing; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/MyListView.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.ListView; 6 | 7 | /** 8 | * Created by ghbha on 2016/5/16. 9 | */ 10 | public class MyListView extends ListView { 11 | public MyListView(Context context) { 12 | super(context); 13 | } 14 | 15 | public MyListView(Context context, AttributeSet attrs) { 16 | super(context, attrs); 17 | } 18 | 19 | public MyListView(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 expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, 26 | MeasureSpec.AT_MOST); 27 | super.onMeasure(widthMeasureSpec, expandSpec); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/PinyinUtils.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget; 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 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/WrapHeightGridView.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.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 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/weather/BaseLine.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget.weather; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * Created by ghbha on 2016/5/16. 7 | */ 8 | public abstract class BaseLine { 9 | 10 | public BaseLine(int maxX, int maxY) { 11 | this.maxX = maxX; 12 | this.maxY = maxY; 13 | alpha = alpha + random.nextInt(115); 14 | initRandom(); 15 | } 16 | 17 | protected abstract void resetRandom(); 18 | 19 | protected abstract void initRandom(); 20 | 21 | protected abstract void rain(); 22 | 23 | protected abstract boolean outOfBounds(); 24 | 25 | public int getStartX() { 26 | return startX; 27 | } 28 | 29 | public BaseLine setStartX(int startX) { 30 | this.startX = startX; 31 | return this; 32 | } 33 | 34 | public int getStartY() { 35 | return startY; 36 | } 37 | 38 | public BaseLine setStartY(int startY) { 39 | this.startY = startY; 40 | return this; 41 | } 42 | 43 | public int getStopX() { 44 | return stopX; 45 | } 46 | 47 | public BaseLine setStopX(int stopX) { 48 | this.stopX = stopX; 49 | return this; 50 | } 51 | 52 | public int getStopY() { 53 | return stopY; 54 | } 55 | 56 | public BaseLine setStopY(int stopY) { 57 | this.stopY = stopY; 58 | return this; 59 | } 60 | 61 | public int getAlpha() { 62 | return alpha; 63 | } 64 | 65 | //////////////////////////////////////////////////// 66 | protected Random random = new Random(); 67 | protected int alpha = 100; 68 | protected int startX; 69 | protected int startY; 70 | protected int stopX; 71 | protected int stopY; 72 | protected int deltaX = 6; 73 | protected int deltaY = 10; 74 | protected int maxX; //x最大范围 75 | protected int maxY; //y最大范围 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/weather/FogView.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget.weather; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.graphics.Color; 6 | import android.graphics.Paint; 7 | import android.graphics.RectF; 8 | import android.view.SurfaceHolder; 9 | 10 | 11 | /** 12 | * Created by ghbha on 2016/5/16. 13 | */ 14 | public class FogView extends BaseAnimView { 15 | 16 | public FogView(Context context, int backColor) { 17 | super(context,backColor); 18 | } 19 | 20 | @Override 21 | protected void init() { 22 | super.init(); 23 | paint = new Paint(); 24 | paint.setStrokeWidth(getFitSize(3)); 25 | paint.setAntiAlias(true); 26 | paint.setColor(Color.WHITE); 27 | 28 | paint.setAlpha(70); 29 | } 30 | 31 | @Override 32 | protected void drawSub(Canvas canvas) { 33 | if (radius > MAX) { 34 | deltaRadius = -deltaRadius; 35 | } 36 | if (radius < MIN) { 37 | deltaRadius = -deltaRadius; 38 | } 39 | 40 | RectF rect1 = new RectF(-radius, -radius, radius, radius); 41 | RectF rect2 = new RectF(windowWidth - radius, windowHeight - radius, windowWidth + radius, windowHeight + radius); 42 | 43 | canvas.drawArc(rect1, 0, 360, false, paint); 44 | canvas.drawArc(rect2, 0, 360, false, paint); 45 | } 46 | 47 | @Override 48 | protected void reset() { 49 | radius = MIN; 50 | } 51 | 52 | @Override 53 | protected void animLogic() { 54 | radius += deltaRadius; 55 | } 56 | 57 | 58 | @Override 59 | protected int sleepTime() { 60 | return 50; 61 | } 62 | 63 | 64 | @Override 65 | public void surfaceCreated(SurfaceHolder holder) { 66 | startAnim(); 67 | } 68 | 69 | @Override 70 | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { 71 | 72 | } 73 | 74 | @Override 75 | public void surfaceDestroyed(SurfaceHolder holder) { 76 | 77 | } 78 | 79 | @Override 80 | public void run() { 81 | doLogic(); 82 | } 83 | 84 | /////////////////////////////////////////////////////// 85 | Paint paint; 86 | //圆最小半径 87 | private float MIN = getFitSize(1080); 88 | //圆最大半径 89 | private float MAX = MIN + getFitSize(80); 90 | //圆半径 91 | private float radius = MIN; 92 | private int deltaRadius = 1; 93 | } 94 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/weather/HazeLine.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget.weather; 2 | 3 | /** 4 | * Created by ghbha on 2016/5/16. 5 | */ 6 | public class HazeLine extends BaseLine { 7 | 8 | public HazeLine(int maxX, int maxY) { 9 | super(maxX, maxY); 10 | } 11 | 12 | @Override 13 | protected void resetRandom() { 14 | startX = startX - maxX; 15 | } 16 | 17 | @Override 18 | protected void initRandom() { 19 | deltaX = 1 + random.nextInt(5); 20 | startX = random.nextInt(maxX); 21 | startY = random.nextInt(maxY); 22 | stopX = startX + deltaX; 23 | } 24 | 25 | public void rain() { 26 | if (outOfBounds()) 27 | resetRandom(); 28 | startX += deltaX; 29 | stopX += deltaX; 30 | } 31 | 32 | @Override 33 | protected boolean outOfBounds() { 34 | if (getStartX() >= maxX) { 35 | return true; 36 | } 37 | return false; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/weather/RainOrSnowLine.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget.weather; 2 | 3 | /** 4 | * Created by ghbha on 2016/5/16. 5 | */ 6 | public class RainOrSnowLine extends BaseLine { 7 | 8 | public RainOrSnowLine(int maxX, int maxY) { 9 | super(maxX, maxY); 10 | } 11 | 12 | @Override 13 | public void initRandom() { 14 | deltaY = 20; 15 | stopX = startX = random.nextInt(maxX); 16 | startY = random.nextInt(maxY); 17 | stopY = startY + 20; 18 | } 19 | 20 | @Override 21 | public void resetRandom() { 22 | startY = startY - maxY; 23 | stopY = startY + 20; 24 | } 25 | 26 | @Override 27 | public void rain() { 28 | if (outOfBounds()) 29 | resetRandom(); 30 | startY += deltaY; 31 | stopY += deltaY; 32 | } 33 | 34 | @Override 35 | protected boolean outOfBounds() { 36 | if (getStartY() >= maxY) { 37 | return true; 38 | } 39 | return false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/leonwang/app/chinashop/widget/weather/Star.java: -------------------------------------------------------------------------------- 1 | package com.leonwang.app.chinashop.widget.weather; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * Created by ghbha on 2016/5/16. 7 | */ 8 | public class Star { 9 | 10 | public Star(int maxX, int maxY) { 11 | this.x = random.nextInt(maxX); 12 | this.y = random.nextInt(maxY); 13 | this.radius = 2 + random.nextInt(2); 14 | currentAlpha = minAlpha + random.nextInt(110); 15 | } 16 | 17 | 18 | public void shine() { 19 | if (outOfBounds()) 20 | alphaDelta = -alphaDelta; 21 | currentAlpha = currentAlpha + alphaDelta; 22 | } 23 | 24 | public boolean outOfBounds() { 25 | if (currentAlpha >= maxAlpha || currentAlpha < minAlpha) { 26 | return true; 27 | } 28 | return false; 29 | } 30 | 31 | public int getCurrentAlpha() { 32 | return currentAlpha; 33 | } 34 | 35 | public int getX() { 36 | return x; 37 | } 38 | 39 | public void setX(int x) { 40 | this.x = x; 41 | } 42 | 43 | public int getY() { 44 | return y; 45 | } 46 | 47 | public void setY(int y) { 48 | this.y = y; 49 | } 50 | 51 | public int getRadius() { 52 | return radius; 53 | } 54 | 55 | ///////////////////////////////////////////////////////////////// 56 | protected int x; //x最大范围 57 | protected int y; //y最大范围 58 | protected Random random = new Random(); 59 | private int radius = 4; 60 | private int minAlpha = 30; 61 | private int maxAlpha = 140; 62 | private int currentAlpha = minAlpha; 63 | private int alphaDelta = 2; 64 | } 65 | -------------------------------------------------------------------------------- /app/src/main/res/anim/activity_close_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/activity_close_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/anim/activity_open_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/anim/activity_open_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_left_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_left_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_right_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_right_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_arrow_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/ic_arrow_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_centa_square_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/ic_centa_square_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_table_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/ic_table_normal.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/loading_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/loading_image.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/progress_outer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/progress_outer.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/zy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xhdpi/zy.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_zy_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxhdpi/ic_zy_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_about_change_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_about_change_log.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_about_support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_about_support.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_add_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_add_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_baoxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_baoxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_baoyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_baoyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_chuanyizhishu_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_chuanyizhishu_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_cloudy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_cloudy.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_cloudy_night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_cloudy_night.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_contact_alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_alipay.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_contact_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_contact.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_contact_donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_donate.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_contact_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_email.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_contact_notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_notice.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_contact_qqgroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_qqgroup.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_contact_weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_contact_weibo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_daxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_daxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_dayu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_dayu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_dialog_select_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_dialog_select_pic.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_drawer_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_drawer_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_drawer_check_update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_check_update.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_drawer_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_contact.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_drawer_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_help.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_drawer_manage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_manage.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_drawer_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_drawer_setting.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_fog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_fog.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_gantanhao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_gantanhao.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_leizhenyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_leizhenyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_liangshaizhishu_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_liangshaizhishu_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_locate_city.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_locate_city.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_mai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_mai.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_match.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_match.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_na.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_na.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_notification_alarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_notification_alarm.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_overcast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_overcast.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_rectangle.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_animation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_custom.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_houtai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_houtai.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_notification.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_others.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_others.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_settings_widget.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_sun.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_sun_night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_sun_night.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_time_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_time_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_unknow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_unknow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_weather_tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_weather_tip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_xiaoxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_xiaoxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_xiaoyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_xiaoyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_xichezhishu_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_xichezhishu_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_yes_animation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_yes_animation.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_yujiaxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_yujiaxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_yundongzhishu_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_yundongzhishu_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_zhenxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_zhenxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_zhongxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_zhongxue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_zhongyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_zhongyu.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_ziwaixian_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/ic_ziwaixian_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/nav_night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/nav_night.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/widget_big_clock_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_big_clock_simple.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/widget_clock_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_clock_more.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/widget_clock_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_clock_simple.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/widget_clock_week.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_clock_week.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/widget_no_clock_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leon2017/HappyReader/753b1ea0c01b87a934a246c9377fb2bcc97ec337/app/src/main/res/drawable-xxxhdpi/widget_no_clock_simple.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/corner_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/custom_progress.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 26 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_clear.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_voice.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chevron_right_gray_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_file_download.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_table_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/line_button_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/line_button_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/line_button_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/mask_news_detail_photo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/overlay_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_bar_horizontal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_dialog_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_horizontal_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 20 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 31 | 32 | 33 | 34 | 35 | 36 | 38 | 39 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/search_box_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_rectangle_f0.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_lol_video.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 14 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 20 | 21 | 26 | 27 | 28 | 29 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_newsdetails.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | 27 | 28 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/arrow_table.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_developer.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 |