├── .gitignore ├── .idea ├── caches │ └── build_file_checksums.ser ├── codeStyles │ └── Project.xml ├── gradle.xml ├── jarRepositories.xml ├── libraries │ ├── Gradle____app_libs_BaiduLBS_Android_jar.xml │ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml │ ├── Gradle__androidx_annotation_annotation_1_1_0_jar.xml │ ├── Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml │ ├── Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml │ ├── Gradle__androidx_arch_core_core_common_2_1_0_jar.xml │ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml │ ├── Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml │ ├── Gradle__androidx_cardview_cardview_1_0_0_aar.xml │ ├── Gradle__androidx_collection_collection_1_1_0_jar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml │ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml │ ├── Gradle__androidx_core_core_1_1_0_aar.xml │ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml │ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml │ ├── Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml │ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml │ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml │ ├── Gradle__androidx_gridlayout_gridlayout_1_0_0_aar.xml │ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml │ ├── Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml │ ├── Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml │ ├── Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml │ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml │ ├── Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml │ ├── Gradle__androidx_media_media_1_0_0_aar.xml │ ├── Gradle__androidx_multidex_multidex_2_0_0_aar.xml │ ├── Gradle__androidx_multidex_multidex_instrumentation_2_0_0_aar.xml │ ├── Gradle__androidx_print_print_1_0_0_aar.xml │ ├── Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml │ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml │ ├── Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml │ ├── Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml │ ├── Gradle__androidx_test_core_1_2_0_aar.xml │ ├── Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml │ ├── Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml │ ├── Gradle__androidx_test_ext_junit_1_1_1_aar.xml │ ├── Gradle__androidx_test_monitor_1_2_0_aar.xml │ ├── Gradle__androidx_test_runner_1_2_0_aar.xml │ ├── Gradle__androidx_transition_transition_1_2_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml │ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml │ ├── Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml │ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml │ ├── Gradle__com_github_CymChad_BaseRecyclerViewAdapterHelper_2_9_15_aar.xml │ ├── Gradle__com_github_bumptech_glide_glide_3_7_0_jar.xml │ ├── Gradle__com_github_dmytrodanylyk_android_morphing_button_98a4986e56_aar.xml │ ├── Gradle__com_github_lecho_hellocharts_library_1_5_8_aar.xml │ ├── Gradle__com_google_android_material_material_1_1_0_aar.xml │ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml │ ├── Gradle__com_google_code_gson_gson_2_8_5_jar.xml │ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml │ ├── Gradle__com_squareup_okhttp3_okhttp_3_10_0_jar.xml │ ├── Gradle__com_squareup_okio_okio_1_14_0_jar.xml │ ├── Gradle__de_hdodenhof_circleimageview_2_1_0_aar.xml │ ├── Gradle__javax_inject_javax_inject_1_jar.xml │ ├── Gradle__jp_wasabeef_glide_transformations_2_0_2_aar.xml │ ├── Gradle__junit_junit_4_12_jar.xml │ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml │ ├── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml │ └── Gradle__org_litepal_android_core_1_5_1_aar.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── libs │ └── BaiduLBS_Android.jar ├── proguard-rules.pro ├── release │ └── output.json └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── cxsj │ │ └── runhdu │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── litepal.xml │ ├── ic_launcher-web.png │ ├── java │ │ └── com │ │ │ └── cxsj │ │ │ └── runhdu │ │ │ ├── adapters │ │ │ ├── FriendApplyRecyclerViewAdapter.java │ │ │ ├── FriendRecyclerViewAdapter.java │ │ │ ├── HelpAdapter.java │ │ │ ├── MyFragmentPagerAdapter.java │ │ │ ├── RecyclerViewSectionAdapter.java │ │ │ └── SunnyRunRecyclerViewAdapter.java │ │ │ ├── appfunctions │ │ │ ├── about │ │ │ │ ├── AboutActivity.java │ │ │ │ ├── AppModel.java │ │ │ │ ├── FeedbackActivity.java │ │ │ │ └── HelpActivity.java │ │ │ ├── friend │ │ │ │ ├── FriendActivity.java │ │ │ │ ├── FriendApplyBoxActivity.java │ │ │ │ ├── FriendDetailsActivity.java │ │ │ │ └── FriendModel.java │ │ │ ├── lab │ │ │ │ └── LabActivity.java │ │ │ ├── loginregister │ │ │ │ ├── LoginActivity.java │ │ │ │ ├── LoginModel.java │ │ │ │ ├── RegisterActivity.java │ │ │ │ └── WelcomeActivity.java │ │ │ ├── main │ │ │ │ ├── DataQueryModel.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── RunDetailsActivity.java │ │ │ │ ├── RunListFragment.java │ │ │ │ └── StatisticsFragment.java │ │ │ ├── running │ │ │ │ ├── RunningActivity.java │ │ │ │ └── RunningModel.java │ │ │ ├── settings │ │ │ │ └── SettingsActivity.java │ │ │ └── sunnyrun │ │ │ │ └── SunnyRunActivity.java │ │ │ ├── application │ │ │ └── MyApplication.java │ │ │ ├── base │ │ │ ├── BaseActivity.java │ │ │ └── BaseModel.java │ │ │ ├── bean │ │ │ ├── HelpItem.java │ │ │ ├── UserInfo.java │ │ │ ├── gson │ │ │ │ ├── FriendInfo.java │ │ │ │ ├── MyFriend.java │ │ │ │ ├── Running.java │ │ │ │ ├── Status.java │ │ │ │ ├── StudentInfo.java │ │ │ │ └── UpdateInfo.java │ │ │ └── sport │ │ │ │ ├── RunningInfo.java │ │ │ │ ├── RunningInfoSection.java │ │ │ │ └── SunnyRunInfo.java │ │ │ ├── constant │ │ │ ├── Strings.java │ │ │ ├── Types.java │ │ │ └── URLs.java │ │ │ ├── sensor │ │ │ ├── StepSensorBase.java │ │ │ └── StepSensorPedometer.java │ │ │ ├── utils │ │ │ ├── ActivityManager.java │ │ │ ├── AnimationUtil.java │ │ │ ├── HttpUtil.java │ │ │ ├── ImageUtil.java │ │ │ ├── InputCheckHelper.java │ │ │ ├── MD5Util.java │ │ │ ├── Prefs.java │ │ │ ├── RunningQueryUtil.java │ │ │ ├── ShareUtil.java │ │ │ ├── StatusJsonCheckHelper.java │ │ │ ├── Utility.java │ │ │ └── ZipUtil.java │ │ │ └── view │ │ │ ├── GradeProgressView.java │ │ │ ├── ImageNumberDisplayView.java │ │ │ ├── NumberView.java │ │ │ └── circularprogressbutton │ │ │ ├── CircularAnimatedDrawable.java │ │ │ ├── CircularProgressButton.java │ │ │ ├── CircularProgressDrawable.java │ │ │ ├── MorphingAnimation.java │ │ │ ├── OnAnimationEndListener.java │ │ │ ├── StateManager.java │ │ │ └── StrokeGradientDrawable.java │ ├── jniLibs │ │ ├── arm64-v8a │ │ │ ├── libBaiduMapSDK_base_v4_4_0.so │ │ │ ├── libBaiduMapSDK_map_v4_4_0.so │ │ │ └── liblocSDK7a.so │ │ ├── armeabi-v7a │ │ │ ├── libBaiduMapSDK_base_v4_4_0.so │ │ │ ├── libBaiduMapSDK_map_v4_4_0.so │ │ │ └── liblocSDK7a.so │ │ └── armeabi │ │ │ ├── libBaiduMapSDK_base_v4_4_0.so │ │ │ ├── libBaiduMapSDK_map_v4_4_0.so │ │ │ └── liblocSDK7a.so │ └── res │ │ ├── anim │ │ ├── fade_in.xml │ │ └── fade_out.xml │ │ ├── drawable-xxhdpi │ │ ├── bg_mountain.png │ │ ├── border.xml │ │ ├── border_blue.9.png │ │ ├── divider.xml │ │ ├── divider_horizontal.xml │ │ ├── green.9.png │ │ ├── ic_about.png │ │ ├── ic_delete.png │ │ ├── ic_distance.png │ │ ├── ic_energy.png │ │ ├── ic_enter_blue.png │ │ ├── ic_exit.png │ │ ├── ic_friends.png │ │ ├── ic_home.png │ │ ├── ic_invalid.png │ │ ├── ic_lab.png │ │ ├── ic_loc_end.png │ │ ├── ic_loc_normal.png │ │ ├── ic_loc_start.png │ │ ├── ic_logo.png │ │ ├── ic_moments.png │ │ ├── ic_person_add.png │ │ ├── ic_refresh.png │ │ ├── ic_run_blue.png │ │ ├── ic_run_indoor.png │ │ ├── ic_run_main.png │ │ ├── ic_settings.png │ │ ├── ic_share.png │ │ ├── ic_share_white.png │ │ ├── ic_sms.png │ │ ├── ic_speed.png │ │ ├── ic_sport.png │ │ ├── ic_start_run.png │ │ ├── ic_steps.png │ │ ├── ic_sunlight_run.png │ │ ├── ic_time.png │ │ ├── ic_valid.png │ │ ├── menu_bg.webp │ │ ├── more_black.png │ │ ├── run_button_selector.xml │ │ └── stop_run_button_selector.xml │ │ ├── drawable │ │ ├── cpb_background.xml │ │ ├── cpb_complete_state_selector.xml │ │ ├── cpb_error_state_selector.xml │ │ ├── cpb_idle_state_selector.xml │ │ ├── fillet_button_shape.xml │ │ ├── hdu_run_logo.png │ │ ├── ic_empty.png │ │ ├── line.xml │ │ └── photo.png │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_feedback.xml │ │ ├── activity_friend.xml │ │ ├── activity_friend_apply_box.xml │ │ ├── activity_friend_details.xml │ │ ├── activity_help.xml │ │ ├── activity_lab.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_register.xml │ │ ├── activity_run_details.xml │ │ ├── activity_running.xml │ │ ├── activity_settings.xml │ │ ├── activity_sunny_run.xml │ │ ├── activity_welcome.xml │ │ ├── add_friend_dialog.xml │ │ ├── app_bar_main.xml │ │ ├── chart_view_layout.xml │ │ ├── fragment_history.xml │ │ ├── fragment_today.xml │ │ ├── friend_apply_list_item.xml │ │ ├── friend_list_item.xml │ │ ├── help_item.xml │ │ ├── image_number_display.xml │ │ ├── nav_header_main.xml │ │ ├── number_view.xml │ │ ├── progress_view_layout.xml │ │ ├── run_list_header_item.xml │ │ ├── run_list_item.xml │ │ └── sunny_run_list_item.xml │ │ ├── menu │ │ ├── activity_main_drawer.xml │ │ ├── friend_activity_menu.xml │ │ ├── friend_details_menu.xml │ │ ├── run_details_menu.xml │ │ └── sunny_run_activty_bar_menu.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── drawables.xml │ │ ├── library_circularprogressbutton_strings.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── preferences.xml │ │ └── provider_paths.xml │ └── test │ └── java │ └── com │ └── cxsj │ └── runhdu │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | 39 | # Keystore files 40 | *.jks 41 | -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle____app_libs_BaiduLBS_Android_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_collection_collection_1_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_core_core_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_gridlayout_gridlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_media_media_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_multidex_multidex_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_multidex_multidex_instrumentation_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_core_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_ext_junit_1_1_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_monitor_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_test_runner_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_github_CymChad_BaseRecyclerViewAdapterHelper_2_9_15_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_github_bumptech_glide_glide_3_7_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_github_dmytrodanylyk_android_morphing_button_98a4986e56_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_github_lecho_hellocharts_library_1_5_8_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_android_material_material_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_10_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_squareup_okio_okio_1_14_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__de_hdodenhof_circleimageview_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__jp_wasabeef_glide_transformations_2_0_2_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__junit_junit_4_12_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_litepal_android_core_1_5_1_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 简介 2 | 校园运动APP,拥有完善的跑步功能。
3 | 4 | 包括轨迹记录、跑步轨迹回放,速度、里程和能量记录,跑步历史分类查看,并有详细完善的统计机制记录运动数据。另外,还有好友、运动圈、分享等附属功能。
5 | 6 | #### 2020更新 7 | 此项目是早年学习Android时开发的练手项目,没有什么太高级的功能和复杂的架构,而且服务器端已经没了。最近升级了SDK版本,做了些兼容性修复。推荐使用Android Studio 4.0及以上版本运行。 8 | #### todolist 9 | 1.使用JetPack组件和MVVM架构重构所有功能;
10 | 11 | 2.网络部分使用Retrofit重写;
12 | 13 | 3.编程语言改为Kotlin。
14 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 28 4 | buildToolsVersion '28.0.0' 5 | defaultConfig { 6 | applicationId "com.cxsj.runhdu" 7 | minSdkVersion 19 8 | targetSdkVersion 28 9 | versionCode 7 10 | versionName "1.2.5" 11 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 12 | vectorDrawables.useSupportLibrary = true 13 | multiDexEnabled true 14 | } 15 | 16 | buildTypes { 17 | debug { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | release { 22 | minifyEnabled true 23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 24 | } 25 | } 26 | 27 | 28 | compileOptions { 29 | sourceCompatibility JavaVersion.VERSION_1_8 30 | targetCompatibility JavaVersion.VERSION_1_8 31 | } 32 | } 33 | 34 | 35 | dependencies { 36 | implementation fileTree(include: ['*.jar'], dir: 'libs') 37 | androidTestImplementation 'androidx.test.ext:junit:1.1.1' 38 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' 39 | 40 | implementation 'androidx.appcompat:appcompat:1.1.0' 41 | implementation 'androidx.cardview:cardview:1.0.0' 42 | implementation 'androidx.gridlayout:gridlayout:1.0.0' 43 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 44 | implementation 'androidx.vectordrawable:vectordrawable:1.1.0' 45 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 46 | 47 | implementation 'jp.wasabeef:glide-transformations:2.0.2' 48 | implementation 'com.google.android.material:material:1.1.0' 49 | implementation 'com.squareup.okhttp3:okhttp:3.10.0' 50 | implementation 'de.hdodenhof:circleimageview:2.1.0' 51 | implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.15' 52 | implementation 'com.github.lecho:hellocharts-library:1.5.8@aar' 53 | implementation 'com.google.code.gson:gson:2.8.5' 54 | implementation 'com.github.bumptech.glide:glide:3.7.0' 55 | implementation 'org.litepal.android:core:1.5.1' 56 | implementation 'com.github.dmytrodanylyk:android-morphing-button:98a4986e56' 57 | 58 | testImplementation 'junit:junit:4.12' 59 | } 60 | 61 | repositories { 62 | mavenCentral() 63 | } 64 | -------------------------------------------------------------------------------- /app/libs/BaiduLBS_Android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/libs/BaiduLBS_Android.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\xdygx\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -ignorewarnings 19 | -keepattributes EnclosingMethod 20 | 21 | -keep class com.cxsj.runhdu.model.** {*;} 22 | 23 | # 百度地图 24 | -keep class com.baidu.** {*;} 25 | -keep class vi.com.** {*;} 26 | -dontwarn com.baidu.** 27 | 28 | # Glide 29 | -keep public class * implements com.bumptech.glide.module.GlideModule 30 | -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** { 31 | **[] $VALUES; 32 | public *; 33 | } 34 | 35 | ##---------------Begin: proguard configuration for Gson ---------- 36 | -keep public class com.google.gson.** 37 | -keep public class com.google.gson.** {public private protected *;} 38 | 39 | -keepattributes Signature 40 | -keepattributes *Annotation* 41 | 42 | ##---------------End: proguard configuration for Gson ---------- 43 | 44 | # OkHttp3 45 | -dontwarn com.squareup.okhttp3.** 46 | -keep class com.squareup.okhttp3.** { *;} 47 | -dontwarn okio.** 48 | 49 | # Okio 50 | -dontwarn com.squareup.** 51 | -dontwarn okio.** 52 | -keep public class org.codehaus.* { *; } 53 | -keep public class java.nio.* { *; } 54 | 55 | #Litepal 56 | -dontwarn org.litepal.* 57 | -keep class org.litepal.** { *; } 58 | -keep enum org.litepal.** 59 | -keep interface org.litepal.** { *; } 60 | -keep public class * extends org.litepal.** 61 | -keepattributes *Annotation* 62 | -keepclassmembers enum * { 63 | public static **[] values(); 64 | public static ** valueOf(java.lang.String); 65 | } 66 | 67 | -keep class com.dd.** { *; } 68 | 69 | -dontwarn java.lang.invoke.* 70 | -dontwarn **$$Lambda$* -------------------------------------------------------------------------------- /app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":5},"outputFile":{"path":"E:\\Documents\\AndroidProject\\RunHDU\\app\\release\\app-release.apk"},"properties":{"packageId":"com.cxsj.runhdu","split":""}}] -------------------------------------------------------------------------------- /app/src/androidTest/java/com/cxsj/runhdu/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu; 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.sailflorve.runhdu", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/assets/litepal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/adapters/FriendApplyRecyclerViewAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.adapters; 2 | 3 | import com.chad.library.adapter.base.BaseQuickAdapter; 4 | import com.chad.library.adapter.base.BaseViewHolder; 5 | import com.cxsj.runhdu.R; 6 | import com.cxsj.runhdu.bean.gson.MyFriend; 7 | import com.cxsj.runhdu.utils.Utility; 8 | 9 | import java.util.List; 10 | 11 | import de.hdodenhof.circleimageview.CircleImageView; 12 | 13 | /** 14 | * Created by Sail on 2017/5/25 0025. 15 | * 好友申请列表的Adapter 16 | */ 17 | 18 | public class FriendApplyRecyclerViewAdapter extends BaseQuickAdapter { 19 | public FriendApplyRecyclerViewAdapter(int resId, List data) { 20 | super(resId, data); 21 | } 22 | 23 | @Override 24 | protected void convert(BaseViewHolder helper, MyFriend.ApplicantInfo item) { 25 | CircleImageView profileImg = helper.getView(R.id.apply_profile); 26 | Utility.loadFriendProfileImg(mContext.getApplicationContext(), item.getApplicant(), profileImg); 27 | helper.setText(R.id.apply_username, item.getApplicant()); 28 | helper.setText(R.id.apply_time, item.getDate()); 29 | helper.addOnClickListener(R.id.refuse_apply_button); 30 | helper.addOnClickListener(R.id.agree_apply_button); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/adapters/FriendRecyclerViewAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.adapters; 2 | 3 | import android.view.View; 4 | 5 | import com.chad.library.adapter.base.BaseQuickAdapter; 6 | import com.chad.library.adapter.base.BaseViewHolder; 7 | import com.cxsj.runhdu.R; 8 | import com.cxsj.runhdu.bean.gson.FriendInfo; 9 | import com.cxsj.runhdu.utils.Utility; 10 | 11 | import java.util.List; 12 | import java.util.Locale; 13 | 14 | import de.hdodenhof.circleimageview.CircleImageView; 15 | 16 | /** 17 | * Created by Sail on 2017/5/22 0022. 18 | * 好友列表RecyclerView的Adapter 19 | */ 20 | 21 | public class FriendRecyclerViewAdapter extends BaseQuickAdapter { 22 | 23 | public FriendRecyclerViewAdapter(int resId, List data) { 24 | super(resId, data); 25 | } 26 | 27 | @Override 28 | protected void convert(BaseViewHolder helper, FriendInfo item) { 29 | CircleImageView profileImg = helper.getView(R.id.friend_profile_list_item); 30 | CircleImageView onlineImg = helper.getView(R.id.online_flag_img); 31 | Utility.loadFriendProfileImg(mContext.getApplicationContext(), item.getUsername(), profileImg); 32 | if (item.isOnline()) { 33 | onlineImg.setVisibility(View.VISIBLE); 34 | onlineImg.setImageResource(R.drawable.green); 35 | } else { 36 | onlineImg.setVisibility(View.INVISIBLE); 37 | } 38 | 39 | helper.setText(R.id.friend_name_list_item, item.getUsername()); 40 | helper.setText(R.id.friend_des_list_item, 41 | String.format(Locale.getDefault(), 42 | "今日跑步%d次 | 共跑步%d次", 43 | item.getNumToday(), item.getNumAll())); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/adapters/HelpAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.adapters; 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.ArrayAdapter; 8 | import android.widget.TextView; 9 | 10 | import androidx.annotation.NonNull; 11 | 12 | import com.cxsj.runhdu.R; 13 | import com.cxsj.runhdu.bean.HelpItem; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | * Created by chjyp on 2017/5/5. 19 | * 帮助列表的Adapter 20 | */ 21 | 22 | 23 | public class HelpAdapter extends ArrayAdapter { 24 | private int resourceId; 25 | 26 | public HelpAdapter(Context context, int textViewResourceId, List objects) { 27 | super(context, textViewResourceId, objects); 28 | resourceId = textViewResourceId; 29 | } 30 | 31 | @NonNull 32 | @Override 33 | public View getView(int position, View convertView, ViewGroup parent) { 34 | HelpItem help_item = getItem(position); 35 | View view = LayoutInflater.from(getContext()).inflate(resourceId, parent, false); 36 | TextView title = (TextView) view.findViewById(R.id.help_title); 37 | TextView info = (TextView) view.findViewById(R.id.help_info); 38 | title.setText(help_item.getTitle()); 39 | info.setText(help_item.getInfo()); 40 | return view; 41 | } 42 | } -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/adapters/MyFragmentPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.adapters; 2 | 3 | import androidx.fragment.app.Fragment; 4 | import androidx.fragment.app.FragmentManager; 5 | import androidx.fragment.app.FragmentPagerAdapter; 6 | 7 | import java.util.List; 8 | 9 | 10 | /** 11 | * MainActivity中TabLayout的Adapter 12 | */ 13 | public class MyFragmentPagerAdapter extends FragmentPagerAdapter { 14 | private List title; 15 | private List views; 16 | 17 | public MyFragmentPagerAdapter(FragmentManager fm, List title, List views) { 18 | super(fm); 19 | this.title = title; 20 | this.views = views; 21 | } 22 | 23 | @Override 24 | public Fragment getItem(int position) { 25 | return views.get(position); 26 | } 27 | 28 | @Override 29 | public int getCount() { 30 | return views.size(); 31 | } 32 | 33 | @Override 34 | public CharSequence getPageTitle(int position) { 35 | return title.get(position); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/adapters/RecyclerViewSectionAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.adapters; 2 | 3 | import com.chad.library.adapter.base.BaseSectionQuickAdapter; 4 | import com.chad.library.adapter.base.BaseViewHolder; 5 | import com.cxsj.runhdu.R; 6 | import com.cxsj.runhdu.bean.sport.RunningInfo; 7 | import com.cxsj.runhdu.bean.sport.RunningInfoSection; 8 | import com.cxsj.runhdu.constant.Strings; 9 | import com.cxsj.runhdu.utils.Utility; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Created by Sail on 2017/5/3 0003. 15 | * RecyclerView的带Head实体类,用于展示跑步列表。 16 | */ 17 | 18 | public class RecyclerViewSectionAdapter extends BaseSectionQuickAdapter { 19 | 20 | /** 21 | * Same as QuickAdapter#QuickAdapter(Context,int) but with 22 | * some initialization data. 23 | * 24 | * @param layoutResId The layout resource id of each item. 25 | * @param sectionHeadResId The section head layout id for each item 26 | * @param data A new list is created out of this one to avoid mutable list 27 | */ 28 | public RecyclerViewSectionAdapter(int layoutResId, int sectionHeadResId, List data) { 29 | super(layoutResId, sectionHeadResId, data); 30 | } 31 | 32 | @Override 33 | protected void convertHead(BaseViewHolder helper, RunningInfoSection item) { 34 | helper.setText(R.id.run_header_month_text, item.getHeader()); 35 | helper.setText(R.id.run_header_times_text, item.getTimes()); 36 | } 37 | 38 | @Override 39 | protected void convert(BaseViewHolder helper, RunningInfoSection item) { 40 | RunningInfo runningInfo = item.runningInfo; 41 | if (runningInfo == null) return; 42 | 43 | int distance = runningInfo.getDistance(); 44 | String distanceKM = Utility.formatDecimal((float) distance / 1000, 2); 45 | String runModeStr = runningInfo.getRunMode(); 46 | if (runModeStr.equals(Strings.RUN_INDOORS)) { 47 | helper.setImageResource(R.id.run_mode_img, R.drawable.ic_run_indoor); 48 | } else if (runModeStr.equals(Strings.RUN_OUTDOORS)) { 49 | helper.setImageResource(R.id.run_mode_img, R.drawable.ic_run_blue); 50 | } 51 | helper.setText(R.id.run_mode_text, runModeStr); 52 | helper.setText(R.id.run_distance_text, distanceKM); 53 | helper.setText(R.id.run_date_text, runningInfo.getDate()); 54 | helper.setText(R.id.run_start_time_text, runningInfo.getStartTime()); 55 | helper.setText(R.id.run_duration_text, runningInfo.getDuration()); 56 | helper.setText(R.id.run_steps_text, String.valueOf(runningInfo.getSteps())); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/adapters/SunnyRunRecyclerViewAdapter.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.adapters; 2 | 3 | import android.widget.ImageView; 4 | 5 | import com.chad.library.adapter.base.BaseQuickAdapter; 6 | import com.chad.library.adapter.base.BaseViewHolder; 7 | import com.cxsj.runhdu.R; 8 | import com.cxsj.runhdu.bean.sport.SunnyRunInfo; 9 | import com.cxsj.runhdu.utils.Utility; 10 | import com.cxsj.runhdu.view.NumberView; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * Created by Sail on 2017/4/3 0003. 16 | * 阳光长跑Adapter 17 | */ 18 | 19 | public class SunnyRunRecyclerViewAdapter extends BaseQuickAdapter { 20 | public SunnyRunRecyclerViewAdapter(int resId, List data) { 21 | super(resId, data); 22 | } 23 | 24 | @Override 25 | protected void convert(BaseViewHolder helper, SunnyRunInfo item) { 26 | helper.setText(R.id.sun_run_number, "No." + item.getNumber()); 27 | helper.setText(R.id.sun_run_date, item.getDate()); 28 | 29 | NumberView time = helper.getView(R.id.sun_run_time); 30 | NumberView dis = helper.getView(R.id.sun_run_dis); 31 | NumberView speed = helper.getView(R.id.sun_run_speed); 32 | 33 | time.setText(item.getDomain()); 34 | dis.setText(item.getMileage()); 35 | speed.setText(Utility.formatDecimal(item.getSpeed(), 2)); 36 | 37 | ImageView valid = helper.getView(R.id.sun_run_valid); 38 | if (item.isValid()) { 39 | valid.setImageResource(R.drawable.ic_valid); 40 | } else { 41 | valid.setImageResource(R.drawable.ic_invalid); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/appfunctions/about/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.appfunctions.about; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.widget.TextView; 6 | import android.widget.Toast; 7 | 8 | import androidx.appcompat.app.AlertDialog; 9 | 10 | import com.cxsj.runhdu.R; 11 | import com.cxsj.runhdu.base.BaseActivity; 12 | import com.cxsj.runhdu.bean.gson.UpdateInfo; 13 | import com.cxsj.runhdu.utils.Utility; 14 | 15 | /** 16 | * 关于Activity 17 | */ 18 | public class AboutActivity extends BaseActivity { 19 | 20 | private TextView checkVersion; 21 | private TextView feedback; 22 | private TextView help; 23 | 24 | @Override 25 | public void onCreate(Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | setContentView(R.layout.activity_about); 28 | setToolbar(R.id.about_toolbar, true); 29 | 30 | checkVersion = (TextView) findViewById(R.id.check_version_about); 31 | checkVersion.setOnClickListener(v -> checkUpdate()); 32 | 33 | feedback = (TextView) findViewById(R.id.feedback_about); 34 | feedback.setOnClickListener(v -> 35 | toActivity(AboutActivity.this, FeedbackActivity.class)); 36 | 37 | help = (TextView) findViewById(R.id.help_about); 38 | help.setOnClickListener(v -> 39 | toActivity(AboutActivity.this, HelpActivity.class)); 40 | } 41 | 42 | //检查更新 43 | private void checkUpdate() { 44 | showProgressDialog("正在检查更新..."); 45 | AppModel.checkUpdate(this, new AppModel.UpdateCheckCallback() { 46 | @Override 47 | public void onSuccess(UpdateInfo updateInfo) { 48 | closeProgressDialog(); 49 | if (updateInfo.isUpdate()) { 50 | String dialogStr = "当前版本:" + 51 | updateInfo.getCurrentVersion() + 52 | "\n最新版本:" + 53 | updateInfo.getLatestVersion() + 54 | "\n\n" + 55 | updateInfo.getStatement(); 56 | new AlertDialog.Builder(AboutActivity.this) 57 | .setTitle("发现新版本") 58 | .setMessage(dialogStr) 59 | .setPositiveButton("立即升级", (dialog, which) -> { 60 | Intent it = new Intent(Intent.ACTION_VIEW, 61 | Utility.getDownloadUri(updateInfo.getLatestVersion())); 62 | startActivity(it); 63 | }) 64 | .setNegativeButton("以后再说", null) 65 | .create().show(); 66 | } else { 67 | Toast.makeText(AboutActivity.this, "未发现新版本。", Toast.LENGTH_SHORT).show(); 68 | } 69 | } 70 | 71 | @Override 72 | public void onFailure(String msg) { 73 | closeProgressDialog(); 74 | Toast.makeText(AboutActivity.this, msg, Toast.LENGTH_SHORT).show(); 75 | } 76 | }); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/appfunctions/about/AppModel.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.appfunctions.about; 2 | 3 | import android.content.Context; 4 | 5 | import com.cxsj.runhdu.R; 6 | import com.cxsj.runhdu.base.BaseModel; 7 | import com.cxsj.runhdu.bean.gson.UpdateInfo; 8 | import com.cxsj.runhdu.constant.URLs; 9 | import com.cxsj.runhdu.utils.HttpUtil; 10 | import com.google.gson.Gson; 11 | import com.google.gson.JsonSyntaxException; 12 | 13 | import java.io.IOException; 14 | 15 | import okhttp3.Call; 16 | import okhttp3.Callback; 17 | import okhttp3.Response; 18 | 19 | /** 20 | * Created by SailFlorve on 2017/8/25 0025. 21 | * APP相关的数据请求封装 22 | */ 23 | 24 | public class AppModel extends BaseModel { 25 | 26 | public interface UpdateCheckCallback { 27 | void onSuccess(UpdateInfo updateInfo); 28 | 29 | void onFailure(String msg); 30 | } 31 | 32 | public static void checkUpdate(Context context, AppModel.UpdateCheckCallback callback) { 33 | final String currentVersion = context.getResources().getString(R.string.current_version); 34 | 35 | HttpUtil.load(URLs.UPDATE_URL) 36 | .addParam("version2", currentVersion) 37 | .post(new Callback() { 38 | @Override 39 | public void onFailure(Call call, IOException e) { 40 | mHandler.post(() -> callback.onFailure("连接更新服务器失败。")); 41 | } 42 | 43 | @Override 44 | public void onResponse(Call call, Response response) throws IOException { 45 | UpdateInfo updateInfo; 46 | try { 47 | updateInfo = new Gson().fromJson(response.body().string(), UpdateInfo.class); 48 | updateInfo.setCurrentVersion(currentVersion); 49 | } catch (JsonSyntaxException e) { 50 | e.printStackTrace(); 51 | callback.onFailure("服务器错误。"); 52 | return; 53 | } 54 | 55 | if (updateInfo != null) { 56 | mHandler.post(() -> callback.onSuccess(updateInfo)); 57 | } else { 58 | mHandler.post(() -> callback.onFailure("检查更新异常。")); 59 | } 60 | } 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/appfunctions/friend/FriendModel.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.appfunctions.friend; 2 | 3 | import com.cxsj.runhdu.base.BaseModel; 4 | import com.cxsj.runhdu.bean.gson.MyFriend; 5 | import com.cxsj.runhdu.constant.URLs; 6 | import com.cxsj.runhdu.utils.HttpUtil; 7 | import com.google.gson.Gson; 8 | import com.google.gson.JsonSyntaxException; 9 | 10 | import java.io.IOException; 11 | 12 | import okhttp3.Call; 13 | import okhttp3.Callback; 14 | import okhttp3.Response; 15 | 16 | /** 17 | * Created by SailFlorve on 2017/8/25 0025. 18 | * 好友相关数据请求 19 | */ 20 | 21 | public class FriendModel extends BaseModel { 22 | public interface GetFriendCallback { 23 | void onSuccess(String json, MyFriend myFriend); 24 | 25 | void onFailure(String msg); 26 | } 27 | 28 | public static void getFriendList(String username, GetFriendCallback callback) { 29 | HttpUtil.load(URLs.GET_FRIEND) 30 | .addParam("UserName", username) 31 | .post(new Callback() { 32 | @Override 33 | public void onFailure(Call call, IOException e) { 34 | mHandler.post(() -> callback.onFailure(CONNECT_FAILED)); 35 | } 36 | 37 | @Override 38 | public void onResponse(Call call, Response response) throws IOException { 39 | String jsonStr = response.body().string(); 40 | mHandler.post(() -> { 41 | MyFriend myFriend; 42 | try { 43 | myFriend = new Gson().fromJson(jsonStr, MyFriend.class); 44 | } catch (JsonSyntaxException e) { 45 | callback.onFailure(RETURN_DATA_ERROR); 46 | return; 47 | } 48 | if (myFriend == null) { 49 | callback.onFailure(RETURN_DATA_ERROR); 50 | return; 51 | } 52 | callback.onSuccess(jsonStr, myFriend); 53 | }); 54 | } 55 | }); 56 | } 57 | 58 | public static void addFriend(String username, String friendName, BaseCallback callback) { 59 | HttpUtil.load(URLs.APPLY_FRIEND) 60 | .addParam("UserA", username) 61 | .addParam("UserB", friendName) 62 | .post(getJsonStatusHttpCallback(callback)); 63 | } 64 | 65 | public static void replyFriendApply(String username, String friendName, Boolean isAgree, BaseCallback callback) { 66 | HttpUtil.load(URLs.REPLY_FRIEND) 67 | .addParam("UserA", friendName) 68 | .addParam("UserB", username) 69 | .addParam("IsAgree", isAgree.toString()) 70 | .post(getJsonStatusHttpCallback(callback)); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/appfunctions/lab/LabActivity.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.appfunctions.lab; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.appcompat.app.AppCompatActivity; 6 | 7 | import com.cxsj.runhdu.R; 8 | 9 | public class LabActivity extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_lab); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/appfunctions/loginregister/WelcomeActivity.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.appfunctions.loginregister; 2 | 3 | import android.os.Bundle; 4 | import android.text.TextUtils; 5 | import android.util.Log; 6 | import android.view.View; 7 | import android.widget.Button; 8 | import android.widget.CheckBox; 9 | import android.widget.Toast; 10 | 11 | import com.cxsj.runhdu.R; 12 | import com.cxsj.runhdu.appfunctions.main.MainActivity; 13 | import com.cxsj.runhdu.base.BaseActivity; 14 | import com.cxsj.runhdu.utils.ActivityManager; 15 | import com.cxsj.runhdu.utils.AnimationUtil; 16 | 17 | /** 18 | * 欢迎页面 19 | */ 20 | public class WelcomeActivity extends BaseActivity implements LoginModel.LoginCallback { 21 | 22 | private Button loginButton; 23 | private Button registerButton; 24 | private CheckBox cbOffline; 25 | 26 | @Override 27 | public void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | if (!isTaskRoot()) { 30 | Log.d(TAG, "onCreate: !isTaskRoot"); 31 | finish(); 32 | return; 33 | } 34 | setContentView(R.layout.activity_welcome); 35 | 36 | loginButton = (Button) findViewById(R.id.welcome_login_button); 37 | registerButton = (Button) findViewById(R.id.welcome_register_button); 38 | cbOffline = findViewById(R.id.cb_offline); 39 | 40 | //用户名不为空时,执行登录,跳转到MainActivity 41 | if (!TextUtils.isEmpty(username)) { 42 | doLogin(); 43 | } else { 44 | showButtons(); 45 | } 46 | 47 | loginButton.setOnClickListener(v -> 48 | toActivity(WelcomeActivity.this, LoginActivity.class)); 49 | 50 | registerButton.setOnClickListener(v -> 51 | toActivity(WelcomeActivity.this, RegisterActivity.class)); 52 | 53 | cbOffline.setChecked((Boolean) defaultPrefs.get("offline_mode", false)); 54 | 55 | cbOffline.setOnCheckedChangeListener((buttonView, isChecked) -> 56 | defaultPrefs.put("offline_mode", isChecked)); 57 | } 58 | 59 | @Override 60 | public void onBackPressed() { 61 | if (loginButton.getVisibility() != View.GONE) { 62 | super.onBackPressed(); 63 | } 64 | } 65 | 66 | //显示登录注册按钮 67 | private void showButtons() { 68 | loginButton.setVisibility(View.VISIBLE); 69 | registerButton.setVisibility(View.VISIBLE); 70 | loginButton.setAnimation(AnimationUtil.moveToViewLocation()); 71 | registerButton.setAnimation(AnimationUtil.moveToViewLocation()); 72 | } 73 | 74 | private void doLogin() { 75 | LoginModel.login(username, (String) defaultPrefs.get("MD5Pw", ""), WelcomeActivity.this); 76 | } 77 | 78 | @Override 79 | public void onLoginSuccess() { 80 | closeProgressDialog(); 81 | toActivity(WelcomeActivity.this, MainActivity.class); 82 | ActivityManager.finishAll(); 83 | overridePendingTransition(R.anim.fade_in, R.anim.fade_out); 84 | } 85 | 86 | @Override 87 | public void onLoginFailure(String msg, int which) { 88 | closeProgressDialog(); 89 | Toast.makeText(WelcomeActivity.this, 90 | "登录失败。原因:" + msg, Toast.LENGTH_SHORT).show(); 91 | showButtons(); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/application/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.application; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.content.Context; 5 | 6 | import org.litepal.LitePalApplication; 7 | 8 | public class MyApplication extends LitePalApplication { 9 | @SuppressLint("StaticFieldLeak") 10 | private static Context context; 11 | 12 | @Override 13 | public void onCreate() { 14 | super.onCreate(); 15 | context = getApplicationContext(); 16 | } 17 | 18 | public static Context getContext() { 19 | if (context == null) { 20 | throw new NullPointerException("Context is null"); 21 | } 22 | return context; 23 | } 24 | 25 | @Override 26 | public void onTerminate() { 27 | super.onTerminate(); 28 | context = null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/HelpItem.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean; 2 | 3 | /** 4 | * Created by chjyp on 2017/5/5. 5 | * 帮助列表实体类 6 | */ 7 | 8 | public class HelpItem { 9 | private String title; 10 | private String info; 11 | 12 | public HelpItem(String title, String info) { 13 | this.title = title; 14 | this.info = info; 15 | } 16 | 17 | public String getTitle() { 18 | return title; 19 | } 20 | 21 | public String getInfo() { 22 | return info; 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/UserInfo.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean; 2 | 3 | import org.litepal.crud.DataSupport; 4 | 5 | public class UserInfo extends DataSupport { 6 | private String userName; 7 | private String passwordMD5; 8 | 9 | public UserInfo(String userName, String passwordMD5) { 10 | this.userName = userName; 11 | this.passwordMD5 = passwordMD5; 12 | } 13 | 14 | public String getUserName() { 15 | return userName; 16 | } 17 | 18 | public void setUserName(String userName) { 19 | this.userName = userName; 20 | } 21 | 22 | public String getPasswordMD5() { 23 | return passwordMD5; 24 | } 25 | 26 | public void setPasswordMD5(String passwordMD5) { 27 | this.passwordMD5 = passwordMD5; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/gson/FriendInfo.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.gson; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * Created by Sail on 2017/5/22 0022. 7 | * 好友实体类 8 | */ 9 | 10 | public class FriendInfo { 11 | @SerializedName("UserName") 12 | private String username; 13 | 14 | @SerializedName("TodayTimes") 15 | private int numToday; 16 | 17 | @SerializedName("SumTimes") 18 | private int numAll; 19 | 20 | @SerializedName("IsOnLine") 21 | private boolean isOnline; 22 | 23 | public String getUsername() { 24 | return username; 25 | } 26 | 27 | public void setUsername(String username) { 28 | this.username = username; 29 | } 30 | 31 | public int getNumToday() { 32 | return numToday; 33 | } 34 | 35 | public void setNumToday(int numToday) { 36 | this.numToday = numToday; 37 | } 38 | 39 | public int getNumAll() { 40 | return numAll; 41 | } 42 | 43 | public void setNumAll(int numAll) { 44 | this.numAll = numAll; 45 | } 46 | 47 | public boolean isOnline() { 48 | return isOnline; 49 | } 50 | 51 | public void setOnline(boolean online) { 52 | isOnline = online; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/gson/MyFriend.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.gson; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by Sail on 2017/5/24 0024. 9 | * 获取好友列表和申请列表的json实体类 10 | */ 11 | 12 | public class MyFriend { 13 | @SerializedName("MyFriends") 14 | private List friendList; 15 | 16 | @SerializedName("ApplyLists") 17 | private List applyList; 18 | 19 | public List getFriendList() { 20 | return friendList; 21 | } 22 | 23 | public void setFriendList(List friendList) { 24 | this.friendList = friendList; 25 | } 26 | 27 | public List getApplyList() { 28 | return applyList; 29 | } 30 | 31 | public void setApplyList(List applyList) { 32 | this.applyList = applyList; 33 | } 34 | 35 | public class ApplicantInfo { 36 | @SerializedName("Applicant") 37 | private String applicant; 38 | 39 | @SerializedName("ApplyDate") 40 | private String date; 41 | 42 | public String getApplicant() { 43 | return applicant; 44 | } 45 | 46 | public void setApplicant(String applicant) { 47 | this.applicant = applicant; 48 | } 49 | 50 | public String getDate() { 51 | return date; 52 | } 53 | 54 | public void setDate(String date) { 55 | this.date = date; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/gson/Running.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.gson; 2 | 3 | import com.cxsj.runhdu.bean.sport.RunningInfo; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 获取跑步信息的json实体类 10 | */ 11 | 12 | public class Running { 13 | @SerializedName("userName") 14 | public String username; 15 | public int times; 16 | public List dataList; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/gson/Status.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.gson; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * Created by Sail on 2017/5/19 0019. 7 | * 服务器返回的状态类json实体类 8 | */ 9 | 10 | public class Status { 11 | @SerializedName("Result") 12 | private boolean result; 13 | 14 | @SerializedName("Message") 15 | private String message; 16 | 17 | @SerializedName("Which") 18 | private int which; 19 | 20 | public boolean getResult() { 21 | return result; 22 | } 23 | 24 | public String getMessage() { 25 | return message; 26 | } 27 | 28 | public int getWhich() { 29 | return which; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/gson/StudentInfo.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.gson; 2 | 3 | /** 4 | * Created by Sail on 2017/5/8 0008. 5 | * 阳光长跑返回Json的学生总体信息实体类 6 | */ 7 | 8 | public class StudentInfo { 9 | private String validTimes; 10 | private String state; 11 | private String name; 12 | private String speed; 13 | private String mileages; 14 | 15 | public String getValidTimes() { 16 | return validTimes; 17 | } 18 | 19 | public void setValidTimes(String validTimes) { 20 | this.validTimes = validTimes; 21 | } 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public void setName(String name) { 28 | this.name = name; 29 | } 30 | 31 | public String getSpeed() { 32 | return speed; 33 | } 34 | 35 | public void setSpeed(String speed) { 36 | this.speed = speed; 37 | } 38 | 39 | public String getMileages() { 40 | return mileages; 41 | } 42 | 43 | public void setMileages(String mileages) { 44 | this.mileages = mileages; 45 | } 46 | 47 | 48 | public String getState() { 49 | return state; 50 | } 51 | 52 | public void setState(String state) { 53 | this.state = state; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/gson/UpdateInfo.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.gson; 2 | 3 | /** 4 | * Created by SailFlorve on 2017/5/26 0026. 5 | * 更新信息Json实体类 6 | */ 7 | 8 | public class UpdateInfo { 9 | private boolean isUpdate; 10 | private String latestVersion; 11 | private String currentVersion; 12 | private String statement; 13 | 14 | public boolean isUpdate() { 15 | return isUpdate; 16 | } 17 | 18 | public void setUpdate(boolean update) { 19 | isUpdate = update; 20 | } 21 | 22 | public String getLatestVersion() { 23 | return latestVersion; 24 | } 25 | 26 | public void setLatestVersion(String latestVersion) { 27 | this.latestVersion = latestVersion; 28 | } 29 | 30 | public String getCurrentVersion() { 31 | return currentVersion; 32 | } 33 | 34 | public void setCurrentVersion(String currentVersion) { 35 | this.currentVersion = currentVersion; 36 | } 37 | 38 | public String getStatement() { 39 | return statement; 40 | } 41 | 42 | public void setStatement(String statement) { 43 | this.statement = statement; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/sport/RunningInfoSection.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.sport; 2 | 3 | import com.chad.library.adapter.base.entity.SectionEntity; 4 | 5 | /** 6 | * 带Header的跑步列表实体类 7 | */ 8 | public class RunningInfoSection extends SectionEntity { 9 | 10 | public RunningInfo runningInfo; 11 | private String header; 12 | private String times; 13 | 14 | public RunningInfoSection(boolean isHeader, String header) { 15 | super(isHeader, header); 16 | this.header = header; 17 | } 18 | 19 | public RunningInfoSection(RunningInfo info) { 20 | super(info); 21 | runningInfo = info; 22 | } 23 | 24 | public String getHeader() { 25 | return header; 26 | } 27 | 28 | public void setHeader(String header) { 29 | this.header = header; 30 | } 31 | 32 | public String getTimes() { 33 | return times; 34 | } 35 | 36 | public void setTimes(String times) { 37 | this.times = times; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/bean/sport/SunnyRunInfo.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.bean.sport; 2 | 3 | /** 4 | * 阳光长跑信息实体类 5 | */ 6 | public class SunnyRunInfo { 7 | 8 | private boolean isValid; 9 | 10 | private String date; 11 | 12 | private String domain; 13 | 14 | private String mileage; 15 | 16 | private double speed; 17 | 18 | private String number; 19 | 20 | public SunnyRunInfo() { 21 | 22 | } 23 | 24 | public SunnyRunInfo(String number, String date, String time, String distance, double speed, boolean valid) { 25 | this.date = date; 26 | this.mileage = distance; 27 | this.number = number; 28 | this.speed = speed; 29 | this.domain = time; 30 | this.isValid = valid; 31 | } 32 | 33 | 34 | public String getDate() { 35 | return date; 36 | } 37 | 38 | public void setDate(String date) { 39 | this.date = date; 40 | } 41 | 42 | public String getDomain() { 43 | return domain; 44 | } 45 | 46 | public void setDomain(String domain) { 47 | this.domain = domain; 48 | } 49 | 50 | public String getMileage() { 51 | return mileage; 52 | } 53 | 54 | public void setMileage(String mileage) { 55 | this.mileage = mileage; 56 | } 57 | 58 | 59 | public String getNumber() { 60 | return number; 61 | } 62 | 63 | public void setNumber(String number) { 64 | this.number = number; 65 | } 66 | 67 | public boolean isValid() { 68 | return isValid; 69 | } 70 | 71 | public void setValid(boolean valid) { 72 | isValid = valid; 73 | } 74 | 75 | public double getSpeed() { 76 | return speed; 77 | } 78 | 79 | public void setSpeed(double speed) { 80 | this.speed = speed; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/constant/Strings.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.constant; 2 | 3 | /** 4 | * Created by Sail on 2017/4/27 0027. 5 | * 字符串常量 6 | */ 7 | 8 | public class Strings { 9 | public static final String RUN_OUTDOORS = "户外跑步"; 10 | public static final String RUN_INDOORS = "室内跑步"; 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/constant/Types.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.constant; 2 | 3 | /** 4 | * Created by Sail on 2017/4/13 0013. 5 | * 类型常量 6 | */ 7 | 8 | public class Types { 9 | public final static int TYPE_YEAR = 1000; 10 | public final static int TYPE_MONTH = 1001; 11 | public final static int TYPE_DATE = 1002; 12 | public final static int TYPE_HOUR = 1003; 13 | public final static int TYPE_MINUTE = 1004; 14 | public final static int TYPE_SECOND = 1005; 15 | public final static int TYPE_MONTH_DATE = 1006; 16 | public final static int TYPE_CURRENT_TIME = 1007; 17 | public final static int TYPE_AM_PM = 1008; 18 | public final static int TYPE_CHANGE_PROFILE = 1009; 19 | public final static int TYPE_CHANGE_MENU_BG = 1010; 20 | public final static int MANUAL_UPDATE = 1011; 21 | public final static int AUTO_UPDATE = 1012; 22 | public final static int TYPE_SAVE_PROFILE = 1013; 23 | public final static int TYPE_STRING_FORM = 1014; 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/constant/URLs.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.constant; 2 | 3 | /** 4 | * Created by Sail on 2017/4/12 0012. 5 | * URL常量 6 | */ 7 | 8 | public class URLs { 9 | public static final String DOWNLOAD = "http://d1.51gugu.com/170258/RunHDU"; 10 | public static final String LOGIN = "http://112.74.115.231:8080/Login"; 11 | public static final String REGISTER = "http://112.74.115.231:8080/Register"; 12 | public static final String GET_RUN_INFO = "http://112.74.115.231:8080/ReadAll"; 13 | public static final String UPLOAD_RUN_INFO = "http://112.74.115.231:8080/Write"; 14 | public static final String CLEAR_DATA = "http://112.74.115.231:8080/ClearTheTable"; 15 | public static final String UPDATE_URL = "http://112.74.115.231:8080/VersionCompare"; 16 | public static final String GET_RUN_TIMES = "http://112.74.115.231:8080/ReadUserNameAndTimesOnly"; 17 | public static final String UPLOAD_ALL_INFO = "http://112.74.115.231:8080/WriteByJson"; 18 | public static final String UPLOAD_PROFILE = "http://112.74.115.231:8080/UploadHead"; 19 | public static final String PROFILE_URL = "http://112.74.115.231:8080/Image/"; 20 | public static final String FEEDBACK_URL = "http://112.74.115.231:8080/WriteFeedback"; 21 | public static final String SUNNY_RUN_QUERY_API = "http://hdu.sunnysport.org.cn/api/student/achievements/"; 22 | public static final String SUNNY_RUN_INFO_API = "http://hdu.sunnysport.org.cn/api/student/info/"; 23 | public static final String DELETE_ITEM = "http://112.74.115.231:8080/ClearByUserNameAndRunId"; 24 | public static final String APPLY_FRIEND = "http://112.74.115.231:8080/Apply"; 25 | public static final String REPLY_FRIEND = "http://112.74.115.231:8080/BeFriend"; 26 | public static final String GET_FRIEND = "http://112.74.115.231:8080/MyFriends"; 27 | public static final String DELETE_FRIEND = "http://112.74.115.231:8080/DeleteFriend"; 28 | public static final String OFF_LINE = "http://112.74.115.231:8080/Xiaxian"; 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/sensor/StepSensorBase.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.sensor; 2 | 3 | import android.content.Context; 4 | import android.hardware.SensorEventListener; 5 | import android.hardware.SensorManager; 6 | 7 | import static android.content.Context.SENSOR_SERVICE; 8 | 9 | /** 10 | * Created by Sail on 2017/4/7 0007. 11 | * 记步传感器抽象类,子类分为加速度传感器、速度传感器; 12 | */ 13 | 14 | public abstract class StepSensorBase implements SensorEventListener { 15 | 16 | protected Context context; 17 | protected StepCallback stepCallback; 18 | protected SensorManager sensorManager; 19 | protected static int CURRENT_STEP = 0; 20 | protected boolean isAvailable = false; 21 | 22 | public StepSensorBase(Context context, StepCallback stepCallback) { 23 | this.context = context; 24 | this.stepCallback = stepCallback; 25 | } 26 | 27 | public interface StepCallback { 28 | void onStepChanged(int stepNum); 29 | } 30 | 31 | /** 32 | * 开启记步 33 | */ 34 | public boolean registerStep() { 35 | CURRENT_STEP = 0; 36 | if (sensorManager != null) { 37 | sensorManager.unregisterListener(this); 38 | sensorManager = null; 39 | } 40 | sensorManager = (SensorManager) context.getSystemService(SENSOR_SERVICE); 41 | registerStepListener(); 42 | return isAvailable; 43 | } 44 | 45 | /** 46 | * 注册计步监听器 47 | */ 48 | protected abstract void registerStepListener(); 49 | 50 | /** 51 | * 注销计步监听器 52 | */ 53 | public abstract void unregisterStep(); 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/sensor/StepSensorPedometer.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.sensor; 2 | 3 | import android.content.Context; 4 | import android.hardware.Sensor; 5 | import android.hardware.SensorEvent; 6 | import android.hardware.SensorManager; 7 | import android.os.Build; 8 | import android.util.Log; 9 | 10 | import static android.os.Build.VERSION.SDK_INT; 11 | 12 | /** 13 | * Created by Sail on 2017/4/7 0007. 14 | * 直接使用计步传感器实现计步 15 | */ 16 | 17 | public class StepSensorPedometer extends StepSensorBase { 18 | private final String TAG = "StepSensorPedometer"; 19 | private int lastStep = -1; 20 | private int liveStep = 0; 21 | private int increment = 0; 22 | private int sensorMode = 0; // 计步传感器类型 23 | private int preValue = 0; 24 | 25 | public StepSensorPedometer(Context context, StepCallback stepCallBack) { 26 | super(context, stepCallBack); 27 | } 28 | 29 | @Override 30 | protected void registerStepListener() { 31 | Sensor detectorSensor = null; 32 | Sensor countSensor = null; 33 | if (SDK_INT >= Build.VERSION_CODES.KITKAT) { 34 | detectorSensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); 35 | countSensor = sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); 36 | } else { 37 | isAvailable = false; 38 | return; 39 | } 40 | /* 41 | * TYPE_STEP_DETECTOR 42 | * 每次检测到步数变化,会给出变化值 43 | * 44 | * TYPE_STEP_COUNTER 45 | * 每次检测到步数变化,会给出总步数,精确度也更高 46 | */ 47 | if (sensorManager.registerListener(this, detectorSensor, SensorManager.SENSOR_DELAY_GAME)) { 48 | isAvailable = true; 49 | sensorMode = 0; 50 | Log.i(TAG, "计步传感器count可用!"); 51 | } else if (sensorManager.registerListener(this, countSensor, SensorManager.SENSOR_DELAY_GAME)) { 52 | isAvailable = true; 53 | sensorMode = 1; 54 | Log.i(TAG, "计步传感器detector可用!"); 55 | } else { 56 | isAvailable = false; 57 | Log.i(TAG, "计步传感器不可用!"); 58 | } 59 | } 60 | 61 | @Override 62 | public void unregisterStep() { 63 | Log.d(TAG, "unregisterStep: "); 64 | sensorManager.unregisterListener(this); 65 | } 66 | 67 | @Override 68 | public void onSensorChanged(SensorEvent event) { 69 | liveStep = (int) event.values[0]; 70 | if (sensorMode == 0) { 71 | StepSensorBase.CURRENT_STEP += liveStep; 72 | } else if (sensorMode == 1) { 73 | if (liveStep - preValue <= 3) { 74 | StepSensorBase.CURRENT_STEP += liveStep - preValue; 75 | } 76 | preValue = liveStep; 77 | } 78 | 79 | stepCallback.onStepChanged(StepSensorBase.CURRENT_STEP); 80 | } 81 | 82 | @Override 83 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/ActivityManager.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import android.app.Activity; 4 | import android.util.Log; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * Activity的管理类,方便一键结束Activity 11 | */ 12 | public class ActivityManager { 13 | 14 | private static String TAG = "ActivityManager"; 15 | private static List activities = new ArrayList<>(); 16 | 17 | public static void addActivity(Activity activity) { 18 | Log.d(TAG, "addActivity: " + activity.getLocalClassName()); 19 | activities.add(activity); 20 | } 21 | 22 | public static void removeActivity(Activity activity) { 23 | if (activity != null) { 24 | Log.d(TAG, "removeActivity: " + activity.getLocalClassName()); 25 | activities.remove(activity); 26 | } 27 | } 28 | 29 | public static void finishAll() { 30 | for (Activity activity : activities) { 31 | if (activity != null) { 32 | Log.d(TAG, "finishAll: " + activity.getLocalClassName()); 33 | activity.finish(); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/AnimationUtil.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import android.view.animation.Animation; 4 | import android.view.animation.TranslateAnimation; 5 | 6 | /** 7 | * 动画控制工具类 8 | */ 9 | public class AnimationUtil { 10 | private static final String TAG = AnimationUtil.class.getSimpleName(); 11 | 12 | /** 13 | * 从控件所在位置移动到控件的底部 14 | * 15 | * @return 16 | */ 17 | public static TranslateAnimation moveToViewBottom() { 18 | TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, 19 | Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 20 | 0.0f, Animation.RELATIVE_TO_SELF, 5.0f); 21 | mHiddenAction.setDuration(2500); 22 | return mHiddenAction; 23 | } 24 | 25 | /** 26 | * 从控件的底部移动到控件所在位置 27 | * 28 | * @return 29 | */ 30 | public static TranslateAnimation moveToViewLocation() { 31 | TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, 32 | Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 33 | 5.0f, Animation.RELATIVE_TO_SELF, 0.0f); 34 | mHiddenAction.setDuration(1500); 35 | return mHiddenAction; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/HttpUtil.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import com.cxsj.runhdu.application.MyApplication; 4 | 5 | import java.util.concurrent.TimeUnit; 6 | 7 | import okhttp3.Call; 8 | import okhttp3.Callback; 9 | import okhttp3.FormBody; 10 | import okhttp3.OkHttpClient; 11 | import okhttp3.Request; 12 | 13 | /** 14 | * Created by Sail on 2017/4/2 0002. 15 | * OkHttp操作的封装类 16 | */ 17 | 18 | public class HttpUtil { 19 | 20 | private static RequestManager manager; 21 | 22 | public static RequestManager load(String url) { 23 | manager = new RequestManager(); 24 | manager.url(url); 25 | return manager; 26 | } 27 | 28 | public static boolean isOfflineMode() { 29 | Prefs defaultPrefs = new Prefs(MyApplication.getContext()); 30 | return (boolean) defaultPrefs.get("offline_mode", false); 31 | } 32 | 33 | public static class RequestManager { 34 | private Request.Builder requestBuilder = new Request.Builder(); 35 | private FormBody.Builder formBuilder = new FormBody.Builder(); 36 | private Call call; 37 | 38 | private void url(String url) { 39 | formBuilder = new FormBody.Builder(); 40 | requestBuilder = new Request.Builder(); 41 | 42 | requestBuilder = requestBuilder.url(url); 43 | } 44 | 45 | private void cancel() { 46 | if (call != null) { 47 | call.cancel(); 48 | } 49 | } 50 | 51 | public RequestManager addHeader(String key, String value) { 52 | requestBuilder.addHeader(key, value); 53 | return this; 54 | } 55 | 56 | public RequestManager addParam(String key, String value) { 57 | formBuilder = formBuilder.add(key, value); 58 | return this; 59 | } 60 | 61 | public void post(Callback callback) { 62 | OkHttpClient client = new OkHttpClient.Builder() 63 | .connectTimeout(3, TimeUnit.SECONDS) 64 | .followRedirects(false) 65 | .followSslRedirects(false) 66 | .build(); 67 | 68 | Request request = requestBuilder.post(formBuilder.build()).build(); 69 | client.newCall(request).enqueue(callback); 70 | } 71 | 72 | public void get(Callback callback) { 73 | OkHttpClient client = new OkHttpClient.Builder().build(); 74 | Request request = requestBuilder.build(); 75 | call = client.newCall(request); 76 | call.enqueue(callback); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/MD5Util.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import android.text.TextUtils; 4 | 5 | import java.security.MessageDigest; 6 | import java.security.NoSuchAlgorithmException; 7 | 8 | /** 9 | * Created by Sail on 2017/5/18 0018. 10 | * MD5加密和解密工具类 11 | */ 12 | 13 | public class MD5Util { 14 | //加密次数 15 | private final static int ENCODE_TIMES = 3; 16 | 17 | private static String encodeOnce(String str) { 18 | if (TextUtils.isEmpty(str)) { 19 | return ""; 20 | } 21 | MessageDigest md5; 22 | try { 23 | md5 = MessageDigest.getInstance("MD5"); 24 | byte[] bytes = md5.digest(str.getBytes()); 25 | StringBuilder result = new StringBuilder(); 26 | for (byte b : bytes) { 27 | String temp = Integer.toHexString(b & 0xff); 28 | if (temp.length() == 1) { 29 | temp = "0" + temp; 30 | } 31 | result.append(temp); 32 | } 33 | return result.toString(); 34 | } catch (NoSuchAlgorithmException e) { 35 | e.printStackTrace(); 36 | } 37 | return ""; 38 | } 39 | 40 | public static String encode(String str) { 41 | if (TextUtils.isEmpty(str)) { 42 | return ""; 43 | } 44 | String encodeStr = encodeOnce(str); 45 | for (int i = 0; i < ENCODE_TIMES - 1; i++) { 46 | encodeStr = encodeOnce(encodeStr); 47 | } 48 | return encodeStr; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/Prefs.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.preference.PreferenceManager; 6 | 7 | /** 8 | * Created by Sail on 2017/4/3 0003. 9 | * SharedPreference封装类 10 | */ 11 | 12 | public class Prefs { 13 | 14 | private SharedPreferences prefs; 15 | private SharedPreferences.Editor editor; 16 | 17 | public Prefs(Context context) { 18 | prefs = PreferenceManager.getDefaultSharedPreferences(context); 19 | editor = prefs.edit(); 20 | } 21 | 22 | public Prefs(Context context, String fileName) { 23 | if (fileName == null) { 24 | prefs = PreferenceManager.getDefaultSharedPreferences(context); 25 | } else { 26 | prefs = context.getSharedPreferences(fileName, Context.MODE_PRIVATE); 27 | } 28 | editor = prefs.edit(); 29 | } 30 | 31 | public void put(String key, Object object) { 32 | if (object == null) { 33 | return; 34 | } 35 | if (object instanceof Integer) { 36 | editor.putInt(key, (Integer) object); 37 | } 38 | 39 | if (object instanceof String) { 40 | editor.putString(key, (String) object); 41 | } 42 | 43 | if (object instanceof Boolean) { 44 | editor.putBoolean(key, (Boolean) object); 45 | } 46 | editor.apply(); 47 | } 48 | 49 | public Object get(String key, Object defaultValue) { 50 | if (defaultValue instanceof Integer) { 51 | return prefs.getInt(key, (int) defaultValue); 52 | } 53 | 54 | if (defaultValue instanceof String || defaultValue == null) { 55 | return prefs.getString(key, (String) defaultValue); 56 | } 57 | 58 | if (defaultValue instanceof Boolean) { 59 | return prefs.getBoolean(key, (Boolean) defaultValue); 60 | } 61 | return null; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/RunningQueryUtil.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import com.cxsj.runhdu.bean.sport.RunningInfo; 4 | 5 | import org.litepal.crud.DataSupport; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by Sail on 2017/5/10 0010. 11 | * 查询跑步数据操作数据库的封装工具类 12 | */ 13 | 14 | public class RunningQueryUtil { 15 | /** 16 | * 普通查找 17 | * 18 | * @param conditions 查找条件 19 | * @return 20 | */ 21 | public static List find(String... conditions) { 22 | return DataSupport.where(conditions).find(RunningInfo.class); 23 | } 24 | 25 | /** 26 | * 按跑步时间排序查找 27 | * 28 | * @param conditions 查找条件 29 | * @return 30 | */ 31 | public static List findOrder(String... conditions) { 32 | return DataSupport.where(conditions).order("runId").find(RunningInfo.class); 33 | } 34 | 35 | /** 36 | * 按跑步时间跑需,查找所有 37 | * 38 | * @return 39 | */ 40 | public static List findAllOrder() { 41 | return DataSupport.order("runId").find(RunningInfo.class); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/ShareUtil.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.net.Uri; 7 | import android.text.TextUtils; 8 | import android.widget.Toast; 9 | 10 | import androidx.core.content.FileProvider; 11 | 12 | import java.io.File; 13 | 14 | /** 15 | * Created by Sail on 2017/5/4 0004. 16 | * 用于截图并分享工具类 17 | */ 18 | 19 | public class ShareUtil { 20 | 21 | private static int delayTime = 0; 22 | 23 | public static void setDelay(int time) { 24 | delayTime = time; 25 | } 26 | 27 | public static void shareImg(Activity activity, String imagePath) { 28 | 29 | File file = new File(imagePath); 30 | Uri photoURI = FileProvider.getUriForFile( 31 | activity, 32 | activity.getApplicationContext().getPackageName() + ".provider", 33 | file); 34 | 35 | Intent intent = new Intent(Intent.ACTION_SEND); 36 | intent.putExtra(Intent.EXTRA_STREAM, photoURI); 37 | intent.setType("image/jpeg"); 38 | Intent chooser = Intent.createChooser(intent, "分享运动数据"); 39 | intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); 40 | 41 | if (intent.resolveActivity(activity.getPackageManager()) != null) { 42 | activity.startActivity(chooser); 43 | } 44 | } 45 | 46 | public static void shareText(Context context, String content) { 47 | if (TextUtils.isEmpty(content)) { 48 | Toast.makeText(context, "文字为空。", Toast.LENGTH_SHORT).show(); 49 | } 50 | Intent intent = new Intent(Intent.ACTION_SEND); 51 | intent.putExtra(Intent.EXTRA_TEXT, content); 52 | intent.setType("text/plain"); 53 | Intent chooser = Intent.createChooser(intent, content); 54 | context.startActivity(chooser); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/utils/StatusJsonCheckHelper.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.utils; 2 | 3 | import com.cxsj.runhdu.bean.gson.Status; 4 | import com.google.gson.Gson; 5 | import com.google.gson.JsonSyntaxException; 6 | 7 | /** 8 | * Created by Sail on 2017/5/21 0021. 9 | * 返回的状态类JSON检查。 10 | */ 11 | 12 | public class StatusJsonCheckHelper { 13 | public interface CheckCallback { 14 | void onPass(); 15 | 16 | void onFailure(String msg, int which); 17 | } 18 | 19 | public static void check(String json, CheckCallback callback) { 20 | Status status = null; 21 | try { 22 | status = new Gson().fromJson(json, Status.class); 23 | } catch (JsonSyntaxException e) { 24 | e.printStackTrace(); 25 | } 26 | 27 | if (status == null) { 28 | callback.onFailure("JSON格式错误。", 0); 29 | } else { 30 | if (status.getResult()) { 31 | callback.onPass(); 32 | } else { 33 | callback.onFailure(status.getMessage(), status.getWhich()); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/view/ImageNumberDisplayView.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.view; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.View; 7 | import android.widget.ImageView; 8 | import android.widget.LinearLayout; 9 | import android.widget.TextView; 10 | 11 | import com.cxsj.runhdu.R; 12 | 13 | /** 14 | * Created by Sail on 2017/4/15 0015. 15 | * 数字及其表示图片。 16 | */ 17 | 18 | public class ImageNumberDisplayView extends LinearLayout { 19 | private ImageView imageView; 20 | private TextView numberTextView; 21 | private TextView unitTextView; 22 | private TextView descriptionTextView; 23 | 24 | private String number; 25 | private int image_res; 26 | private String unit; 27 | private String des; 28 | 29 | public ImageNumberDisplayView(Context context) { 30 | super(context); 31 | initView(); 32 | } 33 | 34 | public ImageNumberDisplayView(Context context, AttributeSet attrs, int defStyle) { 35 | super(context, attrs, defStyle); 36 | initView(); 37 | } 38 | 39 | public ImageNumberDisplayView(Context context, AttributeSet attrs) { 40 | super(context, attrs); 41 | initView(); 42 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ImageNumberDisplayView); 43 | number = a.getString(R.styleable.ImageNumberDisplayView_number_s); 44 | image_res = a.getResourceId(R.styleable.ImageNumberDisplayView_imageSrc, R.drawable.ic_steps); 45 | unit = a.getString(R.styleable.ImageNumberDisplayView_unit); 46 | des = a.getString(R.styleable.ImageNumberDisplayView_description); 47 | setNumber(number); 48 | setImage(image_res); 49 | setUnit(unit); 50 | descriptionTextView.setText(des); 51 | a.recycle(); 52 | } 53 | 54 | private void initView() { 55 | View view = View.inflate(getContext(), R.layout.image_number_display, this); 56 | numberTextView = (TextView) view.findViewById(R.id.ind_number_text); 57 | imageView = (ImageView) view.findViewById(R.id.ind_number_indicate_image); 58 | unitTextView = (TextView) view.findViewById(R.id.ind_unit_text); 59 | descriptionTextView = (TextView) findViewById(R.id.description_text); 60 | } 61 | 62 | public void setNumber(String n) { 63 | numberTextView.setText(n); 64 | } 65 | 66 | public void setImage(int image) { 67 | imageView.setImageResource(image); 68 | } 69 | 70 | public void setUnit(String unit) { 71 | unitTextView.setText(unit); 72 | } 73 | 74 | public String getNumber() { 75 | return numberTextView.getText().toString(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/view/NumberView.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.view; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.util.AttributeSet; 6 | import android.view.View; 7 | import android.widget.LinearLayout; 8 | import android.widget.TextView; 9 | 10 | import com.cxsj.runhdu.R; 11 | 12 | /** 13 | * Created by Sail on 2017/3/25 0025. 14 | * 数字以及它的描述和单位。 15 | */ 16 | 17 | public class NumberView extends LinearLayout { 18 | private TextView numberTextView; 19 | private TextView desTextView; 20 | private TextView unitTextView; 21 | 22 | private String numberText; 23 | private String desText; 24 | private String unitText; 25 | 26 | private int numberColor; 27 | private int desColor; 28 | private int unitColor; 29 | 30 | public NumberView(Context context) { 31 | super(context); 32 | initView(); 33 | } 34 | 35 | public NumberView(Context context, AttributeSet attrs, int defStyle) { 36 | super(context, attrs, defStyle); 37 | initView(); 38 | } 39 | 40 | public NumberView(Context context, AttributeSet attrs) { 41 | super(context, attrs); 42 | initView(); 43 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.NumberView); 44 | numberText = a.getString(R.styleable.NumberView_numberText); 45 | desText = a.getString(R.styleable.NumberView_numberDesText); 46 | unitText = a.getString(R.styleable.NumberView_numberUnitText); 47 | numberColor = a.getColor(R.styleable.NumberView_numberTextColor, 48 | getResources().getColor(R.color.TextPrimary)); 49 | desColor = a.getColor(R.styleable.NumberView_numberDesTextColor, 50 | getResources().getColor(R.color.TextSecondary)); 51 | unitColor = a.getColor(R.styleable.NumberView_numberUnitTextColor, 52 | getResources().getColor(R.color.TextSecondary)); 53 | 54 | setText(numberText); 55 | setDesText(desText); 56 | setUnitText(unitText); 57 | 58 | setNumberColor(numberColor); 59 | setDesColor(desColor); 60 | setUnitColor(unitColor); 61 | a.recycle(); 62 | } 63 | 64 | private void initView() { 65 | View view = View.inflate(getContext(), R.layout.number_view, this); 66 | numberTextView = (TextView) view.findViewById(R.id.number); 67 | desTextView = (TextView) view.findViewById(R.id.number_des); 68 | unitTextView = (TextView) view.findViewById(R.id.number_unit); 69 | } 70 | 71 | public void setText(String numberText) { 72 | numberTextView.setText(numberText); 73 | } 74 | 75 | public void setDesText(String desText) { 76 | desTextView.setText(desText); 77 | } 78 | 79 | public void setUnitText(String unitText) { 80 | unitTextView.setText(unitText); 81 | } 82 | 83 | public void setNumberColor(int numberColor) { 84 | numberTextView.setTextColor(numberColor); 85 | } 86 | 87 | public void setDesColor(int desColor) { 88 | desTextView.setTextColor(desColor); 89 | } 90 | 91 | public void setUnitColor(int unitColor) { 92 | unitTextView.setTextColor(unitColor); 93 | } 94 | 95 | public String getText() { 96 | return numberTextView.getText().toString(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/view/circularprogressbutton/CircularProgressDrawable.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.view.circularprogressbutton; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.ColorFilter; 5 | import android.graphics.Paint; 6 | import android.graphics.Path; 7 | import android.graphics.Rect; 8 | import android.graphics.RectF; 9 | import android.graphics.drawable.Drawable; 10 | 11 | class CircularProgressDrawable extends Drawable { 12 | 13 | private float mSweepAngle; 14 | private float mStartAngle; 15 | private int mSize; 16 | private int mStrokeWidth; 17 | private int mStrokeColor; 18 | 19 | public CircularProgressDrawable(int size, int strokeWidth, int strokeColor) { 20 | mSize = size; 21 | mStrokeWidth = strokeWidth; 22 | mStrokeColor = strokeColor; 23 | mStartAngle = -90; 24 | mSweepAngle = 0; 25 | } 26 | 27 | public void setSweepAngle(float sweepAngle) { 28 | mSweepAngle = sweepAngle; 29 | } 30 | 31 | public int getSize() { 32 | return mSize; 33 | } 34 | 35 | @Override 36 | public void draw(Canvas canvas) { 37 | final Rect bounds = getBounds(); 38 | 39 | if (mPath == null) { 40 | mPath = new Path(); 41 | } 42 | mPath.reset(); 43 | mPath.addArc(getRect(), mStartAngle, mSweepAngle); 44 | mPath.offset(bounds.left, bounds.top); 45 | canvas.drawPath(mPath, createPaint()); 46 | } 47 | 48 | @Override 49 | public void setAlpha(int alpha) { 50 | 51 | } 52 | 53 | @Override 54 | public void setColorFilter(ColorFilter cf) { 55 | } 56 | 57 | @Override 58 | public int getOpacity() { 59 | return 1; 60 | } 61 | 62 | private RectF mRectF; 63 | private Paint mPaint; 64 | private Path mPath; 65 | 66 | private RectF getRect() { 67 | if (mRectF == null) { 68 | int index = mStrokeWidth / 2; 69 | mRectF = new RectF(index, index, getSize() - index, getSize() - index); 70 | } 71 | return mRectF; 72 | } 73 | 74 | private Paint createPaint() { 75 | if (mPaint == null) { 76 | mPaint = new Paint(); 77 | mPaint.setAntiAlias(true); 78 | mPaint.setStyle(Paint.Style.STROKE); 79 | mPaint.setStrokeWidth(mStrokeWidth); 80 | mPaint.setColor(mStrokeColor); 81 | } 82 | 83 | return mPaint; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/view/circularprogressbutton/OnAnimationEndListener.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.view.circularprogressbutton; 2 | 3 | interface OnAnimationEndListener { 4 | 5 | public void onAnimationEnd(); 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/view/circularprogressbutton/StateManager.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.view.circularprogressbutton; 2 | 3 | class StateManager { 4 | 5 | private boolean mIsEnabled; 6 | private int mProgress; 7 | 8 | public StateManager(CircularProgressButton progressButton) { 9 | mIsEnabled = progressButton.isEnabled(); 10 | mProgress = progressButton.getProgress(); 11 | } 12 | 13 | public void saveProgress(CircularProgressButton progressButton) { 14 | mProgress = progressButton.getProgress(); 15 | } 16 | 17 | public boolean isEnabled() { 18 | return mIsEnabled; 19 | } 20 | 21 | public int getProgress() { 22 | return mProgress; 23 | } 24 | 25 | public void checkState(CircularProgressButton progressButton) { 26 | if (progressButton.getProgress() != getProgress()) { 27 | progressButton.setProgress(progressButton.getProgress()); 28 | } else if (progressButton.isEnabled() != isEnabled()) { 29 | progressButton.setEnabled(progressButton.isEnabled()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/cxsj/runhdu/view/circularprogressbutton/StrokeGradientDrawable.java: -------------------------------------------------------------------------------- 1 | package com.cxsj.runhdu.view.circularprogressbutton; 2 | 3 | import android.graphics.drawable.GradientDrawable; 4 | 5 | public class StrokeGradientDrawable { 6 | 7 | private int mStrokeWidth; 8 | private int mStrokeColor; 9 | 10 | private GradientDrawable mGradientDrawable; 11 | 12 | public StrokeGradientDrawable(GradientDrawable drawable) { 13 | mGradientDrawable = drawable; 14 | } 15 | 16 | public int getStrokeWidth() { 17 | return mStrokeWidth; 18 | } 19 | 20 | public void setStrokeWidth(int strokeWidth) { 21 | mStrokeWidth = strokeWidth; 22 | mGradientDrawable.setStroke(strokeWidth, getStrokeColor()); 23 | } 24 | 25 | public int getStrokeColor() { 26 | return mStrokeColor; 27 | } 28 | 29 | public void setStrokeColor(int strokeColor) { 30 | mStrokeColor = strokeColor; 31 | mGradientDrawable.setStroke(getStrokeWidth(), strokeColor); 32 | } 33 | 34 | public GradientDrawable getGradientDrawable() { 35 | return mGradientDrawable; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v4_4_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v4_4_0.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v4_4_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v4_4_0.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/arm64-v8a/liblocSDK7a.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v4_4_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v4_4_0.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v4_4_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v4_4_0.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/armeabi-v7a/liblocSDK7a.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v4_4_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v4_4_0.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v4_4_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v4_4_0.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/jniLibs/armeabi/liblocSDK7a.so -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/anim/fade_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/bg_mountain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/bg_mountain.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/border.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/border_blue.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/border_blue.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/divider_horizontal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/green.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/green.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_distance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_distance.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_energy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_energy.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_enter_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_enter_blue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_exit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_friends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_friends.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_invalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_invalid.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_lab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_lab.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_loc_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_loc_end.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_loc_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_loc_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_loc_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_loc_start.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_moments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_moments.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_person_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_person_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_run_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_run_blue.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_run_indoor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_run_indoor.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_run_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_run_main.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_settings.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_share_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_share_white.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_sms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_sms.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_speed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_sport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_sport.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_start_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_start_run.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_steps.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_sunlight_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_sunlight_run.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_time.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_valid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/ic_valid.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/menu_bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/menu_bg.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/more_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable-xxhdpi/more_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/run_button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/stop_run_button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/cpb_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/cpb_complete_state_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/cpb_error_state_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/cpb_idle_state_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/fillet_button_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/hdu_run_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable/hdu_run_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable/ic_empty.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/line.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SailFlorve/RunHDU/2bf46fa1b9b73dec4cd8f014d0d6f08490293b00/app/src/main/res/drawable/photo.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 24 | 25 | 32 | 33 | 41 | 42 | 50 | 51 | 59 | 60 | 69 | 70 | 71 | 72 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_feedback.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 18 | 19 | 30 | 31 | 41 | 42 | 56 | 57 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_friend_apply_box.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | 21 | 34 | 35 | 40 | 41 | 46 | 47 | 48 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_help.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_lab.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_welcome.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | 18 | 19 | 25 | 26 | 32 | 33 | 41 | 42 | 43 | 44 | 50 | 51 |