From d59d55575d913646b7a90fca651904ab889c6723 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 18 二月 2022 16:30:53 +0800
Subject: [PATCH] ### 一、任务模块相关
---
app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt | 35
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.kt | 298 ++++++
app/src/main/res/drawable/selector_bg_gray_or_white.xml | 42
app/src/main/java/cn/flightfeather/thirdappmodule/view/recyclerview/RecyclerViewPanel.kt | 44
app/src/main/res/layout/layout_search_title.xml | 44 +
app/src/main/res/drawable/ic_baseline_content_copy_24.xml | 5
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuCameraActivity.kt | 7
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemListActivity.kt | 5
app/src/main/res/layout/activity_search.xml | 65 +
app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/PhotoUtil.java | 1
app/src/main/res/layout/activity_analysis_rank.xml | 2
appDucha/src/main/java/com/flightfeather/ducha/module/DCMainActivity.kt | 4
app/src/main/res/layout/item_selector_head.xml | 34
app/src/main/res/mipmap-xhdpi/ic_logo.png | 0
.idea/misc.xml | 68 +
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProblemDetailFragment.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/ImageMergeUtil.kt | 67 +
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/TownRankContentFragment.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/util/DialogUtil2.kt | 35
appsupervision/build.gradle | 4
app/src/main/java/cn/flightfeather/thirdappmodule/util/location/LocationUtil.kt | 2
app/src/main/res/layout/fragment_analysis_over_view.xml | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisFragment.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewTopTaskActivity.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisTabActivity.kt | 2
app/build.gradle | 4
app/src/main/res/mipmap-hdpi/ic_search.png | 0
app/src/main/res/mipmap-mdpi/ic_search.png | 0
app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchActivity.kt | 106 ++
app/src/main/res/values/strings.xml | 2
appDucha/src/main/java/com/flightfeather/ducha/module/common/FileExportActivity.kt | 4
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuChangeActivity.kt | 5
app/src/main/res/layout/activity_camera.xml | 188 +++
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/SceneRankContentFragment.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/home/HomeFragment_scene.kt | 2
moduleBase/build.gradle | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt | 12
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/AnalysisRankActivity.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt | 28
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProgressDetailFragment.kt | 2
app/src/main/res/layout/fragment_task.xml | 199 +++
app/src/main/java/cn/flightfeather/thirdappmodule/CommonApplication.java | 4
app/src/main/res/layout/activity_analysis_tab.xml | 2
app/src/main/java/cn/flightfeather/thirdappmodule/activity/ProblemDetailActivity.java | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewSubTaskActivity.kt | 10
app/src/main/res/layout/fragment_rank_content.xml | 2
app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/SearchService.kt | 13
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/TaskProgressAdapter.java | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/MainActivity.java | 2
app/src/main/java/cn/flightfeather/thirdappmodule/activity/MapActivity.java | 5
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisProblemFragment.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisProgressFragment.java | 2
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskViewModel.kt | 34
app/src/main/res/layout/dialog_take_evidence.xml | 194 ++--
.idea/assetWizardSettings.xml | 5
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/packageinfo | 0
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuNewGitActivity.kt | 5
app/src/main/res/mipmap-xhdpi/ic_search.png | 0
app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchViewModel.kt | 42
app/src/main/res/mipmap-xxxhdpi/ic_search.png | 0
app/src/main/AndroidManifest.xml | 6
app/src/main/res/drawable/selector_btn_copy_delete.xml | 5
/dev/null | 605 -------------
app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseTakePicActivity.kt | 30
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisOverViewFragment.kt | 4
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisRankFragment.kt | 2
app/src/main/java/cn/flightfeather/thirdappmodule/repository/SearchRepository.kt | 24
app/src/main/res/mipmap-xxhdpi/ic_search.png | 0
app/src/main/java/cn/flightfeather/thirdappmodule/module/common/CameraActivity.kt | 264 +++++
app/src/main/res/drawable/ic_baseline_backspace_24.xml | 5
70 files changed, 1,677 insertions(+), 926 deletions(-)
diff --git a/.idea/assetWizardSettings.xml b/.idea/assetWizardSettings.xml
index 2a57cf2..9d948fb 100644
--- a/.idea/assetWizardSettings.xml
+++ b/.idea/assetWizardSettings.xml
@@ -18,7 +18,7 @@
<PersistentState>
<option name="values">
<map>
- <entry key="url" value="file:/$PROJECT_DIR$/../../../../androidsdk/sdk_new/icons/material/materialicons/arrow_downward/baseline_arrow_downward_24.xml" />
+ <entry key="url" value="file:/$PROJECT_DIR$/../../../../androidsdk/sdk_new/icons/material/materialicons/backspace/baseline_backspace_24.xml" />
</map>
</option>
</PersistentState>
@@ -28,7 +28,8 @@
</option>
<option name="values">
<map>
- <entry key="outputName" value="ic_baseline_arrow_downward_24" />
+ <entry key="color" value="ff6767" />
+ <entry key="outputName" value="ic_baseline_backspace_24" />
<entry key="sourceFile" value="C:\Users\feiyu" />
</map>
</option>
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 33c2deb..9878c2d 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,18 +3,86 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable-xhdpi/bg_ripple.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/bg_btngroup.xml" value="0.175" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/ic_baseline_backspace_24.xml" value="0.175" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/ic_baseline_content_copy_24.xml" value="0.175" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/ic_unfold_more_black_20dp.xml" value="0.175" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_bg_blue_or_white.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_bg_gray_or_white.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_bg_green_or_yellow.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_btn_common.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_btn_copy_delete.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_icon_upload.xml" value="0.336" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_image_right_or_false.xml" value="0.2604166666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_left_arrow.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_right_arrow.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/selector_show_hide_white.xml" value="0.336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/shap_stroke_bottom.xml" value="0.336" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/shape_bg_gradient_reverse.xml" value="0.31145833333333334" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/shape_button_green.xml" value="0.309375" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/drawable/shape_circle_board.xml" value="0.336" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_base_map.xml" value="0.29739583333333336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_camera.xml" value="0.25" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_new_month_task.xml" value="0.29739583333333336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_new_sub_task.xml" value="0.27239583333333334" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_night_work.xml" value="0.2989583333333333" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_night_work_manage.xml" value="0.3338541666666667" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_problem_change_detail.xml" value="0.30364583333333334" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_problem_change_pollution_scene.xml" value="0.33489583333333334" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_scense_map.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_search.xml" value="0.25" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/activity_task.xml" value="0.29739583333333336" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_alert.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_alert_2.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_bottom_sheet.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/dialog_take_evidence.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/fragment_inspection2.xml" value="0.3338541666666667" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/fragment_rank_content.xml" value="0.21458333333333332" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/fragment_task.xml" value="0.27239583333333334" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/function_card5_competent.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/function_card5_scene.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_common_news.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_day_task_progress.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_evalution_grade.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_gradelist_2.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_image_display.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_movlist.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_night_work.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_night_work_2.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_night_work_3.xml" value="0.3338541666666667" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_night_work_no_more.xml" value="0.2989583333333333" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_problem_category.xml" value="0.3338541666666667" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_problem_change_pollution_scene.xml" value="0.33" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_problem_count.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_problem_list.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_problem_list_2.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_problem_promise.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_problem_type.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_scene.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_scene_new_task.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_scene_rank.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_scene_task.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_scense_detail_list.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_selector_head.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_take_photo.xml" value="0.24947916666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_task_list_2.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_task_list_head.xml" value="0.27239583333333334" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_task_progress_2.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_today_task.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_topclass_task.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/item_town_rank.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_loading.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_recycler_view_refresh.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search.xml" value="0.21145833333333333" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_2.xml" value="0.5" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_bar.xml" value="0.21145833333333333" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_title.xml" value="0.33" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/recycler_item_section_head.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/appDucha/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.175" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/appDucha/src/main/res/drawable/ic_bg_red.xml" value="0.175" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/appDucha/src/main/res/drawable/ic_cloud_download_white_24dp.xml" value="0.175" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/appDucha/src/main/res/drawable/ic_launcher_background.xml" value="0.175" />
</map>
</option>
</component>
diff --git a/app/build.gradle b/app/build.gradle
index 2fa6aa9..32e3645 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -15,8 +15,8 @@
// applicationId "cn.flightfeather.thirdapp"
minSdkVersion 19
targetSdkVersion 28
- versionCode 29
- versionName "1.1.14.13"
+ versionCode 33
+ versionName "1.1.14.17"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// renderscriptTargetApi 25
// renderscriptSupportModeEnabled true
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 574f03d..11b717c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -163,11 +163,11 @@
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
- android:name="cn.flightfeather.thirdappmodule.dataanalysis.AnalysisTabActivity"
+ android:name="cn.flightfeather.thirdappmodule.module.dataanalysis.AnalysisTabActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
- android:name="cn.flightfeather.thirdappmodule.dataanalysis.rank.AnalysisRankActivity"
+ android:name="cn.flightfeather.thirdappmodule.module.dataanalysis.rank.AnalysisRankActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
@@ -238,6 +238,8 @@
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name="cn.flightfeather.thirdappmodule.module.common.CameraActivity"
android:theme="@style/AppFullScreenTheme" />
+ <activity android:name="cn.flightfeather.thirdappmodule.module.common.SearchActivity"
+ android:theme="@style/AppTheme.NoActionBar" />
</application>
</manifest>
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/CommonApplication.java b/app/src/main/java/cn/flightfeather/thirdappmodule/CommonApplication.java
index 0c7c59e..adf715a 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/CommonApplication.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/CommonApplication.java
@@ -31,8 +31,8 @@
public class CommonApplication extends Application {
// public final String ROOT_URL ="http://192.168.0.200:8080/";
// public final String ROOT_URL_IMAGE ="http://192.168.0.200:8080/images/";
- public String ROOT_URL ="http://192.168.0.146:8080/";
- public String ROOT_URL_IMAGE ="http://192.168.0.146:8080/images/";
+ public String ROOT_URL ="http://192.168.0.146:8081/";
+ public String ROOT_URL_IMAGE ="http://192.168.0.146:8081/images/";
public String ROOT_URL_RELEASE = "http://47.100.191.150:9005/";
public String ROOT_URL_RELEASE_IMAGE = ROOT_URL_RELEASE + "images/";
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/activity/MapActivity.java b/app/src/main/java/cn/flightfeather/thirdappmodule/activity/MapActivity.java
index f3f5686..2006d02 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/activity/MapActivity.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/activity/MapActivity.java
@@ -22,6 +22,11 @@
import cn.flightfeather.thirdappmodule.R;
+/**
+ * @author riku
+ * Date: 2019/8/1
+ * 淇敼鍦烘櫙浣嶇疆
+ */
public class MapActivity extends AppCompatActivity implements View.OnClickListener,AMap.OnMyLocationChangeListener {
//瀹氫綅
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/activity/ProblemDetailActivity.java b/app/src/main/java/cn/flightfeather/thirdappmodule/activity/ProblemDetailActivity.java
index 9e33943..73d2b23 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/activity/ProblemDetailActivity.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/activity/ProblemDetailActivity.java
@@ -698,7 +698,7 @@
return new View.OnClickListener() {
@Override
public void onClick(View v) {
- PhotoUtil.pickPhoto2(ProblemDetailActivity.this, type, picNum);
+ PhotoUtil.pickPhoto(ProblemDetailActivity.this, type, picNum);
}
};
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment_B.java
deleted file mode 100644
index cac2fb3..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment_B.java
+++ /dev/null
@@ -1,644 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis;
-//
-//import android.app.Dialog;
-//import android.content.Context;
-//import android.content.Intent;
-//import android.os.Bundle;
-//import android.os.Handler;
-//import android.support.annotation.Nullable;
-//import android.support.v4.app.Fragment;
-//import android.support.v7.widget.GridLayoutManager;
-//import android.support.v7.widget.LinearLayoutManager;
-//import android.support.v7.widget.RecyclerView;
-//import android.view.LayoutInflater;
-//import android.view.View;
-//import android.view.ViewGroup;
-//import android.widget.ImageView;
-//import android.widget.LinearLayout;
-//import android.widget.ScrollView;
-//import android.widget.TextView;
-//
-//import com.github.mikephil.charting.charts.PieChart;
-//import com.ping.greendao.gen.DomainitemDao;
-//
-//import org.greenrobot.greendao.query.QueryBuilder;
-//
-//import java.util.ArrayList;
-//import java.util.Date;
-//import java.util.HashMap;
-//import java.util.List;
-//
-//import butterknife.BindView;
-//import butterknife.ButterKnife;
-//import butterknife.OnClick;
-//import butterknife.Unbinder;
-//import cn.flightfeather.thirdapp.CommonApplication;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter;
-//import cn.flightfeather.thirdapp.bean.entity.Domainitem;
-//import cn.flightfeather.thirdapp.bean.vo.RankVo;
-//import cn.flightfeather.thirdapp.bean.vo.StatisticsVo;
-//import cn.flightfeather.thirdapp.bean.vo.TaskFrequencyVo;
-//import cn.flightfeather.thirdapp.bean.vo.TaskVo;
-//import cn.flightfeather.thirdapp.dataanalysis.rank.AnalysisRankActivity;
-//import cn.flightfeather.thirdapp.httpservice.ProblemListService;
-//import cn.flightfeather.thirdapp.httpservice.TaskService;
-//import cn.flightfeather.thirdapp.util.ChartGenerator;
-//import cn.flightfeather.thirdapp.util.CommonUtils;
-//import cn.flightfeather.thirdapp.util.DateFormatter;
-//import cn.flightfeather.thirdapp.util.DialogUtil;
-//import cn.flightfeather.thirdapp.util.Domain;
-//import cn.flightfeather.thirdapp.util.PopupGenerator;
-//import retrofit2.Call;
-//import retrofit2.Callback;
-//import retrofit2.Response;
-//import retrofit2.Retrofit;
-//
-///**
-// * 2018.12.25 created by riku
-// * 鍒嗘瀽鎬昏鐣岄潰
-// * 缁煎悎绠�鐣ュ睍绀哄悇缁熻姒傚喌锛�
-// * 浠诲姟杩涘害銆佽闀囨帓鍚嶃�佸満鏅帓鍚嶃�侀棶棰樼被鍨嬪垎甯�
-// */
-//public class AnalysisOverViewFragment_B extends Fragment {
-//
-// //<editor-fold desc="鍏ㄥ眬鍙橀噺">
-// private final String TITLE = "鎬昏";
-//
-// private CommonApplication app;
-// private Retrofit retrofit;
-//
-// private Unbinder unbinder;
-//
-// private String curSceneTypeId = "1";//褰撳墠鍦烘櫙绫诲瀷
-// private String curSceneTypeName = "宸ュ湴";//褰撳墠鍦烘櫙绫诲瀷
-// private RankVo rankVo = new RankVo();
-// private int maxShowItems = 3;
-// private Dialog dialog;
-//
-// private ViewGroup container;
-// //</editor-fold>
-//
-// //<editor-fold desc="鏋勯�犲嚱鏁�">
-// public AnalysisOverViewFragment_B() {
-// // Required empty public constructor
-// }
-//
-//
-// public static AnalysisOverViewFragment_B newInstance() {
-// AnalysisOverViewFragment_B fragment = new AnalysisOverViewFragment_B();
-// return fragment;
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鐢熷懡鍛ㄦ湡">
-// @Override
-// public void onCreate(Bundle savedInstanceState) {
-// super.onCreate(savedInstanceState);
-// }
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-// // Inflate the layout for this fragment
-// this.container = container;
-// View view = inflater.inflate(R.layout.fragment_analysis_over_view, container, false);
-// unbinder = ButterKnife.bind(this, view);
-// return view;
-// }
-//
-//
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-// app = (CommonApplication) getActivity().getApplication();
-// retrofit = app.getRetrofit();
-// initPopup();
-// initToolBar();
-// initBlock1();
-// initBlock2();
-// initBlock3();
-// initBlock4();
-// initPannel();
-// }
-//
-// @Override
-// public void onAttach(Context context) {
-// super.onAttach(context);
-//
-// }
-//
-// @Override
-// public void onDetach() {
-// super.onDetach();
-// }
-//
-// /**
-// * Called when the fragment is no longer in use. This is called
-// * after {@link #onStop()} and before {@link #onDetach()}.
-// */
-// @Override
-// public void onDestroy() {
-// super.onDestroy();
-// if (unbinder != null) {
-// unbinder.unbind();
-// }
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鏍囬鏍�">
-// @BindView(R.id.action_bar) View action_bar;
-// private void initToolBar() {
-// action_bar.findViewById(R.id.spinner_topclass_task).setVisibility(View.GONE);
-// action_bar.findViewById(R.id.img_left).setVisibility(View.GONE);
-// action_bar.findViewById(R.id.img_right).setVisibility(View.INVISIBLE);
-// action_bar.findViewById(R.id.ll_menu_text).setVisibility(View.VISIBLE);
-// TextView title = action_bar.findViewById(R.id.actionbar_title);
-// title.setText(TITLE);
-//// title.setGravity(Gravity.CENTER_HORIZONTAL);
-//// ViewGroup.LayoutParams layoutParams = title.getLayoutParams();
-//// layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="椤堕儴椤跺眰浠诲姟閫夋嫨鍖�">
-// List<TaskVo> allTaskVoList = new ArrayList<>();
-// List<TaskVo> showingTasks = new ArrayList<>();
-// int offset;
-//
-// private void initPannel() {
-// showDialog();
-// //椤跺眰浠诲姟
-// Call<ArrayList<TaskVo>> getTopClassTaskList = retrofit.create(TaskService.class).getTopClassTaskList(0);
-// getTopClassTaskList.enqueue(new Callback<ArrayList<TaskVo>>() {
-// @Override
-// public void onResponse(Call<ArrayList<TaskVo>> call, Response<ArrayList<TaskVo>> response) {
-// showingTasks.clear();
-// allTaskVoList.clear();
-// if (response.body() != null) {
-// allTaskVoList.addAll(response.body());//杩斿洖缁撴灉榛樿鎸夋椂闂撮檷搴忔帓搴�
-// for (TaskVo t : allTaskVoList) {
-// if (t.getDistrictcode().equals(app.getCurrentUser().getDguid())) {//涓荤閮ㄩ棬鐨勯儴闂╥d灏辨槸鍖哄幙id
-// showingTasks.add(t);
-// }
-// }
-// }
-// refreshPannel();
-// }
-//
-// @Override
-// public void onFailure(Call<ArrayList<TaskVo>> call, Throwable t) {
-// refreshPannel();
-// }
-// });
-// }
-//
-// @BindView(R.id.tab_time_pannel) View tab_time_pannel;
-// TextView text;
-// private void refreshPannel() {
-// showDialog();
-// text = tab_time_pannel.findViewById(R.id.text_time);
-// if (!showingTasks.isEmpty()) {
-// Date date = showingTasks.get(offset).getStarttime();
-// String s = DateFormatter.YearMonthFormat_CN.format(date);
-// text.setText(s);
-// refresh();
-// }
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="浠诲姟杩涘害">
-// @BindView(R.id.rv_task_progress) RecyclerView rv_task_progress;
-// AllRecyclerViewAdapter<TaskFrequencyVo.FrequencyInfo> freAdapter;
-// List<TaskFrequencyVo.FrequencyInfo> frequencyInfos = new ArrayList<>();
-//
-// private void initBlock1() {
-// freAdapter = new AllRecyclerViewAdapter<TaskFrequencyVo.FrequencyInfo>(frequencyInfos, R.layout.item_common_news, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, TaskFrequencyVo.FrequencyInfo obj, boolean isSelected, int position) {
-// StringBuilder totalFrequency = new StringBuilder("鎬荤洃绠¢娆�: " + obj.getTotalFrequency() + "娆�");
-// StringBuilder clearFrequency = new StringBuilder("宸茬洃绠¢娆�: " + obj.getClearFrequency() + "娆�");
-// int tmpLeft = obj.getTotalFrequency() - obj.getClearFrequency();
-// StringBuilder leftFrequency = new StringBuilder("鍓╀綑鐩戠棰戞: " + (tmpLeft >= 0 ? tmpLeft : 0) + "娆�");
-// holder.setText(R.id.text_head, obj.getSceneTypeName())
-// .setText(R.id.text_1_1, totalFrequency)
-// .setText(R.id.text_2_1, clearFrequency)
-// .setText(R.id.text_3_1, leftFrequency)
-// .setVisibility(R.id.text_1_2, View.GONE)
-// .setVisibility(R.id.text_2_2, View.GONE)
-// .setVisibility(R.id.text_3_2, View.GONE)
-// .setImageResource(R.id.image_head, CommonUtils.getIconBySceneType(obj.getSceneTypeId()));
-// }
-// };
-//
-// LinearLayoutManager lm = new LinearLayoutManager(getActivity());
-// lm.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_task_progress.setLayoutManager(lm);
-// rv_task_progress.setAdapter(freAdapter);
-// }
-//
-// private void refreshBlock1() {
-// String id = getTopTaskId();
-// Call<TaskFrequencyVo> getFrequency = retrofit.create(TaskService.class).getFrequency(id);
-// getFrequency.enqueue(new Callback<TaskFrequencyVo>() {
-// @Override
-// public void onResponse(Call<TaskFrequencyVo> call, Response<TaskFrequencyVo> response) {
-// if (response.body() != null) {
-// TaskFrequencyVo frequencyVo = response.body();
-// frequencyInfos.clear();
-// frequencyInfos.addAll(frequencyVo.getFrequencyInfos());
-// freAdapter.notifyDataSetChanged();
-// } else {
-// loadingOver(false);
-// }
-// }
-//
-// @Override
-// public void onFailure(Call<TaskFrequencyVo> call, Throwable t) {
-// loadingOver(false);
-// }
-// });
-//
-// }
-//
-// //</editor-fold>
-//
-// //<editor-fold desc="琛楅晣鎺掑悕">
-// @BindView(R.id.rv_rank_town) RecyclerView rv_rank_town;
-// AllRecyclerViewAdapter<RankVo.TownRank> townRankAdapter;
-// List<RankVo.TownRank> townRanks = new ArrayList<>();
-// List<RankVo.TownRank> allTownRanks = new ArrayList<>();
-//
-// private void initBlock2() {
-// townRankAdapter = new AllRecyclerViewAdapter<RankVo.TownRank>(townRanks, R.layout.item_problem_count, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, RankVo.TownRank obj, boolean isSelected, int position) {
-//
-// if (position < 3) {
-// int rank = obj.getRankNo();
-// holder.setText(R.id.text_name, obj.getTownName())
-// .setText(R.id.text_firstCount, getScore(obj.getAverageScore()))
-// .setVisibility(R.id.text_secondCount, View.GONE)
-// .setVisibility(R.id.image_rank, View.GONE)
-// .setText(R.id.text_no, String.valueOf(rank));
-// switch (rank) {
-// case 1:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_4);
-// break;
-// case 2:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_3);
-// break;
-// case 3:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_2);
-// break;
-// default:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_1);
-// break;
-// }
-// }
-// }
-// };
-// LinearLayoutManager lm = new LinearLayoutManager(getActivity());
-// lm.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_rank_town.setLayoutManager(lm);
-// rv_rank_town.setAdapter(townRankAdapter);
-// }
-//
-// private void refreshBlock2and3() {
-// String id = getTopTaskId();
-// Call<RankVo> getRank = retrofit.create(TaskService.class).getRank(id, curSceneTypeId, null);
-// getRank.enqueue(new Callback<RankVo>() {
-// @Override
-// public void onResponse(Call<RankVo> call, Response<RankVo> response) {
-// if (response.body() != null) {
-// rankVo = response.body();
-// rankS(rankVo.getSceneRanks());
-// rankT(rankVo.getTownRanks());
-// townRanks.clear();
-// allTownRanks.clear();
-// allTownRanks.addAll(rankVo.getTownRanks());
-// int tmpMax = maxShowItems <= allTownRanks.size() ? maxShowItems : allTownRanks.size();
-// for (int i = 0; i < tmpMax; i++) {
-// townRanks.add(allTownRanks.get(i));
-// }
-// townRankAdapter.notifyDataSetChanged();
-//
-// sceneRanks.clear();
-// allSceneRanks.clear();
-// allSceneRanks.addAll(rankVo.getSceneRanks());
-// int tmpMax1 = maxShowItems <= allSceneRanks.size() ? maxShowItems : allSceneRanks.size();
-// for (int i = 0; i < tmpMax1; i++) {
-// sceneRanks.add(allSceneRanks.get(i));
-// }
-// sceneRankAdapter.notifyDataSetChanged();
-// } else {
-// loadingOver(false);
-// }
-// }
-//
-// @Override
-// public void onFailure(Call<RankVo> call, Throwable t) {
-// loadingOver(false);
-// }
-// });
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鍦烘櫙鎺掑悕">
-// @BindView(R.id.rv_rank_scene) RecyclerView rv_rank_scene;
-// AllRecyclerViewAdapter<RankVo.SceneRank> sceneRankAdapter;
-// List<RankVo.SceneRank> sceneRanks = new ArrayList<>();
-// List<RankVo.SceneRank> allSceneRanks = new ArrayList<>();
-//
-// private void initBlock3() {
-// sceneRankAdapter = new AllRecyclerViewAdapter<RankVo.SceneRank>(sceneRanks, R.layout.item_problem_count, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, RankVo.SceneRank obj, boolean isSelected, int position) {
-// if (position < 3) {
-// int rank = obj.getRankNo();
-// holder.setText(R.id.text_name, obj.getSceneName())
-// .setText(R.id.text_firstCount, getScore(obj.getScore()))
-// .setVisibility(R.id.text_secondCount, View.GONE)
-// .setVisibility(R.id.image_rank, View.GONE)
-// .setText(R.id.text_no, String.valueOf(rank));
-// switch (rank) {
-// case 1:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_4);
-// break;
-// case 2:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_3);
-// break;
-// case 3:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_2);
-// break;
-// default:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_1);
-// break;
-// }
-// }
-// }
-// };
-// LinearLayoutManager lm = new LinearLayoutManager(getActivity());
-// lm.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_rank_scene.setLayoutManager(lm);
-// rv_rank_scene.setAdapter(sceneRankAdapter);
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="闂鍒嗘瀽">
-// @BindView(R.id.pie_chart_problem) PieChart pieChart;
-// @BindView(R.id.ll_no_data) LinearLayout ll_no_data;
-// HashMap<String, Float> datas = new HashMap<>();
-//
-// private void initBlock4() {
-// ChartGenerator.quickSetupChart(pieChart);
-// }
-//
-// private void refreshBlock4() {
-// String id = getTopTaskId();
-// Call<List<StatisticsVo>> getStatisticalResultbyId = retrofit.create(ProblemListService.class).getStatisticalResultbyId(id, curSceneTypeId);
-// getStatisticalResultbyId.enqueue(new Callback<List<StatisticsVo>>() {
-// @Override
-// public void onResponse(Call<List<StatisticsVo>> call, Response<List<StatisticsVo>> response) {
-// datas.clear();
-// if (response.body() != null) {
-// List<StatisticsVo> statisticsVos = response.body();
-// for (StatisticsVo s :
-// statisticsVos) {
-// datas.put(s.getName(), (float) s.getCount());
-// }
-// if (datas.isEmpty()) {
-// pieChart.setVisibility(View.GONE);
-// ll_no_data.setVisibility(View.VISIBLE);
-// } else {
-// pieChart.setVisibility(View.VISIBLE);
-// ll_no_data.setVisibility(View.GONE);
-// }
-// ChartGenerator.quickSetData(pieChart, datas, "闂缁熻");
-// loadingOver(true);
-// } else {
-// loadingOver(false);
-// }
-// }
-//
-// @Override
-// public void onFailure(Call<List<StatisticsVo>> call, Throwable t) {
-// datas.clear();
-// ChartGenerator.quickSetData(pieChart, datas, "闂缁熻");
-// loadingOver(false);
-// }
-// });
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鑾峰彇鏌ヨ鍙傛暟">
-// private String getTopTaskId() {
-// return showingTasks.get(offset).getTguid();//杩斿洖椤跺眰浠诲姟id
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鑱旂綉鍒锋柊">
-// private void refresh() {
-// showDialog();
-// refreshBlock1();
-// refreshBlock2and3();
-// refreshBlock4();
-// }
-// //</editor-fold>
-//
-//
-// //<editor-fold desc="鑾峰彇寮瑰嚭妗�">
-// @BindView(R.id.text_type) TextView text_type;
-// @BindView(R.id.image_type) ImageView image_type;
-//
-// RecyclerView rv_popup;
-// AllRecyclerViewAdapter<Domainitem> sceneAdapter;
-// private List<Domainitem> sceneTypeData = new ArrayList<>();//鍦烘櫙绫诲瀷
-// PopupGenerator popup;
-//
-// private void initPopup() {
-// final DomainitemDao domainitemDao = app.getDaoSession().getDomainitemDao();
-// //鍦烘櫙绫诲瀷
-// QueryBuilder<Domainitem> queryBuilder = domainitemDao.queryBuilder()
-// .where(DomainitemDao.Properties.Dcguid.eq(Domain.DOMAINGUID_SCENSETYPE))
-// .orderAsc(DomainitemDao.Properties.Value);
-// sceneTypeData.addAll(queryBuilder.list());
-//
-// popup = new PopupGenerator(getActivity(), R.layout.popup_scene_selector);
-// rv_popup = popup.findViewById(R.id.rv_popup);
-// sceneAdapter = new AllRecyclerViewAdapter<Domainitem>(sceneTypeData, R.layout.item_scene, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, final Domainitem obj, boolean isSelected, int position) {
-// String sceneType = String.valueOf(obj.getValue());
-// holder.setText(R.id.text_scene, obj.getText())
-// .setImageResource(R.id.image_scene, CommonUtils.getIconBySceneType(sceneType))
-// .setOnItemClickListener(new View.OnClickListener() {
-// @Override
-// public void onClick(View v) {
-// curSceneTypeId = obj.getValue();
-// curSceneTypeName = obj.getText();
-// }
-// });
-// }
-// };
-// GridLayoutManager layoutManager = new GridLayoutManager(getActivity(), 3);
-// layoutManager.setOrientation(GridLayoutManager.VERTICAL);
-// layoutManager.setAutoMeasureEnabled(true);
-// rv_popup.setLayoutManager(layoutManager);
-// rv_popup.setAdapter(sceneAdapter);
-//
-// popup.setPopupWindowFullScreen(false);
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鐐瑰嚮浜嬩欢">
-// //鍒囨崲椤跺眰浠诲姟
-// @OnClick({R.id.image_left, R.id.image_right})
-// void onClick(View view) {
-// int tmpOffset = offset;
-// switch (view.getId()) {
-// case R.id.image_left:
-// int tmp = offset + 1;
-// offset = tmp >= showingTasks.size() ? offset : tmp;
-// break;
-// case R.id.image_right:
-// int tmp1 = offset - 1;
-// offset = tmp1 < 0 ? offset : tmp1;
-// break;
-// }
-// if (tmpOffset != offset) {
-// refreshPannel();
-// }
-// }
-//
-// //鍦烘櫙閫夋嫨鑿滃崟
-// @OnClick(R.id.ll_menu_text)
-// void onClickMenu() {
-//// if (popup.isShowing()) {
-//// popup.dismiss();
-//// } else {
-//// popup.showPopupWindow();
-////
-//// }
-// }
-//
-// //璇︾粏鍐呭鎸夐挳
-// @OnClick({R.id.text_all_2, R.id.text_all_3})
-// void onClickMoreInfo(View v) {
-// Intent intent = new Intent(getActivity(), AnalysisRankActivity.class);
-// Bundle bundle = new Bundle();
-// bundle.putSerializable(AnalysisRankActivity.ARG_PARAM1, rankVo);
-// bundle.putString(AnalysisRankActivity.ARG_PARAM2, rankVo.getTopTaskName());
-// bundle.putString(AnalysisRankActivity.ARG_PARAM3, curSceneTypeName);
-// switch (v.getId()) {
-// case R.id.text_all_2:
-// bundle.putInt(AnalysisRankActivity.ARG_PARAM4, 1);
-// break;
-// case R.id.text_all_3:
-// bundle.putInt(AnalysisRankActivity.ARG_PARAM4, 0);
-// break;
-// }
-// intent.putExtras(bundle);
-// startActivity(intent);
-// }
-//
-// //閲嶆柊鍔犺浇鎸夐挳
-// @OnClick(R.id.button_refresh)
-// void onClickRefreshButton() {
-// refresh();
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鏇存柊褰撳墠鍦烘櫙">
-// private void refreshCurScene(String id, String name) {
-// curSceneTypeId = id;
-// curSceneTypeName = name;
-//
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="缃戠粶鍔犺浇瀹屾垚">
-// @BindView(R.id.sl_content) ScrollView scrollView;//鍐呭椤甸潰
-// @BindView(R.id.no_data) View no_data;//鍔犺浇澶辫触椤甸潰
-// private void loadingOver(boolean b) {
-// new Handler().postDelayed(new Runnable() {
-// @Override
-// public void run() {
-// if (dialog.isShowing()) {
-// dialog.dismiss();
-// }
-// }
-// }, 500);
-// if (b) {//鍔犺浇鎴愬姛
-// scrollView.setVisibility(View.VISIBLE);
-// no_data.setVisibility(View.GONE);
-// } else {//鍔犺浇澶辫触
-// scrollView.setVisibility(View.GONE);
-// no_data.setVisibility(View.VISIBLE);
-// }
-// }
-// //</editor-fold>
-//
-// private void showDialog() {
-// if (dialog == null) {
-// dialog = DialogUtil.createLoadingDialog(getActivity(), "");
-// }
-// if (!dialog.isShowing()) {
-// dialog.show();
-// }
-// }
-//
-// private String getScore(int score) {
-// return String.valueOf(score == -1 ? "鏈瘎鍒�" : score);
-// }
-//
-// //鍒锋柊鎺掑悕淇℃伅
-// public static void rankS(List<RankVo.SceneRank> sceneRanks) {
-// if (sceneRanks == null) return;
-// RankVo.SceneRank last = null;
-// RankVo.SceneRank current = null;
-// int rankNo = 1;
-// for (int i = 0; i < sceneRanks.size(); i++) {
-// if (i > 0) {
-// last = sceneRanks.get(i - 1);
-// }
-// current = sceneRanks.get(i);
-// if (last != null) {
-// //鍚屽垎鏃跺苟鍒楁帓鍚�
-// if (current.getScore() == last.getScore()) {
-// current.setRankNo(last.getRankNo());
-// } else {
-// current.setRankNo(rankNo);
-// }
-// } else {
-// current.setRankNo(rankNo);
-// }
-// rankNo++;
-// }
-// }
-//
-// //鍒锋柊鎺掑悕淇℃伅
-// private void rankT(List<RankVo.TownRank> townRanks) {
-// if (townRanks == null) return;
-// RankVo.TownRank last = null;
-// RankVo.TownRank current = null;
-// int rankNo = 1;
-// for (int i = 0; i < townRanks.size(); i++) {
-// if (i > 0) {
-// last = townRanks.get(i - 1);
-// }
-// current = townRanks.get(i);
-// if (last != null) {
-// //鍚屽垎鏃跺苟鍒楁帓鍚�
-// if (current.getAverageScore() == last.getAverageScore()) {
-// current.setRankNo(last.getRankNo());
-// } else {
-// current.setRankNo(rankNo);
-// }
-// } else {
-// current.setRankNo(rankNo);
-// }
-// rankNo++;
-// }
-// }
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment_B.java
deleted file mode 100644
index 2adf395..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment_B.java
+++ /dev/null
@@ -1,855 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis;
-//
-//
-//import android.app.DatePickerDialog;
-//import android.app.Dialog;
-//import android.content.Context;
-//import android.graphics.Color;
-//import android.icu.text.DecimalFormat;
-//import android.icu.util.Calendar;
-//import android.os.Build;
-//import android.os.Bundle;
-//import android.support.annotation.Nullable;
-//import android.support.annotation.RequiresApi;
-//import android.support.design.widget.FloatingActionButton;
-//import android.support.v4.app.Fragment;
-//import android.support.v7.widget.DividerItemDecoration;
-//import android.support.v7.widget.GridLayoutManager;
-//import android.support.v7.widget.LinearLayoutManager;
-//import android.support.v7.widget.RecyclerView;
-//import android.util.Log;
-//import android.view.LayoutInflater;
-//import android.view.View;
-//import android.view.ViewGroup;
-//import android.view.Window;
-//import android.view.WindowManager;
-//import android.widget.AdapterView;
-//import android.widget.DatePicker;
-//import android.widget.ImageView;
-//import android.widget.LinearLayout;
-//import android.widget.Spinner;
-//import android.widget.TextView;
-//import android.widget.Toast;
-//
-//import com.github.mikephil.charting.animation.Easing;
-//import com.github.mikephil.charting.charts.PieChart;
-//import com.github.mikephil.charting.components.Legend;
-//import com.github.mikephil.charting.data.PieData;
-//import com.github.mikephil.charting.data.PieDataSet;
-//import com.github.mikephil.charting.data.PieEntry;
-//import com.github.mikephil.charting.formatter.PercentFormatter;
-//import com.github.mikephil.charting.utils.ColorTemplate;
-//import com.ping.greendao.gen.CityDao;
-//import com.ping.greendao.gen.DistrictDao;
-//import com.ping.greendao.gen.DomainitemDao;
-//import com.ping.greendao.gen.ProvinceDao;
-//import com.ping.greendao.gen.TownDao;
-//
-//import org.greenrobot.greendao.query.QueryBuilder;
-//
-//import java.util.ArrayList;
-//import java.util.Collections;
-//import java.util.Comparator;
-//import java.util.Date;
-//import java.util.HashMap;
-//import java.util.List;
-//import java.util.Objects;
-//
-//import cn.flightfeather.thirdapp.CommonApplication;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.adapter.AllListViewAdapter;
-//import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter;
-//import cn.flightfeather.thirdapp.bean.entity.City;
-//import cn.flightfeather.thirdapp.bean.entity.District;
-//import cn.flightfeather.thirdapp.bean.entity.Domainitem;
-//import cn.flightfeather.thirdapp.bean.entity.Province;
-//import cn.flightfeather.thirdapp.bean.entity.Town;
-//import cn.flightfeather.thirdapp.bean.vo.AreaVo;
-//import cn.flightfeather.thirdapp.bean.vo.ProblemlistVo;
-//import cn.flightfeather.thirdapp.httpservice.ProblemListService;
-//import cn.flightfeather.thirdapp.util.CommonUtils;
-//import cn.flightfeather.thirdapp.util.Constant;
-//import cn.flightfeather.thirdapp.util.DateFormatter;
-//import cn.flightfeather.thirdapp.util.DialogUtil;
-//import cn.flightfeather.thirdapp.util.Domain;
-//import cn.flightfeather.thirdapp.util.ScreenUtils;
-//import cn.flightfeather.thirdapp.view.ScrollTextView;
-//import retrofit2.Call;
-//import retrofit2.Callback;
-//import retrofit2.Response;
-//
-///**
-// * A simple {@link Fragment} subclass.
-// */
-//public class AnalysisProblemFragment_B extends Fragment implements View.OnClickListener, AdapterView.OnItemSelectedListener {
-//
-// private CommonApplication application;
-// private Context context;
-// private ProblemListService problemListService;
-//
-// private final static String ALLDISTRICT = "鍏ㄩ儴鍖哄幙";
-// private final static String ALLTOWN = "鍏ㄩ儴琛楅亾";
-// private int TIME_TYPE;//0:蹇�熼�夋嫨/1锛氫换鎰忔椂娈�
-// private String BRIEF_TIME = "鏈湀";//鍒濆榛樿閫夋嫨鏈湀
-// private final static int MAX_CHART_COUNT = 5; //楗煎浘鏈�澶氭樉绀哄尯鍧楁暟
-// private final static String REMAIN_PROBLEM = "鍏朵綑";
-//
-// private List<ProblemlistVo> problemlists;
-// private PieChart mChart;
-// private ArrayList<PieEntry> entries = new ArrayList<>();//楗煎浘鏁版嵁
-//
-// //涓嬫媺妗嗘暟鎹�
-// private List<Province> allProvinceData = null;//鎵�鏈夌渷浠�
-// private List<Province> provinceData = new ArrayList<>();//鐪佷唤
-//
-// private List<City> allCityData = new ArrayList<>();//鎵�鏈夊煄甯�
-// private List<City> cityData = new ArrayList<>();//鍩庡競
-//
-// private List<District> allDistrictData = new ArrayList<>();//鎵�鏈夊尯鍘�
-// private List<District> districtData = new ArrayList<>();//鍖哄幙
-//
-// private List<Town> allTownData = new ArrayList<>();//鎵�鏈夎闀�
-// private List<Town> townData = new ArrayList<>();//琛楅晣
-//
-// private List<Domainitem> scenseTypeData = new ArrayList<>();//鍦烘櫙绫诲瀷
-// private List<String> dateData = new ArrayList<>();//鏃堕棿
-// //涓嬫媺妗嗘暟鎹�傞厤鍣�
-// private AllListViewAdapter<Province> provinceAdapter= null;
-// private AllListViewAdapter<City> cityAdapter= null;
-// private AllListViewAdapter<District> districtAdapter= null;
-// private AllListViewAdapter<Town> townAdapter= null;
-// private AllListViewAdapter<Domainitem> scenseAdapter= null;
-// // private AllListViewAdapter<String> dateAdapter= null;
-// //RecyclerView鏃堕棿蹇�熼�夋嫨鍒楄〃
-// private AllRecyclerViewAdapter<String> dateAdapter = null;
-// private AllRecyclerViewAdapter<PieEntry> entryAdapter = null;
-// //
-// private RecyclerView RV_quick_choose;//鏃堕棿蹇�熼�夋嫨
-// private RecyclerView rv_problem_type;//闂绫诲瀷缁熻
-// //
-// private LinearLayout LL_any_time;
-// //
-// private ImageView IV_problem;
-// private ImageView IV_scene_type;
-// //
-// private TextView TV_problem;
-// private TextView TV_area;
-// private TextView tv_Cancel;
-// private TextView tv_Ok;
-// private TextView TV_quick_choose;
-// private TextView TV_any_time;
-// private TextView TV_start_time;
-// private TextView TV_end_time;
-// private TextView TV_date_display1;
-// private ScrollTextView stv_date_display2;
-// //
-// private PieChart PC_problem;
-// //
-// private Spinner SP_scense_type;
-// // private Spinner SP_date;
-// private Spinner SP_province;
-// private Spinner SP_city;
-// private Spinner SP_district;
-// private Spinner SP_town;
-// //
-// private FloatingActionButton FAB_menu;
-// //
-// private Dialog dialog;
-//
-//
-// public AnalysisProblemFragment_B() {
-// // Required empty public constructor
-// }
-//
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-// return inflater.inflate(R.layout.fragment_anysis_problem, container, false);
-// }
-//
-// @RequiresApi(api = Build.VERSION_CODES.N)
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-//
-// application = (CommonApplication) getActivity().getApplication();
-// context = getContext();
-// problemListService = application.getRetrofit().create(ProblemListService.class);
-// problemlists = new ArrayList<>();
-//
-// initUI(view);
-// initDialog();
-// initPieChart(view);
-// initSpinnerData();
-// initSpinner(view);
-// initRecyclerView(view);
-// }
-//
-// @Override
-// public void onHiddenChanged(boolean hidden) {
-// super.onHiddenChanged(hidden);
-// }
-//
-// @Override
-// public void onDestroy() {
-// super.onDestroy();
-// dialog.dismiss();
-// }
-//
-// private void initUI(View view) {
-// IV_scene_type = (ImageView) view.findViewById(R.id.IV_scense_type);
-// FAB_menu = (FloatingActionButton) view.findViewById(R.id.FAB_menu);
-// TV_area = (TextView) view.findViewById(R.id.TV_area);
-// stv_date_display2 = (ScrollTextView) view.findViewById(R.id.stv_date_display2);
-//
-// FAB_menu.setOnClickListener(this);
-// }
-//
-// /**
-// * 鍒濆鍖栦笅鎷夋鏁版嵁锛堝寘鎷琾opupWindow锛�
-// */
-// private void initSpinnerData() {
-// ProvinceDao provinceDao = application.getDaoSession().getProvinceDao();
-// CityDao cityDao = application.getDaoSession().getCityDao();
-// DistrictDao districtDao = application.getDaoSession().getDistrictDao();
-// TownDao townDao = application.getDaoSession().getTownDao();
-//
-// DomainitemDao domainitemDao = application.getDaoSession().getDomainitemDao();
-//
-// allProvinceData = provinceDao.loadAll();
-// provinceData = provinceDao.loadAll();
-//
-// allCityData = cityDao.loadAll();
-// cityData = cityDao.loadAll();
-//
-// allDistrictData = districtDao.loadAll();
-// District emptydistrict = new District();
-// emptydistrict.setDistrictname(ALLDISTRICT);
-// districtData.add(emptydistrict);
-//
-// allTownData = townDao.loadAll();
-// Town emptytown = new Town();
-// emptytown.setTownname(ALLTOWN);
-// townData.add(emptytown);
-//
-// //鍦烘櫙绫诲瀷
-// QueryBuilder<Domainitem> queryBuilder = domainitemDao.queryBuilder()
-// .where(DomainitemDao.Properties.Dcguid.eq(Domain.DOMAINGUID_SCENSETYPE))
-// .orderAsc(DomainitemDao.Properties.Value);
-// scenseTypeData.addAll(queryBuilder.list());
-//
-// dateData.add(Constant.THIS_WEEK);
-// dateData.add(Constant.LAST_WEEK);
-// dateData.add(Constant.THIS_MONTH);
-// dateData.add(Constant.LAST_MONTH);
-// dateData.add(Constant.THIS_SEASON);
-// dateData.add(Constant.LAST_SEASON);
-// dateData.add(Constant.THIS_YEAR);
-// dateData.add(Constant.LAST_YEAR);
-// }
-//
-// private void initSpinner(View view) {
-// SP_scense_type = (Spinner) view.findViewById(R.id.SP_scense_type);
-// SP_scense_type.setOnItemSelectedListener(this);
-//// SP_date.setOnItemSelectedListener(this);
-// initAdapter();
-//
-//// dialog.dismiss();
-// SP_province.setSelection(0);
-// SP_city.setSelection(0);
-// SP_district.setSelection(0);
-// SP_town.setSelection(0);
-// SP_scense_type.setSelection(0);//浼氬悓鏃堕�氳繃onClick鏃堕棿瑙﹀彂setChartTitle(),鎵�浠ユ斁鍦ㄦ渶鍚�
-// }
-//
-// /**
-// * 闂绫诲瀷鍒嗗竷鐨勫垪琛�
-// * @param view 闂绫诲瀷鍒嗗竷fragment
-// */
-// @RequiresApi(api = Build.VERSION_CODES.N)
-// private void initRecyclerView(View view) {
-// final DecimalFormat decimalFormat = new DecimalFormat("#0.00");
-// rv_problem_type = (RecyclerView) view.findViewById(R.id.rv_problem_type);
-// entryAdapter = new AllRecyclerViewAdapter<PieEntry>(entries, R.layout.item_day_task_progress, context) {
-// @Override
-// public void bindView(MyViewHolder holder, PieEntry obj, boolean bool, int position) {
-// float total = 0;
-// for (PieEntry entry : entries) {
-// total = total + entry.getValue();
-// }
-// holder.setText(R.id.tv_item1, entries.get(position).getLabel())
-// .setText(R.id.tv_item2, entries.get(position).getValue() + "")
-// .setText(R.id.tv_item3, decimalFormat.format(entries.get(position).getValue()/ total * 100) + "%");
-// }
-// };
-//
-// LinearLayoutManager layoutManager = new LinearLayoutManager(context);
-// layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_problem_type.setLayoutManager(layoutManager);
-// rv_problem_type.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
-// rv_problem_type.setAdapter(entryAdapter);
-// }
-//
-// private void initPieChart(View view) {
-//
-// //楗煎浘鏍峰紡璁剧疆***************************************************************************************************
-// mChart = (PieChart) view.findViewById(R.id.PC_problem);
-// mChart.setUsePercentValues(true);
-// mChart.getDescription().setEnabled(false);
-// mChart.setExtraOffsets(5, 10, 5, 5);
-//// mChart.setExtraOffsets(20.f, 0.f, 20.f, 0.f);
-//
-// mChart.setDragDecelerationFrictionCoef(0.95f);
-//
-//// mChart.setCenterTextTypeface(mTfLight);
-//// mChart.setCenterText(generateCenterSpannableText());
-//
-// mChart.setDrawHoleEnabled(true);
-// mChart.setHoleColor(Color.WHITE);
-//
-// mChart.setTransparentCircleColor(Color.WHITE);
-// mChart.setTransparentCircleAlpha(110);
-//
-// mChart.setHoleRadius(39f);
-// mChart.setTransparentCircleRadius(41f);
-//
-// mChart.setDrawCenterText(true);
-//
-// mChart.setRotationAngle(0);
-// // enable rotation of the chart by touch
-// mChart.setRotationEnabled(true);
-// mChart.setHighlightPerTapEnabled(true);
-//
-// Legend l = mChart.getLegend();
-// l.setVerticalAlignment(Legend.LegendVerticalAlignment.TOP);
-// l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.LEFT);
-// l.setOrientation(Legend.LegendOrientation.VERTICAL);
-// l.setDrawInside(false);
-// l.setXEntrySpace(7f);
-// l.setYEntrySpace(0f);
-// l.setYOffset(0f);
-//
-// // entry label styling
-// mChart.setEntryLabelColor(Color.WHITE);
-//// mChart.setEntryLabelTypeface(mTfRegular);
-// mChart.setEntryLabelTextSize(12f);
-// mChart.setDrawEntryLabels(false);
-//
-// //test
-//// setData(new ArrayList<ProblemlistVo>());
-// //
-//
-// }
-//
-// private void setData(List<ProblemlistVo> problemlists) {
-// //鏁版嵁鍒濆鍖�***************************************************************************************************
-// entries.clear();
-//
-// PieDataSet dataSet = new PieDataSet(entries, "闂绫诲瀷");
-//
-// //test*****
-//// int count = 5;
-//// int mult = 100;
-//// String[] mParties = {"璺潰绉皹", "鍦伴潰灞�閮ㄦ湭纭寲", "绔欏巶鍑哄叆鍙f棤澶栧洿鎶�", "鏃犲柗娣嬭缃�", REMAIN_PROBLEM};
-//// for (int i = 0; i < count; i++) {
-//// entries.add(new PieEntry((int) (Math.random() * mult) + mult / 5, mParties[i]));
-//// }
-// //*********
-//
-// //鍒濆鍖栨暟鎹�
-// HashMap<String, Integer> problemTypeMap = new HashMap<>();
-// while (!problemlists.isEmpty()) {
-// String problemType = problemlists.get(0).getTypename();
-// if (problemType == null) {
-// problemlists.remove(0);
-// continue;
-// }
-//
-// int problemCount = 0;
-// for (int i = 0; i < problemlists.size(); i++) {
-// if (Objects.equals(problemType, problemlists.get(i).getTypename())) {
-// problemCount++;
-// problemlists.remove(i);
-// i--;
-// }
-// }
-// problemTypeMap.put(problemType, problemCount);
-// }
-// //鎸塇ashMap鐨剉alue闄嶅簭鎺掑簭
-// List<HashMap.Entry<String, Integer>> list = new ArrayList<>(problemTypeMap.entrySet());
-// Collections.sort(list, new Comparator<HashMap.Entry<String, Integer>>() {
-// @Override
-// public int compare(HashMap.Entry<String, Integer> o1, HashMap.Entry<String, Integer> o2) {
-// return o2.getValue().compareTo(o1.getValue());
-// }
-// });
-//// problemTypeMap.clear();
-//// problemTypeMap.entrySet().addAll(list);
-// //鍒濆鍖朎ntry,闄愬畾鏈�澶氭樉绀�5涓墖鍖猴紝瓒呭嚭鐨勫悎骞朵负绗�5涓墖鍖�
-// String remainProblemType = "";
-// int remainProblemCount = 0;
-// int chartcount = 0;
-// for (HashMap.Entry<String, Integer> entry : list) {
-// if (chartcount < MAX_CHART_COUNT - 1) {
-// entries.add(new PieEntry((float)entry.getValue(), entry.getKey()));
-// } else {
-// remainProblemCount = remainProblemCount + entry.getValue();
-// remainProblemType = entry.getKey();
-// }
-// chartcount++;
-// }
-// if (chartcount == MAX_CHART_COUNT) {
-// entries.add(new PieEntry((float) remainProblemCount, remainProblemType));
-// } else if (chartcount > MAX_CHART_COUNT) {
-// entries.add(new PieEntry((float) remainProblemCount, REMAIN_PROBLEM));
-// }
-//
-// // add a lot of colors
-// ArrayList<Integer> colors = new ArrayList<>();
-//
-// for (int c : ColorTemplate.JOYFUL_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.COLORFUL_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.VORDIPLOM_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.LIBERTY_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.PASTEL_COLORS)
-// colors.add(c);
-//
-// colors.add(ColorTemplate.getHoloBlue());
-//
-// dataSet.setColors(colors);
-//
-// //value line
-// dataSet.setValueLinePart1OffsetPercentage(80.f);
-// dataSet.setValueLinePart1Length(0.2f);
-// dataSet.setValueLinePart2Length(0.4f);
-// //dataSet.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
-// dataSet.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
-//
-// //
-// PieData data = new PieData(dataSet);
-// data.setValueFormatter(new PercentFormatter());
-// data.setValueTextSize(11f);
-// data.setValueTextColor(Color.BLACK);
-//// data.setValueTypeface(mTfLight);
-// if (!entries.isEmpty()) {//鏁版嵁鍏ㄤ负绌烘椂锛屼笉鏄剧ず
-// mChart.setData(data);
-// } else {
-// mChart.setData(null);
-// }
-// mChart.setNoDataText("鏆傛棤鏁版嵁");
-//
-// // undo all highlights
-// mChart.highlightValues(null);
-//
-// mChart.animateY(1400, Easing.EasingOption.EaseInOutQuad);
-// }
-//
-// /**
-// * 鍒濆鍖栦笅鎷夋閫傞厤鍣�
-// */
-// private void initAdapter() {
-// //****涓嬮潰涓鸿缃�傞厤鍣�**********************************************
-// //鐪佷唤
-// provinceAdapter = new AllListViewAdapter<Province>((ArrayList<Province>)provinceData, R.layout.item_scense_detail_list) {
-// @Override
-// public void bindView(ViewHolder holder, Province obj) {
-// holder.setText(R.id.tv_item, obj.getProvincename());
-// }
-// };
-// SP_province.setAdapter(provinceAdapter);
-// provinceAdapter.notifyDataSetChanged();
-// //鍩庡競
-// cityAdapter = new AllListViewAdapter<City>((ArrayList<City>)cityData, R.layout.item_scense_detail_list) {
-// @Override
-// public void bindView(ViewHolder holder, City obj) {
-// holder.setText(R.id.tv_item, obj.getCityname());
-// }
-// };
-// SP_city.setAdapter(cityAdapter);
-// cityAdapter.notifyDataSetChanged();
-// //鍖哄幙
-// districtAdapter = new AllListViewAdapter<District>((ArrayList<District>)districtData, R.layout.item_scense_detail_list) {
-// @Override
-// public void bindView(ViewHolder holder, District obj) {
-// holder.setText(R.id.tv_item, obj.getDistrictname());
-// }
-// };
-// SP_district.setAdapter(districtAdapter);
-// districtAdapter.notifyDataSetChanged();
-// //琛楅晣
-// townAdapter = new AllListViewAdapter<Town>((ArrayList<Town>)townData, R.layout.item_scense_detail_list) {
-// @Override
-// public void bindView(ViewHolder holder, Town obj) {
-// holder.setText(R.id.tv_item, obj.getTownname());
-// }
-// };
-//
-// SP_town.setAdapter(townAdapter);
-// //鍦烘櫙绫诲瀷
-// scenseAdapter = new AllListViewAdapter<Domainitem>((ArrayList<Domainitem>) scenseTypeData, R.layout.item_spinner_simple_text) {
-// @Override
-// public void bindView(ViewHolder holder, Domainitem obj) {
-// holder.setText(R.id.tv_item, obj.getText());
-// }
-// };
-// SP_scense_type.setAdapter(scenseAdapter);
-// scenseAdapter.notifyDataSetChanged();
-// //鏃堕棿
-// dateAdapter = new AllRecyclerViewAdapter<String>(dateData, R.layout.item_scense_detail_list, context) {
-// @Override
-// public void bindView(final MyViewHolder holder, final String obj, boolean bool, final int position) {
-// holder.setText(R.id.tv_item, obj);
-// holder.setSelected(R.id.tv_item, bool);
-// holder.setOnClickListener(R.id.tv_item, new View.OnClickListener() {
-// @Override
-// public void onClick(View v) {
-// dateAdapter.setAllFalse();
-// dateAdapter.setSelected(true, position);
-// dateAdapter.notifyDataSetChanged();
-// BRIEF_TIME = obj;
-// Log.e("瀵硅薄鍚嶇О", obj);
-// showDialog();
-// search();
-// }
-// });
-// if (Objects.equals(BRIEF_TIME, obj)) {
-// holder.setSelected(R.id.tv_item, true);
-// }
-// }
-// };
-// RV_quick_choose.setAdapter(dateAdapter);
-// dateAdapter.notifyDataSetChanged();
-// //****涓婇潰涓鸿缃�傞厤鍣�**********************************************
-// }
-//
-// /**
-// * 鍖哄煙閫夋嫨寮瑰嚭妗�
-// */
-// private void initDialog() {
-//// int mScreenWidth = getResources().getDisplayMetrics().widthPixels;
-// // 璁插竷灞�鏂囦欢杞崲鎴� view 瀵硅薄
-// dialog = new Dialog(context);
-// dialog.setContentView(R.layout.popwindow);
-// //璁剧疆dialog瀹藉害
-// Window dialogWindow = dialog.getWindow();
-// assert dialogWindow != null;
-// dialogWindow.setBackgroundDrawableResource(android.R.color.transparent);
-// final WindowManager.LayoutParams p = dialogWindow.getAttributes();
-// p.width = ScreenUtils.getScreenWidth(context);
-//// p.height = (int) (ScreenUtils.getScreenHeight(context) * 0.9);
-// /* 鑾峰彇 PopupWindow 鍔犺浇甯冨眬鏂囦欢涓殑view */
-// SP_province = (Spinner) dialog.findViewById(R.id.SP_province);
-// SP_city = (Spinner) dialog.findViewById(R.id.SP_city);
-// SP_district = (Spinner) dialog.findViewById(R.id.SP_district);
-// SP_town = (Spinner) dialog.findViewById(R.id.SP_town);
-// SP_province.setOnItemSelectedListener(this);
-// SP_city.setOnItemSelectedListener(this);
-// SP_district.setOnItemSelectedListener(this);
-// SP_town.setOnItemSelectedListener(this);
-//// SP_province.setSelection(0);
-//// SP_city.setSelection(0);
-//// SP_district.setSelection(0);
-//// SP_town.setSelection(0);
-// /*璁剧疆鏃堕棿閫夋嫨鎸夐挳*/
-// TV_quick_choose = (TextView) dialog.findViewById(R.id.TV_quick_choose);
-// TV_any_time = (TextView) dialog.findViewById(R.id.TV_any_time);
-// TV_quick_choose.setSelected(true);
-// TV_quick_choose .setOnClickListener(this);
-// TV_any_time .setOnClickListener(this);
-// /*璁剧疆蹇�熸椂闂撮�夋嫨鍒楄〃*/
-// TV_start_time = (TextView) dialog.findViewById(R.id.TV_start_time);
-// TV_end_time = (TextView) dialog.findViewById(R.id.TV_end_time);
-// TV_start_time.setText(DateFormatter.dateFormat.format(CommonUtils.getTimesMonthmorning()));
-// TV_end_time.setText(DateFormatter.dateFormat.format(CommonUtils.getTimesMonthnight()));
-// TV_start_time.setOnClickListener(this);
-// TV_end_time.setOnClickListener(this);
-// //璁剧疆鏄剧ず瀵瑰叾鏂瑰紡
-// GridLayoutManager layoutManager = new GridLayoutManager(context, 2);
-// layoutManager.setOrientation(GridLayoutManager.VERTICAL);
-// layoutManager.setAutoMeasureEnabled(true);
-// RV_quick_choose = (RecyclerView) dialog.findViewById(R.id.RV_quick_choose);
-// RV_quick_choose.setLayoutManager(layoutManager);
-// RV_quick_choose.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
-// /* 璁剧疆浠绘剰鏃堕棿閫夋嫨鍒楄〃*/
-// LL_any_time = (LinearLayout) dialog.findViewById(R.id.LL_any_time);
-// LL_any_time.setVisibility(View.GONE);
-// /*璁剧疆纭畾銆佸彇娑堟寜閽�*/
-// tv_Cancel = (TextView) dialog.findViewById(R.id.btn_cancel);
-// tv_Ok = (TextView) dialog.findViewById(R.id.btn_ok);
-// tv_Cancel.setOnClickListener(this);
-// tv_Ok.setOnClickListener(this);
-// dialog.show();
-//// dialog.hide();
-// // 鐐瑰嚮浼氳嚜鍔� PopupWindow 鍏抽棴
-//// dialog.setOutsideTouchable(false);
-// /* 璁剧疆 PopupWindow 鍑虹幇鏃剁殑鍔ㄧ敾 */
-//// dialog.setAnimationStyle(R.style.anim_menu_dialog);
-// /* 璁剧疆鑳屾櫙棰滆壊 */
-// // dialog.setBackgroundDrawable(new ColorDrawable(Color.WHITE));
-//// dialog.update();
-// /* 鍏佽 PopupWindow 鑾峰彇鐒︾偣 */
-//// this.dialog.setFocusable(false);
-// }
-//
-// /**
-// * 鏄剧ず鍜岄殣钘廝opupwindow
-// */
-// private void showDialog(){
-// // 璁剧疆鏄剧ず鐨勪綅缃�
-// if (!dialog.isShowing())
-// dialog.show();
-// else
-// dialog.dismiss();
-// }
-//
-// /**
-// * 鎸夌収鎼滅储鏉′欢鏌ヨ闂鍒嗗竷缁撴灉
-// */
-// private void search() {
-// final Dialog dialog = DialogUtil.createLoadingDialog(getActivity(), "鍔犺浇涓�...");
-// AreaVo areaVo = new AreaVo();
-// areaVo.setProvincecode(((Province)SP_province.getSelectedItem()).getProvincecode());
-// areaVo.setProvincename(((Province)SP_province.getSelectedItem()).getProvincename());
-// areaVo.setCitycode(((City)SP_city.getSelectedItem()).getCitycode());
-// areaVo.setCityname(((City)SP_city.getSelectedItem()).getCityname());
-// areaVo.setDistrictcode(((District)SP_district.getSelectedItem()).getDistrictcode());
-// areaVo.setDistrictname(((District)SP_district.getSelectedItem()).getDistrictname());
-// areaVo.setTowncode(((Town) SP_town.getSelectedItem()).getTowncode());
-// areaVo.setTownname(((Town) SP_town.getSelectedItem()).getTownname());
-// areaVo = gettime(areaVo);
-// int position = SP_scense_type.getSelectedItemPosition();
-// areaVo.setScensetypeid(scenseTypeData.get(position).getValue());
-// Call<List<ProblemlistVo>> getProblemByArea = problemListService.getByArea(areaVo);
-// getProblemByArea.enqueue(new Callback<List<ProblemlistVo>>() {
-// @Override
-// public void onResponse(Call<List<ProblemlistVo>> call, Response<List<ProblemlistVo>> response) {
-// if (response.body() != null) {
-// problemlists = response.body();
-// }
-// setData(problemlists);
-// entryAdapter.notifyDataSetChanged();//鍒锋柊鍒楄〃
-// DialogUtil.closeDialog(dialog);
-// }
-//
-// @Override
-// public void onFailure(Call<List<ProblemlistVo>> call, Throwable t) {
-// setData(problemlists);
-// DialogUtil.closeDialog(dialog);
-// }
-// });
-//
-// setChartTitle();//鍒锋柊鏍囬
-// setDateDisplay();//鍒锋柊鏃堕棿
-// }
-//
-// /**
-// * 璁惧畾楗煎浘鏍囬鍙婂浘鏍�
-// */
-// private void setChartTitle() {
-// String title = ((Province)SP_province.getSelectedItem()).getProvincename();
-// if (!Objects.equals(title, ((City) SP_city.getSelectedItem()).getCityname()))
-// title = title + ((City) SP_city.getSelectedItem()).getCityname();
-// if (!Objects.equals(((District)SP_district.getSelectedItem()).getDistrictname(), ALLDISTRICT))
-// title = title + ((District)SP_district.getSelectedItem()).getDistrictname();
-// if (!Objects.equals(((Town)SP_town.getSelectedItem()).getTownname(), ALLTOWN))
-// title = title + ((Town)SP_town.getSelectedItem()).getTownname();
-// title = title + "闂绫诲瀷鍒嗗竷鎯呭喌";
-// TV_area.setText(title);
-// IV_scene_type.setImageResource(CommonUtils.getIconBySceneType(((Domainitem)SP_scense_type.getSelectedItem()).getValue()));
-// }
-//
-// /**
-// * 鑾峰彇鎵�閫夌殑鏃堕棿
-// * @param areaVo RequestBody锛屾煡璇㈤棶棰樺垪琛�
-// * @return
-// */
-// private AreaVo gettime(AreaVo areaVo){
-// if (TIME_TYPE == 0) {//蹇�熼�夋嫨
-// Date date1;
-// Date date2;
-// switch (BRIEF_TIME) {
-// case Constant.THIS_WEEK:
-// date1 = CommonUtils.getTimesWeekmorning();
-// date2 = CommonUtils.getTimesWeeknight();
-// break;
-// case Constant.LAST_WEEK:
-// date1 = CommonUtils.getTimesLastWeekmorning();
-// date2 = CommonUtils.getTimesLastWeeknight();
-// break;
-// case Constant.THIS_MONTH:
-// date1 = CommonUtils.getTimesMonthmorning();
-// date2 = CommonUtils.getTimesMonthnight();
-// break;
-// case Constant.LAST_MONTH:
-// date1 = CommonUtils.getTimesLastMonthmorning();
-// date2 = CommonUtils.getTimesLastMonthnight();
-// break;
-// case Constant.THIS_SEASON:
-// date1 = CommonUtils.getTimesSeasonmorning();
-// date2 = CommonUtils.getTimesSeasonnight();
-// break;
-// case Constant.LAST_SEASON:
-// date1 = CommonUtils.getTimesLastSeasonmorning();
-// date2 = CommonUtils.getTimesLastSeasonnight();
-// break;
-// case Constant.THIS_YEAR:
-// date1 = CommonUtils.getCurrentYearStartTime();
-// date2 = CommonUtils.getCurrentYearEndTime();
-// break;
-// case Constant.LAST_YEAR:
-// date1 = CommonUtils.getLastYearStartTime();
-// date2 = CommonUtils.getLastYearEndTime();
-// break;
-// default:
-// date1 = CommonUtils.getTimesMonthmorning();
-// date2 = CommonUtils.getTimesMonthnight();
-// break;
-// }
-// areaVo.setStarttime(DateFormatter.dateTimeFormat2.format(date1));
-// areaVo.setEndtime(DateFormatter.dateTimeFormat2.format(date2));
-// }
-// else if (TIME_TYPE == 1){//浠绘剰鏃舵
-// areaVo.setStarttime(TV_start_time.getText().toString());
-// areaVo.setEndtime(TV_end_time.getText().toString());
-// return areaVo;
-// }
-// return areaVo;
-// }
-//
-// /**
-// * 璁剧疆鎵�閫夋椂闂寸殑鏄剧ず
-// */
-// private void setDateDisplay() {
-// if (TIME_TYPE == 0) {//蹇�熼�夋嫨
-//// TV_date_display1.setTitle(BRIEF_TIME);
-// stv_date_display2.setText(BRIEF_TIME);
-// } else if (TIME_TYPE == 1) {//浠绘剰鏃舵
-//// TV_date_display1.setTitle(TV_start_time.getTitle().toString());
-// stv_date_display2.setText(TV_start_time.getText().toString() + " ~ " + TV_end_time.getText().toString());
-// }
-// }
-//
-// @RequiresApi(api = Build.VERSION_CODES.N)
-// @Override
-// public void onClick(View v) {
-// int id = v.getId();
-// if (id == R.id.FAB_menu) {
-// showDialog();
-//// FAB_menu.setImageResource(dialog.isShowing()? R.drawable.icon_close_white : R.drawable.icon_open_white);
-// } else if (id == R.id.btn_cancel) {
-// showDialog();
-// } else if (id == R.id.btn_ok) {
-// search();
-// showDialog();
-// } else if (id == R.id.TV_quick_choose) {
-// TV_quick_choose.setSelected(true);
-// TV_any_time.setSelected(false);
-// TV_quick_choose.setTextColor(Color.WHITE);
-// TV_any_time.setTextColor(Color.BLACK);
-// RV_quick_choose.setVisibility(View.VISIBLE);
-// LL_any_time.setVisibility(View.GONE);
-// TIME_TYPE = 0;
-// } else if (id == R.id.TV_any_time) {
-// TV_any_time.setSelected(true);
-// TV_quick_choose.setSelected(false);
-// TV_any_time.setTextColor(Color.WHITE);
-// TV_quick_choose.setTextColor(Color.BLACK);
-// LL_any_time.setVisibility(View.VISIBLE);
-// RV_quick_choose.setVisibility(View.GONE);
-// TIME_TYPE = 1;
-// //寮�濮嬫椂闂�
-// } else if (id == R.id.TV_start_time) {
-// dialog.hide();
-// Calendar calendar1 = Calendar.getInstance();
-// new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {
-//
-// @Override
-// public void onDateSet(DatePicker datePicker, int year, int month, int day) {
-// String result = "";
-// result += year + "." + (month + 1) + "." + day + ".";
-// Toast.makeText(getContext(), result, Toast.LENGTH_SHORT).show();
-// dialog.show();
-// TV_start_time.setText(result);
-// }
-// }
-// , calendar1.get(Calendar.YEAR)
-// , calendar1.get(Calendar.MONTH)
-// , calendar1.get(Calendar.DAY_OF_MONTH)).show();
-// //缁撴潫鏃堕棿
-// } else if (id == R.id.TV_end_time) {
-// dialog.hide();
-// Calendar calendar2 = Calendar.getInstance();
-// new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {
-//
-// @Override
-// public void onDateSet(DatePicker datePicker, int year, int month, int day) {
-// String result = "";
-// result += year + "." + (month + 1) + "." + day + ".";
-// Toast.makeText(getActivity(), result, Toast.LENGTH_SHORT).show();
-// dialog.show();
-// TV_end_time.setText(result);
-// }
-// }
-// , calendar2.get(Calendar.YEAR)
-// , calendar2.get(Calendar.MONTH)
-// , calendar2.get(Calendar.DAY_OF_MONTH)).show();
-// }
-// }
-//
-// @Override
-// public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-// switch (parent.getId()) {
-// case R.id.SP_province:
-// cityData.clear();
-// for (int y = 0; y < allCityData.size(); y++){
-// if(Objects.equals(allCityData.get(y).getPronvinceid(), ((Province) SP_province.getSelectedItem()).getProvinceid()))
-// cityData.add(allCityData.get(y));
-// }
-// cityAdapter.notifyDataSetChanged();
-// break;
-// case R.id.SP_city:
-// districtData.clear();
-// District emptydistrict = new District();
-// emptydistrict.setDistrictname(ALLDISTRICT);
-// districtData.add(emptydistrict);
-// for (int y = 0; y < allDistrictData.size(); y++){
-// if(Objects.equals(allDistrictData.get(y).getCityid(), ((City) SP_city.getSelectedItem()).getCityId()))
-// districtData.add(allDistrictData.get(y));
-// }
-// districtAdapter.notifyDataSetChanged();
-// break;
-// case R.id.SP_district:
-// townData.clear();
-// Town emptytown = new Town();
-// emptytown.setTownname(ALLTOWN);
-// townData.add(emptytown);
-// for (int y = 0; y < allTownData.size(); y++){
-// if(Objects.equals(allTownData.get(y).getDistrictid(), ((District) SP_district.getSelectedItem()).getDistrictid()))
-// townData.add(allTownData.get(y));
-// }
-// townAdapter.notifyDataSetChanged();
-// break;
-// case R.id.SP_town:
-//// setChartTitle();
-// break;
-// case R.id.SP_scense_type:
-// search();
-//// setDateDisplay();
-// break;
-// }
-// }
-//
-// @Override
-// public void onNothingSelected(AdapterView<?> parent) {
-//
-// }
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity_B.java
deleted file mode 100644
index 7079fae..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity_B.java
+++ /dev/null
@@ -1,134 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis;
-//
-//import android.content.Intent;
-//import android.os.Bundle;
-//import android.support.design.widget.TabLayout;
-//import android.support.v4.app.Fragment;
-//import android.support.v4.app.FragmentManager;
-//import android.support.v4.app.FragmentPagerAdapter;
-//import android.support.v4.content.ContextCompat;
-//import android.support.v4.view.ViewCompat;
-//import android.support.v4.view.ViewPager;
-//import android.support.v7.app.AppCompatActivity;
-//import android.support.v7.widget.Toolbar;
-//import android.view.MenuItem;
-//import android.widget.TextView;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//import java.util.Objects;
-//
-//import butterknife.BindView;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.bean.vo.TaskVo;
-//
-///**
-// * 2018.11.09
-// * @author riku
-// * 椤跺眰浠诲姟璇︾粏淇℃伅tab鍒囨崲椤甸潰
-// */
-//public class AnalysisTabActivity_B extends AppCompatActivity {
-//
-// @BindView(R.id.tabLayout)
-// TabLayout tabLayout;//鏍囬tab
-//
-// @BindView(R.id.viewPager)
-// ViewPager viewPager;//鍐呭椤甸潰
-//
-// @BindView(R.id.toolbar)
-// Toolbar toolbar;//宸ュ叿鏍�
-//
-// private List<String> tabIndicators;//tab鏍囬
-// private List<Fragment> tabFragments;//鍐呭
-// private ContentPagerAdapter contentAdapter;//viewPager鍐呭椤甸潰閫傞厤鍣�
-//
-// public final static String ARG_PARAM1 = "taskProgressVo";
-// private TaskVo taskProgressVo;//闇�瑕佷紶鍏ョ殑椤跺眰浠诲姟瀵硅薄
-//
-// private String activityTitle = "浠诲姟鍒嗘瀽";
-//
-// @Override
-// protected void onCreate(Bundle savedInstanceState) {
-// setContentView(R.layout.activity_analysis_tab);
-// super.onCreate(savedInstanceState);
-// Intent intent = getIntent();
-// taskProgressVo = (TaskVo) intent.getSerializableExtra(ARG_PARAM1);
-// initToolbar();
-// initTab();
-// initViewPager();
-// }
-//
-// @Override
-// public boolean onOptionsItemSelected(MenuItem item) {
-// switch (item.getItemId()) {
-// case android.R.id.home:
-// finish();
-// break;
-// }
-// return super.onOptionsItemSelected(item);
-// }
-//
-// //<editor-fold desc="鍒濆鍖杢oolbar">
-// @BindView(R.id.toolbar_secondTitle)
-// TextView secondTitle;
-//
-// private void initToolbar() {
-// setSupportActionBar(toolbar);
-// Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
-// getSupportActionBar().setDisplayShowTitleEnabled(false);
-// secondTitle.setText(activityTitle);
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鍒濆鍖杢ab鏍�">
-// private void initTab(){
-// tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
-// tabLayout.setTabTextColors(ContextCompat.getColor(this, R.color.gray_btn_bg_color), ContextCompat.getColor(this, R.color.white));
-// tabLayout.setSelectedTabIndicatorColor(ContextCompat.getColor(this, R.color.white));
-// ViewCompat.setElevation(tabLayout, 10);
-// tabLayout.setupWithViewPager(viewPager);//灏唗ab鍜寁iewPager缁戝畾
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鍒濆鍖栧唴瀹圭晫闈iewpager">
-// private void initViewPager(){
-// tabIndicators = new ArrayList<>();
-// tabIndicators.add("璇︾粏杩涘害");
-// tabIndicators.add("闂鍒嗗竷");
-// tabIndicators.add("鎺掑悕");
-//
-// tabFragments = new ArrayList<>();
-// tabFragments.add(ProgressDetailFragment.newInstance(taskProgressVo));
-// tabFragments.add(new AnysisProblemFragment());
-//// tabFragments.add(new AnysisRankFragment());
-//
-// contentAdapter = new ContentPagerAdapter(getSupportFragmentManager());
-// viewPager.setAdapter(contentAdapter);
-// }
-// //</editor-fold>
-//
-// /**
-// * viewPager閫傞厤鍣�
-// */
-// class ContentPagerAdapter extends FragmentPagerAdapter {
-//
-// public ContentPagerAdapter(FragmentManager fm) {
-// super(fm);
-// }
-//
-// @Override
-// public Fragment getItem(int position) {
-// return tabFragments.get(position);
-// }
-//
-// @Override
-// public int getCount() {
-// return tabIndicators.size();
-// }
-//
-// @Override
-// public CharSequence getPageTitle(int position) {
-// return tabIndicators.get(position);
-// }
-// }
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment_B.java
deleted file mode 100644
index 9f3ea47..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment_B.java
+++ /dev/null
@@ -1,138 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis;
-//
-//
-//import android.content.Context;
-//import android.os.Bundle;
-//import android.support.annotation.NonNull;
-//import android.support.annotation.Nullable;
-//import android.support.design.widget.NavigationView;
-//import android.support.v4.app.Fragment;
-//import android.support.v4.app.FragmentManager;
-//import android.support.v4.widget.DrawerLayout;
-//import android.view.Gravity;
-//import android.view.LayoutInflater;
-//import android.view.MenuItem;
-//import android.view.View;
-//import android.view.ViewGroup;
-//import android.widget.ImageView;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import cn.flightfeather.thirdapp.CommonApplication;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.httpservice.TaskService;
-//
-///**
-// * 鏁版嵁鍒嗘瀽妯″潡
-// */
-//public class AnysisFragment_B extends Fragment implements View.OnClickListener {
-//
-// private CommonApplication application;
-// private TaskService taskService;
-// private Context context;
-// private Boolean visible = true;
-//
-// private DrawerLayout drawerLayout;
-// private NavigationView NV_analysis;
-//
-// private List<Fragment> fragmentList = new ArrayList<>();
-// private FragmentManager fragmentManager;
-// private Fragment fragmentCurrent;
-//
-// private ImageView IV_menu;
-//
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-//
-// return inflater.inflate(R.layout.fragment_anysis, container, false);
-// }
-//
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-//
-// application = (CommonApplication) getActivity().getApplication();
-// taskService = application.getRetrofit().create(TaskService.class);
-// context = getContext();
-// fragmentManager = getActivity().getSupportFragmentManager();
-//
-// initActionbar(view);
-// initNavigationView(view);
-// initFragment();
-// }
-//
-// private void initNavigationView(View view){
-// drawerLayout = (DrawerLayout) view.findViewById(R.id.DL_analysis);
-// NV_analysis = (NavigationView) view.findViewById(R.id.NV_analysis);
-//
-//// ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(getActivity(), drawerLayout, R.string.action_settings, R.string.action_settings);
-//// drawerLayout.setDrawerListener(toggle);
-//// toggle.syncState();
-//
-//// NV_analysis.setItemIconTintList(null);//璁剧疆鍥炬爣棰滆壊涓烘湰韬鑹�
-//
-// NV_analysis.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
-// @Override
-// public boolean onNavigationItemSelected(@NonNull MenuItem item) {
-// int order = item.getOrder();
-// try {
-// switchSelectedFragment(fragmentList.get(order));
-// IV_menu.refreshDrawableState();
-// }catch (Exception e){
-// e.printStackTrace();
-// }
-// drawerLayout.closeDrawer(Gravity.END);
-// return true;
-// }
-// });
-// }
-//
-// private void initFragment(){
-// fragmentList.add(new AnysisProgressFragment());
-// fragmentList.add(new AnysisProblemFragment());
-//// fragmentList.add(new AnysisRankFragment());
-// fragmentManager.beginTransaction().add(R.id.FL_analysis, fragmentList.get(0)).commit();
-// fragmentCurrent = fragmentList.get(0);
-// }
-//
-// private void switchSelectedFragment(Fragment fragment){
-// if (fragment.isAdded()){
-// fragmentManager.beginTransaction().hide(fragmentCurrent).show(fragment).commit();
-// }else {
-// fragmentManager.beginTransaction().add(R.id.FL_analysis, fragment).hide(fragmentCurrent).show(fragment).commit();
-// }
-//
-// fragmentCurrent = fragment;
-// }
-//
-// private void initActionbar(View view) {
-//// view.findViewById(R.id.img_left).setVisibility(View.GONE);
-//// view.findViewById(R.id.spinner_topclass_task).setVisibility(View.GONE);
-//// view.findViewById(R.id.img_right).setOnClickListener(this);
-//// ((TextView) view.findViewById(R.id.actionbar_title)).setTitle("鏁版嵁鍒嗘瀽");
-// IV_menu = (ImageView) view.findViewById(R.id.IV_menu);
-// IV_menu.setOnClickListener(this);
-// }
-//
-//
-// @Override
-// public void onHiddenChanged(boolean hidden) {
-// super.onHiddenChanged(hidden);
-//// taskProgressAdapter.notifyDataSetChanged();
-// }
-//
-// @Override
-// public void onClick(View v) {
-// switch (v.getId()) {
-// case R.id.IV_menu:
-// if (visible)drawerLayout.openDrawer(Gravity.END);
-// else drawerLayout.closeDrawer(Gravity.END);
-// visible = !visible;
-// break;
-//
-// }
-// }
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment_B.java
deleted file mode 100644
index f606732..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment_B.java
+++ /dev/null
@@ -1,308 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis;
-//
-//
-//import android.content.Context;
-//import android.graphics.Color;
-//import android.os.Bundle;
-//import android.support.annotation.Nullable;
-//import android.support.v4.app.Fragment;
-//import android.support.v7.widget.DividerItemDecoration;
-//import android.support.v7.widget.LinearLayoutManager;
-//import android.support.v7.widget.RecyclerView;
-//import android.view.LayoutInflater;
-//import android.view.View;
-//import android.view.ViewGroup;
-//import android.widget.AdapterView;
-//import android.widget.Spinner;
-//import android.widget.TextView;
-//import android.widget.Toast;
-//
-//import com.ping.greendao.gen.DomainitemDao;
-//
-//import org.greenrobot.greendao.query.QueryBuilder;
-//
-//import java.util.ArrayList;
-//import java.util.HashMap;
-//import java.util.List;
-//
-//import cn.flightfeather.thirdapp.CommonApplication;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.adapter.AllListViewAdapter;
-//import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter;
-//import cn.flightfeather.thirdapp.bean.entity.Domainitem;
-//import cn.flightfeather.thirdapp.bean.entity.Evaluation;
-//import cn.flightfeather.thirdapp.bean.vo.TaskVo;
-//import cn.flightfeather.thirdapp.httpservice.EvaluationService;
-//import cn.flightfeather.thirdapp.httpservice.TaskService;
-//import cn.flightfeather.thirdapp.util.CommonUtils;
-//import cn.flightfeather.thirdapp.util.Constant;
-//import cn.flightfeather.thirdapp.util.Domain;
-//import retrofit2.Call;
-//import retrofit2.Callback;
-//import retrofit2.Response;
-//
-///**
-// * A simple {@link Fragment} subclass.
-// */
-//public class AnysisRankFragment_B extends Fragment implements View.OnClickListener, AdapterView.OnItemSelectedListener {
-//
-// private CommonApplication application;
-// private Context context;
-// private TaskService taskService;
-// private EvaluationService evaluationService;
-//
-// private List<TaskVo> taskVoList = new ArrayList<>();//鎵�鏈夐《灞備换鍔�
-// private List<Domainitem> sceneList = new ArrayList<>();//鍦烘櫙
-// private List<Evaluation> sceneEvaluationList = new ArrayList<>();//鍦烘櫙璇勫垎鎺掑悕
-// private List<Evaluation> townEvaluationList = new ArrayList<>();//琛楅亾璇勫垎鎺掑悕
-// //Spinner
-// private Spinner sp_top_task;
-// private Spinner sp_scene;
-// private AllListViewAdapter<TaskVo> topTaskAdapter = null;
-// private AllListViewAdapter<Domainitem> sceneAdapter = null;
-// //TextView
-// private TextView tv_no;
-// private TextView tv_scene_rank;
-// private TextView tv_town_rank;
-// //RecyclerView
-// private RecyclerView rv_rank;
-// private HashMap<Integer, AllRecyclerViewAdapter<Evaluation>> rankAdapterMap = new HashMap<>();
-//
-// public AnysisRankFragment_B() {
-// // Required empty public constructor
-// }
-//
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-// return inflater.inflate(R.layout.fragment_anysis_rank, container, false);
-// }
-//
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-//
-// application = (CommonApplication) getActivity().getApplication();
-// context = getContext();
-// taskService = application.getRetrofit().create(TaskService.class);
-// evaluationService = application.getRetrofit().create(EvaluationService.class);
-//
-// initUI(view);
-// initSpinnerData();
-// initSpinner(view);
-// initRecyclerView(view);
-// }
-//
-// @Override
-// public void onHiddenChanged(boolean hidden) {
-// super.onHiddenChanged(hidden);
-// }
-//
-// @Override
-// public void onDestroy() {
-// super.onDestroy();
-// }
-//
-// private void initUI(View view) {
-// tv_no = (TextView) view.findViewById(R.id.tv_no);
-// tv_scene_rank = (TextView) view.findViewById(R.id.tv_scene_rank);
-// tv_town_rank = (TextView) view.findViewById(R.id.tv_town_rank);
-//
-// tv_scene_rank.setOnClickListener(this);
-// tv_town_rank.setOnClickListener(this);
-//
-// tv_scene_rank.setSelected(true);
-// }
-//
-// /**
-// * 涓嬫媺妗嗘暟鎹�
-// */
-// private void initSpinnerData() {
-// //椤跺眰浠诲姟
-// Call<List<TaskVo>> getTopClassTaskList = taskService.getTaskProgress("0");
-// getTopClassTaskList.enqueue(new Callback<List<TaskVo>>() {
-// @Override
-// public void onResponse(Call<List<TaskVo>> call, Response<List<TaskVo>> response) {
-// if (response.body() != null) {
-// taskVoList.addAll(response.body());
-// topTaskAdapter.notifyDataSetChanged();
-//// sp_top_task.setSelection(0);
-// }
-// }
-//
-// @Override
-// public void onFailure(Call<List<TaskVo>> call, Throwable t) {
-//
-// }
-// });
-// //鍦烘櫙
-// DomainitemDao domainitemDao = application.getDaoSession().getDomainitemDao();
-// QueryBuilder<Domainitem> queryBuilder = domainitemDao.queryBuilder()
-// .where(DomainitemDao.Properties.Dcguid.eq(Domain.DOMAINGUID_SCENSETYPE))
-// .orderAsc(DomainitemDao.Properties.Value);
-// sceneList = new ArrayList<>();
-// sceneList.addAll(queryBuilder.list());
-// }
-//
-// /**
-// * 涓嬫媺妗嗘暟鎹粦瀹�
-// * @param view
-// */
-// private void initSpinner(View view) {
-// sp_top_task = (Spinner) view.findViewById(R.id.sp_top_task);
-// sp_scene = (Spinner) view.findViewById(R.id.sp_scene);
-//
-// initAdapter();
-//
-// sp_top_task.setOnItemSelectedListener(this);
-// sp_scene.setOnItemSelectedListener(this);
-//// sp_top_task.setSelection(0);
-//// sp_scene.setSelection(0);
-// }
-//
-// /**
-// * 涓嬫媺妗嗘暟鎹�傞厤鍣�
-// */
-// private void initAdapter() {
-// topTaskAdapter = new AllListViewAdapter<TaskVo>((ArrayList<TaskVo>) taskVoList, R.layout.item_spinner_simple_text) {
-// @Override
-// public void bindView(ViewHolder holder, TaskVo obj) {
-// holder.setText(R.id.tv_item, obj.getName());
-// }
-// };
-// sp_top_task.setAdapter(topTaskAdapter);
-// topTaskAdapter.notifyDataSetChanged();
-//
-// sceneAdapter = new AllListViewAdapter<Domainitem>((ArrayList<Domainitem>) sceneList, R.layout.item_spinner_simple_text) {
-// @Override
-// public void bindView(ViewHolder holder, Domainitem obj) {
-// holder.setText(R.id.tv_item, obj.getText());
-// }
-// };
-// sp_scene.setAdapter(sceneAdapter);
-// sceneAdapter.notifyDataSetChanged();
-// }
-//
-// /**
-// * 鎺掑悕鍒楄〃
-// * @param view
-// */
-// private void initRecyclerView(View view) {
-// rv_rank = (RecyclerView) view.findViewById(R.id.rv_rank);
-// final String scenetypeid = ((Domainitem) sp_scene.getSelectedItem()).getValue();
-// AllRecyclerViewAdapter<Evaluation> adapter = new AllRecyclerViewAdapter<Evaluation>(sceneEvaluationList, R.layout.item_scene_rank, context) {
-// @Override
-// public void bindView(MyViewHolder holder, Evaluation obj, boolean bool, int position) {
-// holder.setText(R.id.tv_no, String.valueOf(position + 1))
-// .setImageResource(R.id.iv_scene_type, CommonUtils.getIconBySceneType(scenetypeid))
-// .setText(R.id.tv_scene_name, obj.getScensename())
-// .setText(R.id.tv_district, obj.getTownname())
-// .setText(R.id.tv_standard, obj.getResultstandardbef());
-// switch (obj.getResultstandardbef()) {
-// case Constant.STANDARD_1:
-// holder.setText(R.id.tv_suggestion, Constant.SUGGESTION_1)
-// .setTextColor(R.id.tv_suggestion, Color.GREEN);
-// break;
-// case Constant.STANDARD_2:
-// holder.setText(R.id.tv_suggestion, Constant.SUGGESTION_2)
-// .setTextColor(R.id.tv_suggestion, Color.YELLOW);
-// break;
-// case Constant.STANDARD_3:
-// holder.setText(R.id.tv_suggestion, Constant.SUGGESTION_3)
-// .setTextColor(R.id.tv_suggestion, Color.RED);
-// break;
-// }
-// }
-// };
-// rankAdapterMap.put(R.id.tv_scene_rank, adapter);
-// LinearLayoutManager layoutManager = new LinearLayoutManager(context);
-// layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_rank.setLayoutManager(layoutManager);
-// rv_rank.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
-// rv_rank.setAdapter(rankAdapterMap.get(R.id.tv_scene_rank));
-// }
-//
-// /**
-// * 鑱旂綉鏌ヨ
-// */
-// private void search() {
-// try {
-// String tguid = ((TaskVo) sp_top_task.getSelectedItem()).getTguid();
-// String scenetypeid = ((Domainitem) sp_scene.getSelectedItem()).getValue();
-// Call<List<Evaluation>> getRank0fScene = evaluationService.getRank0fScene(tguid, scenetypeid, null);
-// getRank0fScene.enqueue(new Callback<List<Evaluation>>() {
-// @Override
-// public void onResponse(Call<List<Evaluation>> call, Response<List<Evaluation>> response) {
-// if (response.body() != null) {
-// sceneEvaluationList.addAll(response.body());
-// rankAdapterMap.get(R.id.tv_scene_rank).notifyDataSetChanged();
-// } else if (response.body() == null) {
-// Toast.makeText(context, "鏃犳暟鎹�", Toast.LENGTH_SHORT).show();
-// }
-// }
-//
-// @Override
-// public void onFailure(Call<List<Evaluation>> call, Throwable t) {
-//
-// }
-// });
-//
-// Call<List<Evaluation>> getRankofTown = evaluationService.getRankofTown(tguid, scenetypeid);
-// getRankofTown.enqueue(new Callback<List<Evaluation>>() {
-// @Override
-// public void onResponse(Call<List<Evaluation>> call, Response<List<Evaluation>> response) {
-// if (response.body() != null) {
-// townEvaluationList.addAll(response.body());
-// } else if (response.body() == null) {
-// Toast.makeText(context, "鏃犳暟鎹�", Toast.LENGTH_SHORT).show();
-// }
-// }
-//
-// @Override
-// public void onFailure(Call<List<Evaluation>> call, Throwable t) {
-//
-// }
-// });
-// } catch (NullPointerException e) {
-// e.printStackTrace();
-// }
-// }
-//
-// @Override
-// public void onClick(View v) {
-// switch (v.getId()) {
-// case R.id.tv_town_rank:
-// tv_town_rank.setSelected(true);
-// tv_scene_rank.setSelected(false);
-// tv_town_rank.setTextColor(Color.WHITE);
-// tv_scene_rank.setTextColor(Color.BLACK);
-// rv_rank.setAdapter(rankAdapterMap.get(R.id.tv_town_rank));
-// break;
-// case R.id.tv_scene_rank:
-// tv_scene_rank.setSelected(true);
-// tv_town_rank.setSelected(false);
-// tv_scene_rank.setTextColor(Color.WHITE);
-// tv_town_rank.setTextColor(Color.BLACK);
-// rv_rank.setAdapter(rankAdapterMap.get(R.id.tv_scene_rank));
-// break;
-// }
-// }
-//
-// @Override
-// public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-// switch (parent.getId()) {
-// case R.id.sp_top_task:
-// search();
-// break;
-// case R.id.sp_scene:
-// search();
-// break;
-// }
-// }
-//
-// @Override
-// public void onNothingSelected(AdapterView<?> parent) {
-//
-// }
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/BlankFragment.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/BlankFragment.java
deleted file mode 100644
index b6a6a2c..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/BlankFragment.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package cn.flightfeather.thirdappmodule.dataanalysis;
-
-import android.content.Context;
-import android.net.Uri;
-import android.os.Bundle;
-import android.app.Fragment;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import cn.flightfeather.thirdappmodule.R;
-
-/**
- * A simple {@link Fragment} subclass.
- * Activities that contain this fragment must implement the
- * {@link BlankFragment.OnFragmentInteractionListener} interface
- * to handle interaction events.
- * Use the {@link BlankFragment#newInstance} factory method to
- * create an instance of this fragment.
- */
-public class BlankFragment extends Fragment {
- // TODO: Rename parameter arguments, choose names that match
- // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
- private static final String ARG_PARAM1 = "param1";
- private static final String ARG_PARAM2 = "param2";
-
- // TODO: Rename and change types of parameters
- private String mParam1;
- private String mParam2;
-
- private OnFragmentInteractionListener mListener;
-
- public BlankFragment() {
- // Required empty public constructor
- }
-
- /**
- * Use this factory method to create a new instance of
- * this fragment using the provided parameters.
- *
- * @param param1 Parameter 1.
- * @param param2 Parameter 2.
- * @return A new instance of fragment BlankFragment.
- */
- // TODO: Rename and change types and number of parameters
- public static BlankFragment newInstance(String param1, String param2) {
- BlankFragment fragment = new BlankFragment();
- Bundle args = new Bundle();
- args.putString(ARG_PARAM1, param1);
- args.putString(ARG_PARAM2, param2);
- fragment.setArguments(args);
- return fragment;
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- if (getArguments() != null) {
- mParam1 = getArguments().getString(ARG_PARAM1);
- mParam2 = getArguments().getString(ARG_PARAM2);
- }
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- TextView textView = new TextView(getActivity());
- textView.setText(R.string.hello_blank_fragment);
- return textView;
- }
-
- // TODO: Rename method, update argument and hook method into UI event
- public void onButtonPressed(Uri uri) {
- if (mListener != null) {
- mListener.onFragmentInteraction(uri);
- }
- }
-
- @Override
- public void onAttach(Context context) {
- super.onAttach(context);
- if (context instanceof OnFragmentInteractionListener) {
- mListener = (OnFragmentInteractionListener) context;
- } else {
- throw new RuntimeException(context.toString()
- + " must implement OnFragmentInteractionListener");
- }
- }
-
- @Override
- public void onDetach() {
- super.onDetach();
- mListener = null;
- }
-
- /**
- * This interface must be implemented by activities that contain this
- * fragment to allow an interaction in this fragment to be communicated
- * to the activity and potentially other fragments contained in that
- * activity.
- * <p>
- * See the Android Training lesson <a href=
- * "http://developer.android.com/training/basics/fragments/communicating.html"
- * >Communicating with Other Fragments</a> for more information.
- */
- public interface OnFragmentInteractionListener {
- // TODO: Update argument type and name
- void onFragmentInteraction(Uri uri);
- }
-}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment_B.java
deleted file mode 100644
index f9759a6..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment_B.java
+++ /dev/null
@@ -1,345 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis;
-//
-//
-//import android.app.Fragment;
-//import android.content.Context;
-//import android.graphics.Color;
-//import android.icu.text.DecimalFormat;
-//import android.os.Build;
-//import android.os.Bundle;
-//import android.support.annotation.Nullable;
-//import android.support.annotation.RequiresApi;
-//import android.support.v7.widget.DividerItemDecoration;
-//import android.support.v7.widget.LinearLayoutManager;
-//import android.support.v7.widget.RecyclerView;
-//import android.view.LayoutInflater;
-//import android.view.View;
-//import android.view.ViewGroup;
-//
-//import com.github.mikephil.charting.animation.Easing;
-//import com.github.mikephil.charting.charts.PieChart;
-//import com.github.mikephil.charting.components.Legend;
-//import com.github.mikephil.charting.data.PieData;
-//import com.github.mikephil.charting.data.PieDataSet;
-//import com.github.mikephil.charting.data.PieEntry;
-//import com.github.mikephil.charting.formatter.PercentFormatter;
-//import com.github.mikephil.charting.utils.ColorTemplate;
-//
-//import java.util.ArrayList;
-//import java.util.Collections;
-//import java.util.Comparator;
-//import java.util.HashMap;
-//import java.util.List;
-//import java.util.Objects;
-//
-//import butterknife.BindView;
-//import butterknife.ButterKnife;
-//import butterknife.Unbinder;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter;
-//import cn.flightfeather.thirdapp.bean.vo.ProblemlistVo;
-//import cn.flightfeather.thirdapp.bean.vo.TaskVo;
-//
-///**
-// * 2018.11.14
-// * @author riku
-// * 椤跺眰浠诲姟鐨勯棶棰樼被鍨嬬粺璁�
-// */
-//public class ProblemDetailFragment_B extends Fragment {
-//
-// private Context context;
-//
-// private static final String ARG_PARAM1 = "taskProgressVo";//鍙傛暟鏍囩
-//
-// private TaskVo taskProgressVo;//闇�瑕乤ctivity浼犲叆涓�涓叿浣撶殑椤跺眰浠诲姟瀵硅薄锛岀敤浜庢樉绀哄叾璇︾粏杩涘害淇℃伅
-//
-// private Unbinder unbinder;
-//
-//
-// public ProblemDetailFragment_B() {
-// // Required empty public constructor
-// }
-//
-// public static ProblemDetailFragment_B newInstance(TaskVo taskProgressVo) {
-// ProblemDetailFragment_B fragment = new ProblemDetailFragment_B();
-// Bundle args = new Bundle();
-// args.putSerializable(ARG_PARAM1, taskProgressVo);
-// fragment.setArguments(args);
-// return fragment;
-// }
-//
-// @Override
-// public void onCreate(Bundle savedInstanceState) {
-// super.onCreate(savedInstanceState);
-// if (getArguments() != null) {
-// taskProgressVo = (TaskVo) getArguments().getSerializable(ARG_PARAM1);
-// }
-// }
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-// View view = inflater.inflate(R.layout.fragment_analysis_problem_1, container, false);
-// unbinder = ButterKnife.bind(this, view);
-// return view;
-// }
-//
-//
-// @RequiresApi(api = Build.VERSION_CODES.N)
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-// context = getActivity();
-// initPieChart(view);
-// initRecyclerView(view);
-// }
-//
-// @Override
-// public void onDestroyView() {
-// super.onDestroyView();
-// unbinder.unbind();
-// }
-//
-// //<editor-fold desc="鍒濆鍖栭ゼ鍥句互鍙婂搴旂殑鍒楄〃">
-// private List<ProblemlistVo> problemlists;//闂鍒楄〃
-// private ArrayList<PieEntry> entries = new ArrayList<>();//楗煎浘鏁版嵁
-// private AllRecyclerViewAdapter<PieEntry> entryAdapter = null;//list鍒楄〃閫傞厤鍣紙闂缁熻鏁版嵁锛�
-// private final static int MAX_CHART_COUNT = 20; //楗煎浘鏈�澶氭樉绀哄尯鍧楁暟
-// private final static String REMAIN_PROBLEM = "鍏朵綑";
-//
-// @BindView(R.id.rv_problem_type)
-// RecyclerView rv_problem_type;
-//
-// @BindView(R.id.PC_problem)
-// PieChart mChart;
-//
-// /**
-// * 闂绫诲瀷鍒嗗竷鐨勫垪琛�
-// * @param view 闂绫诲瀷鍒嗗竷fragment
-// */
-// @RequiresApi(api = Build.VERSION_CODES.N)
-// private void initRecyclerView(View view) {
-// final DecimalFormat decimalFormat = new DecimalFormat("#0.00");
-// rv_problem_type = (RecyclerView) view.findViewById(R.id.rv_problem_type);
-// entryAdapter = new AllRecyclerViewAdapter<PieEntry>(entries, R.layout.item_day_task_progress, context) {
-// @Override
-// public void bindView(MyViewHolder holder, PieEntry obj, boolean bool, int position) {
-// float total = 0;
-// for (PieEntry entry : entries) {
-// total = total + entry.getValue();
-// }
-// holder.setText(R.id.tv_item1, entries.get(position).getLabel())
-// .setText(R.id.tv_item2, entries.get(position).getValue() + "")
-// .setText(R.id.tv_item3, decimalFormat.format(entries.get(position).getValue()/ total * 100) + "%");
-// }
-// };
-//
-// LinearLayoutManager layoutManager = new LinearLayoutManager(context);
-// layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_problem_type.setLayoutManager(layoutManager);
-// rv_problem_type.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
-// rv_problem_type.setAdapter(entryAdapter);
-// }
-//
-// private void initPieChart(View view) {
-//
-// //楗煎浘鏍峰紡璁剧疆***************************************************************************************************
-// mChart.setUsePercentValues(true);
-// mChart.getDescription().setEnabled(false);
-// mChart.setExtraOffsets(5, 10, 5, 5);
-//// mChart.setExtraOffsets(20.f, 0.f, 20.f, 0.f);
-//
-// mChart.setDragDecelerationFrictionCoef(0.95f);
-//
-//// mChart.setCenterTextTypeface(mTfLight);
-//// mChart.setCenterText(generateCenterSpannableText());
-//
-// mChart.setDrawHoleEnabled(true);
-// mChart.setHoleColor(Color.WHITE);
-//
-// mChart.setTransparentCircleColor(Color.WHITE);
-// mChart.setTransparentCircleAlpha(110);
-//
-// mChart.setHoleRadius(39f);
-// mChart.setTransparentCircleRadius(41f);
-//
-// mChart.setDrawCenterText(true);
-//
-// mChart.setRotationAngle(0);
-// // enable rotation of the chart by touch
-// mChart.setRotationEnabled(true);
-// mChart.setHighlightPerTapEnabled(true);
-//
-// Legend l = mChart.getLegend();
-// l.setVerticalAlignment(Legend.LegendVerticalAlignment.TOP);
-// l.setHorizontalAlignment(Legend.LegendHorizontalAlignment.LEFT);
-// l.setOrientation(Legend.LegendOrientation.VERTICAL);
-// l.setDrawInside(false);
-// l.setXEntrySpace(7f);
-// l.setYEntrySpace(0f);
-// l.setYOffset(0f);
-//
-// // entry label styling
-// mChart.setEntryLabelColor(Color.WHITE);
-//// mChart.setEntryLabelTypeface(mTfRegular);
-// mChart.setEntryLabelTextSize(12f);
-// mChart.setDrawEntryLabels(false);
-//
-// //test
-//// setData(new ArrayList<ProblemlistVo>());
-// //
-//
-// }
-//
-// private void setData(List<ProblemlistVo> problemlists) {
-// //鏁版嵁鍒濆鍖�***************************************************************************************************
-// entries.clear();
-//
-// PieDataSet dataSet = new PieDataSet(entries, "闂绫诲瀷");
-//
-// //test*****
-//// int count = 5;
-//// int mult = 100;
-//// String[] mParties = {"璺潰绉皹", "鍦伴潰灞�閮ㄦ湭纭寲", "绔欏巶鍑哄叆鍙f棤澶栧洿鎶�", "鏃犲柗娣嬭缃�", REMAIN_PROBLEM};
-//// for (int i = 0; i < count; i++) {
-//// entries.add(new PieEntry((int) (Math.random() * mult) + mult / 5, mParties[i]));
-//// }
-// //*********
-//
-// //鍒濆鍖栨暟鎹�
-// HashMap<String, Integer> problemTypeMap = new HashMap<>();
-// while (!problemlists.isEmpty()) {
-// String problemType = problemlists.get(0).getTypename();
-// if (problemType == null) {
-// problemlists.remove(0);
-// continue;
-// }
-//
-// int problemCount = 0;
-// for (int i = 0; i < problemlists.size(); i++) {
-// if (Objects.equals(problemType, problemlists.get(i).getTypename())) {
-// problemCount++;
-// problemlists.remove(i);
-// i--;
-// }
-// }
-// problemTypeMap.put(problemType, problemCount);
-// }
-// //鎸塇ashMap鐨剉alue闄嶅簭鎺掑簭
-// List<HashMap.Entry<String, Integer>> list = new ArrayList<>(problemTypeMap.entrySet());
-// Collections.sort(list, new Comparator<HashMap.Entry<String, Integer>>() {
-// @Override
-// public int compare(HashMap.Entry<String, Integer> o1, HashMap.Entry<String, Integer> o2) {
-// return o2.getValue().compareTo(o1.getValue());
-// }
-// });
-//// problemTypeMap.clear();
-//// problemTypeMap.entrySet().addAll(list);
-// //鍒濆鍖朎ntry,闄愬畾鏈�澶氭樉绀�5涓墖鍖猴紝瓒呭嚭鐨勫悎骞朵负绗�5涓墖鍖�
-// String remainProblemType = "";
-// int remainProblemCount = 0;
-// int chartcount = 0;
-// for (HashMap.Entry<String, Integer> entry : list) {
-// if (chartcount < MAX_CHART_COUNT - 1) {
-// entries.add(new PieEntry((float)entry.getValue(), entry.getKey()));
-// } else {
-// remainProblemCount = remainProblemCount + entry.getValue();
-// remainProblemType = entry.getKey();
-// }
-// chartcount++;
-// }
-// if (chartcount == MAX_CHART_COUNT) {
-// entries.add(new PieEntry((float) remainProblemCount, remainProblemType));
-// } else if (chartcount > MAX_CHART_COUNT) {
-// entries.add(new PieEntry((float) remainProblemCount, REMAIN_PROBLEM));
-// }
-//
-// // add a lot of colors
-// ArrayList<Integer> colors = new ArrayList<>();
-//
-// for (int c : ColorTemplate.JOYFUL_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.COLORFUL_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.VORDIPLOM_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.LIBERTY_COLORS)
-// colors.add(c);
-//
-// for (int c : ColorTemplate.PASTEL_COLORS)
-// colors.add(c);
-//
-// colors.add(ColorTemplate.getHoloBlue());
-//
-// dataSet.setColors(colors);
-//
-// //value line
-// dataSet.setValueLinePart1OffsetPercentage(80.f);
-// dataSet.setValueLinePart1Length(0.2f);
-// dataSet.setValueLinePart2Length(0.4f);
-// //dataSet.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
-// dataSet.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
-//
-// //
-// PieData data = new PieData(dataSet);
-// data.setValueFormatter(new PercentFormatter());
-// data.setValueTextSize(11f);
-// data.setValueTextColor(Color.BLACK);
-//// data.setValueTypeface(mTfLight);
-// if (!entries.isEmpty()) {//鏁版嵁鍏ㄤ负绌烘椂锛屼笉鏄剧ず
-// mChart.setData(data);
-// } else {
-// mChart.setData(null);
-// }
-// mChart.setNoDataText("鏆傛棤鏁版嵁");
-//
-// // undo all highlights
-// mChart.highlightValues(null);
-//
-// mChart.animateY(1400, Easing.EasingOption.EaseInOutQuad);
-// }
-// //</editor-fold>
-//
-// /**
-// * 鎸夌収鎼滅储鏉′欢鏌ヨ闂鍒嗗竷缁撴灉
-// */
-//// private void search() {
-//// final SweetAlertDialog dialog = DialogUtil.createSweetLoadingDialog(getActivity(), "Loading...");
-//// AreaVo areaVo = new AreaVo();
-//// areaVo.setProvincecode(((Province)SP_province.getSelectedItem()).getProvincecode());
-//// areaVo.setProvincename(((Province)SP_province.getSelectedItem()).getProvincename());
-//// areaVo.setCitycode(((City)SP_city.getSelectedItem()).getCitycode());
-//// areaVo.setCityname(((City)SP_city.getSelectedItem()).getCityname());
-//// areaVo.setDistrictcode(((District)SP_district.getSelectedItem()).getDistrictcode());
-//// areaVo.setDistrictname(((District)SP_district.getSelectedItem()).getDistrictname());
-//// areaVo.setTowncode(((Town) SP_town.getSelectedItem()).getTowncode());
-//// areaVo.setTownname(((Town) SP_town.getSelectedItem()).getTownname());
-//// areaVo = gettime(areaVo);
-//// int position = SP_scense_type.getSelectedItemPosition();
-//// areaVo.setScensetypeid(scenseTypeData.get(position).getValue());
-//// Call<List<ProblemlistVo>> getProblemByArea = problemListService.getByArea(areaVo);
-//// getProblemByArea.enqueue(new Callback<List<ProblemlistVo>>() {
-//// @Override
-//// public void onResponse(Call<List<ProblemlistVo>> call, Response<List<ProblemlistVo>> response) {
-//// if (response.body() != null) {
-//// problemlists = response.body();
-//// }
-//// setData(problemlists);
-//// entryAdapter.notifyDataSetChanged();//鍒锋柊鍒楄〃
-//// DialogUtil.closeDialog(dialog);
-//// }
-////
-//// @Override
-//// public void onFailure(Call<List<ProblemlistVo>> call, Throwable t) {
-//// setData(problemlists);
-//// DialogUtil.closeDialog(dialog);
-//// }
-//// });
-////
-//// setChartTitle();//鍒锋柊鏍囬
-//// setDateDisplay();//鍒锋柊鏃堕棿
-//// }
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment_B.java
deleted file mode 100644
index 7e98b8c..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment_B.java
+++ /dev/null
@@ -1,354 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis;
-//
-//import android.content.Context;
-//import android.graphics.Color;
-//import android.os.Bundle;
-//import android.support.annotation.Nullable;
-//import android.support.v4.app.Fragment;
-//import android.support.v7.widget.DividerItemDecoration;
-//import android.support.v7.widget.LinearLayoutManager;
-//import android.support.v7.widget.RecyclerView;
-//import android.view.LayoutInflater;
-//import android.view.View;
-//import android.view.ViewGroup;
-//import android.widget.ImageView;
-//import android.widget.TextView;
-//
-//import com.github.mikephil.charting.animation.Easing;
-//import com.github.mikephil.charting.charts.BarChart;
-//import com.github.mikephil.charting.components.AxisBase;
-//import com.github.mikephil.charting.components.Description;
-//import com.github.mikephil.charting.components.XAxis;
-//import com.github.mikephil.charting.components.YAxis;
-//import com.github.mikephil.charting.data.BarData;
-//import com.github.mikephil.charting.data.BarDataSet;
-//import com.github.mikephil.charting.data.BarEntry;
-//import com.github.mikephil.charting.formatter.IAxisValueFormatter;
-//import com.github.mikephil.charting.formatter.PercentFormatter;
-//
-//import java.text.DecimalFormat;
-//import java.text.SimpleDateFormat;
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import butterknife.BindView;
-//import butterknife.ButterKnife;
-//import butterknife.Unbinder;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter;
-//import cn.flightfeather.thirdapp.bean.vo.TaskVo;
-//import cn.flightfeather.thirdapp.util.CommonUtils;
-//import cn.flightfeather.thirdapp.view.ScrollTextView;
-//
-///**
-// * 2018.11.09
-// * @author riku
-// * 椤跺眰浠诲姟鐨勮缁嗚繘搴︿俊鎭�
-// */
-//public class ProgressDetailFragment_B extends Fragment {
-//
-// private static final String ARG_PARAM1 = "taskProgressVo";//鍙傛暟鏍囩
-//
-// private TaskVo taskProgressVo;//闇�瑕乤ctivity浼犲叆涓�涓叿浣撶殑椤跺眰浠诲姟瀵硅薄锛岀敤浜庢樉绀哄叾璇︾粏杩涘害淇℃伅
-//
-// private Unbinder unbinder;
-//
-// public ProgressDetailFragment_B() {
-// // Required empty public constructor
-// }
-//
-// /**
-// * Use this factory method to create a new instance of
-// * this fragment using the provided parameters.
-// *
-// * @param taskProgressVo
-// * @return A new instance of fragment ProgressDetailFragment.
-// */
-// // TODO: Rename and change types and number of parameters
-// public static ProgressDetailFragment_B newInstance(TaskVo taskProgressVo) {
-// ProgressDetailFragment_B fragment = new ProgressDetailFragment_B();
-// Bundle args = new Bundle();
-// args.putSerializable(ARG_PARAM1, taskProgressVo);
-// fragment.setArguments(args);
-// return fragment;
-// }
-//
-// @Override
-// public void onCreate(Bundle savedInstanceState) {
-// super.onCreate(savedInstanceState);
-// if (getArguments() != null) {
-// taskProgressVo = (TaskVo) getArguments().getSerializable(ARG_PARAM1);
-// }
-// }
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-// View view = inflater.inflate(R.layout.dialog_anysis_sub_progress, container, false);
-// unbinder = ButterKnife.bind(this, view);
-// initUI();
-// initStandardBarchart();
-// return view;
-// }
-//
-//
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-//
-// }
-//
-//
-// @Override
-// public void onAttach(Context context) {
-// super.onAttach(context);
-// }
-//
-// @Override
-// public void onDetach() {
-// super.onDetach();
-// }
-//
-// @Override
-// public void onDestroyView() {
-// super.onDestroyView();
-// unbinder.unbind();
-// }
-//
-// //<editor-fold desc="鍒濆鍖栫晫闈I">
-// private final static String NOTASK = "鏃犱换鍔�";
-//
-// @BindView(R.id.tv_top_task)
-// ScrollTextView tv_top_task;
-//
-// @BindView(R.id.iv_top_task)
-// ImageView iv_top_task;
-//
-// @BindView(R.id.tv_total_progress)
-// TextView tv_total_progress;
-//
-// @BindView(R.id.tv_my_progress)
-// TextView tv_my_progress;
-//
-// @BindView(R.id.rv_dialog_task_progress)
-// RecyclerView rv_dialog_task_progress;
-//
-// private void initUI(){
-// final DecimalFormat decimalFormat = new DecimalFormat("#0.00");
-// tv_total_progress.setSelected(true);
-// tv_top_task.setText(taskProgressVo.getName());
-// //鏍规嵁浠诲姟绫诲瀷閫夋嫨涓嶅悓鐨勫浘鏍�
-// iv_top_task.setImageResource(CommonUtils.getIconByTaskType(taskProgressVo.getTypeno().toString()));
-// //鏁版嵁
-// ArrayList<TaskVo> daytaskprogresslist = new ArrayList<>();
-// daytaskprogresslist.addAll(taskProgressVo.getDaytaskList());//褰撳墠椤跺眰浠诲姟鐨勬墍鏈夋棩浠诲姟
-//
-// //璁剧疆鍒楄〃鏄剧ず瀵瑰叾鏂瑰紡
-// LinearLayoutManager layoutManager1 = new LinearLayoutManager(getActivity());
-// layoutManager1.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_dialog_task_progress.setLayoutManager(layoutManager1);
-// rv_dialog_task_progress.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
-// //**鎬昏繘搴﹀垪琛�
-// final AllRecyclerViewAdapter<TaskVo> adapter1 = new AllRecyclerViewAdapter<TaskVo>(daytaskprogresslist, R.layout.item_day_task_progress, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, TaskVo obj, boolean bool, int position) {
-// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM鏈坉d鏃�");
-// holder.setText(R.id.tv_item1, simpleDateFormat.format(obj.getStarttime()));
-// holder.setText(R.id.tv_item2, String.valueOf(obj.getCompletetask()) + "/" + String.valueOf(obj.getTotaltask()));
-// if (obj.getTotaltask() == 0)
-// holder.setText(R.id.tv_item3, NOTASK);
-// else
-// holder.setText(R.id.tv_item3, decimalFormat.format(((float)obj.getCompletetask() / (float)obj.getTotaltask() * 100)) + "%");
-// }
-// };
-// //**鐢ㄦ埛杩涘害鍒楄〃
-// final AllRecyclerViewAdapter<TaskVo> adapter2 = new AllRecyclerViewAdapter<TaskVo>(daytaskprogresslist, R.layout.item_day_task_progress, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, TaskVo obj, boolean bool, int position) {
-// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM鏈坉d鏃�");
-// holder.setText(R.id.tv_item1, simpleDateFormat.format(obj.getStarttime()));
-// holder.setText(R.id.tv_item2, String.valueOf(obj.getMycompletetask()) + "/" + String.valueOf(obj.getMytotaltask()));
-// if (obj.getMytotaltask() == 0)
-// holder.setText(R.id.tv_item3, NOTASK);
-// else
-// holder.setText(R.id.tv_item3, decimalFormat.format(((float)obj.getMycompletetask() / (float)obj.getMytotaltask() * 100)) + "%");
-// }
-// };
-// rv_dialog_task_progress.setAdapter(adapter1);
-//
-// tv_total_progress.setOnClickListener(new View.OnClickListener() {
-// @Override
-// public void onClick(View v) {
-// tv_total_progress.setSelected(true);
-// tv_my_progress.setSelected(false);
-// tv_total_progress.setTextColor(Color.WHITE);
-// tv_my_progress.setTextColor(Color.BLACK);
-// rv_dialog_task_progress.setAdapter(adapter1);
-// }
-// });
-//
-// tv_my_progress.setOnClickListener(new View.OnClickListener() {
-// @Override
-// public void onClick(View v) {
-// tv_my_progress.setSelected(true);
-// tv_total_progress.setSelected(false);
-// tv_my_progress.setTextColor(Color.WHITE);
-// tv_total_progress.setTextColor(Color.BLACK);
-// rv_dialog_task_progress.setAdapter(adapter2);
-// }
-// });
-// }
-// //</editor-fold>
-//
-//
-// //<editor-fold desc="鍒濆鍖栦换鍔¤繘搴︾洿鏂瑰浘">
-// @BindView(R.id.barChart_progress)
-// BarChart mStandardChart;//姣忎釜椤跺眰浠诲姟鐨勫叿浣撶洿鏂瑰浘鏁版嵁
-// /*
-// 鏌辩姸鍥撅紝椤跺眰浠诲姟鐨勫畬鎴愮櫨鍒嗘瘮
-// */
-// private void initStandardBarchart() {
-//
-// List<TaskVo> daytaskprogresslist = taskProgressVo.getDaytaskList();//褰撳墠椤跺眰浠诲姟鐨勬墍鏈夋棩浠诲姟
-//
-// //鍧愭爣杞�
-// XAxis xAxis = mStandardChart.getXAxis();
-// xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
-// xAxis.setDrawGridLines(false);
-// xAxis.setGranularity(1f);//鍧愭爣闂撮殧
-//// xAxis.setLabelCount(2, true);//杩涘叆鏃剁殑鏍囩涓暟
-// xAxis.setCenterAxisLabels(true);//鏍囩澶勪簬鍥捐〃涓棿
-// xAxis.setAxisMinimum(0f);
-// xAxis.setValueFormatter(new MyDateFormmater(daytaskprogresslist));
-//
-// YAxis rightAxis = mStandardChart.getAxisRight();
-// rightAxis.setEnabled(false);
-//// rightAxis.setDrawGridLines(false);
-//// rightAxis.setDrawAxisLine(false);
-//// rightAxis.setDrawLabels(false);
-//
-// YAxis leftAxis = mStandardChart.getAxisLeft();
-// leftAxis.setDrawGridLines(false);
-// leftAxis.setDrawAxisLine(false);
-// leftAxis.setDrawLabels(false);
-// leftAxis.setDrawTopYLabelEntry(true);
-// leftAxis.setZeroLineColor(Color.BLACK);
-// leftAxis.setDrawZeroLine(true);
-// leftAxis.setAxisMinimum(0f);
-// leftAxis.setAxisMaximum(100f);
-// leftAxis.setValueFormatter(new PercentFormatter());
-//// LimitLine limitLine = new LimitLine(100f);
-//// limitLine.setLineColor(Color.BLACK);
-//// leftAxis.addLimitLine(limitLine);
-//
-// //Entry鏁版嵁
-// List<BarEntry> totalEntries = new ArrayList<>();;//姣忔棩鎬讳换鍔¤繘搴�
-// List<BarEntry> userEntries = new ArrayList<>();;//姣忔棩鐢ㄦ埛杩涘害
-// //Test*********
-//// totalEntries.add(new BarEntry(0f, 0f));
-//// totalEntries.add(new BarEntry(1f, 0f));
-//// totalEntries.add(new BarEntry(2f, 40f));
-//// totalEntries.add(new BarEntry(3f, 70f));
-//// totalEntries.add(new BarEntry(4f, 80f));
-//// totalEntries.add(new BarEntry(5f, 50f));
-//// totalEntries.add(new BarEntry(6f, 30f));
-//// totalEntries.add(new BarEntry(7f, 10f));
-////
-//// userEntries.add(new BarEntry(0f, 0f));
-//// userEntries.add(new BarEntry(1f, 60f));
-//// userEntries.add(new BarEntry(2f, 70));
-//// userEntries.add(new BarEntry(3f, 70));
-//// userEntries.add(new BarEntry(4f, 35));
-//// userEntries.add(new BarEntry(5f, 35));
-//// userEntries.add(new BarEntry(6f, 35));
-//// userEntries.add(new BarEntry(7f, 35));
-// //*************
-//
-// for (int i = 0; i < daytaskprogresslist.size(); i++){//鍒濆鍖栨暟鎹�
-// float y1 = daytaskprogresslist.get(i).getTotaltask();
-// if (y1 != 0)
-// y1 = ((float)daytaskprogresslist.get(i).getCompletetask() / (float) daytaskprogresslist.get(i).getTotaltask() * 100);
-// else
-// y1 = 100f;
-// totalEntries.add(new BarEntry((float)i, y1));
-//
-// float y2 = daytaskprogresslist.get(i).getMytotaltask();
-// if (y2 != 0)
-// y2 = ((float)daytaskprogresslist.get(i).getMycompletetask() / (float)daytaskprogresslist.get(i).getMytotaltask() * 100);
-// else
-// y2 = 100f;
-// userEntries.add(new BarEntry((float)i, y2));
-// }
-//
-// BarDataSet barDataSetTotal = new BarDataSet(totalEntries, "鎬昏繘搴�");
-// BarDataSet barDataSetUser = new BarDataSet(userEntries, "鎴戠殑杩涘害");
-// barDataSetTotal.setAxisDependency(YAxis.AxisDependency.LEFT);
-//// barDataSetTotal.setAxisDependency(YAxis.AxisDependency.RIGHT);
-// barDataSetUser.setAxisDependency(YAxis.AxisDependency.LEFT);
-//// barDataSetUser.setAxisDependency(YAxis.AxisDependency.RIGHT);
-// barDataSetTotal.setColor(Color.argb(128, 255, 0, 0));
-// barDataSetUser.setColor(Color.argb(128, 0, 255, 0));
-//
-// float groupSpace = 0.06f;
-// float barSpace = 0.02f; // x2 dataset
-// float barWidth = 0.45f; // x2 dataset
-// // (0.02 + 0.45) * 2 + 0.06 = 1.00 -> interval per "group"
-// BarData barData = new BarData(barDataSetTotal, barDataSetUser);
-//// BarData barData = new BarData(barDataSetTotal);
-// barData.setValueFormatter(new PercentFormatter());
-// barData.setValueTextSize(8f);
-// barData.setHighlightEnabled(false);//楂樹寒
-// barData.setBarWidth(barWidth);
-// if (!totalEntries.isEmpty() || !userEntries.isEmpty()) {//鏁版嵁鍏ㄤ负绌烘椂锛屼笉鏄剧ず
-// mStandardChart.setData(barData);
-// mStandardChart.setFitBars(true);//x杞村潗鏍囨樉绀哄搴旀瘡涓猙ar
-// mStandardChart.groupBars(0f, groupSpace, barSpace);
-// }
-//
-// //General Chart Settings & Styling
-// mStandardChart.setNoDataText("浠诲姟杩樻湭寮�濮嬫墽琛岋紝鏆傛棤鏁版嵁");//Sets the title that should appear if the chart is empty.
-//// mStandardChart.setDrawBorders(false);//Enables / disables drawing the chart borders (lines surrounding the chart).
-// //鍥炬爣鎻忚堪
-// Description description = new Description();
-// description.setText("");
-// mStandardChart.setDescription(description);
-//
-//// mStandardChart.setTouchEnabled(true);//瑙︽懜
-//// mStandardChart.setDragEnabled(true);//鎷栨嫿
-// mStandardChart.setScaleEnabled(false);//缂╂斁
-//
-// mStandardChart.animateY(1400, Easing.EasingOption.EaseOutSine);
-// mStandardChart.fitScreen();
-//
-// //瑙嗗浘璁剧疆
-// mStandardChart.setVisibleXRangeMaximum(6f);
-// mStandardChart.setVisibleXRangeMinimum(6f);
-//
-//// mStandardChart.invalidate();
-//
-// }
-// //</editor-fold>
-//
-// class MyDateFormmater implements IAxisValueFormatter {
-//
-// DecimalFormat mFormat;
-// List<TaskVo> daytaskprogresslist;
-// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd鏃�");
-//
-// MyDateFormmater(List<TaskVo> daytaskprogresslist) {
-// mFormat = new DecimalFormat("###,###,##0");
-// this.daytaskprogresslist = daytaskprogresslist;
-// }
-//
-// @Override
-// public String getFormattedValue(float value, AxisBase axis) {
-// try {
-// return simpleDateFormat.format(daytaskprogresslist.get((int)value).getStarttime());
-// }catch (Exception e){
-// e.printStackTrace();
-// return "";
-// }
-// }
-// }
-//
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity_B.java
deleted file mode 100644
index 21f1901..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity_B.java
+++ /dev/null
@@ -1,170 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis.rank;
-//
-//import android.content.Intent;
-//import android.graphics.Color;
-//import android.os.Build;
-//import android.os.Bundle;
-//import android.support.annotation.RequiresApi;
-//import android.support.design.widget.TabLayout;
-//import android.support.v4.app.Fragment;
-//import android.support.v4.app.FragmentManager;
-//import android.support.v4.app.FragmentPagerAdapter;
-//import android.support.v4.content.ContextCompat;
-//import android.support.v4.view.ViewCompat;
-//import android.support.v4.view.ViewPager;
-//import android.support.v7.app.AppCompatActivity;
-//import android.view.Gravity;
-//import android.view.View;
-//import android.widget.TextView;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import butterknife.BindView;
-//import butterknife.ButterKnife;
-//import butterknife.OnClick;
-//import butterknife.Unbinder;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.bean.vo.RankVo;
-//
-//public class AnalysisRankActivity_B extends AppCompatActivity {
-//
-// //<editor-fold desc="鍏ㄥ眬鍙橀噺">
-// public static final String ARG_PARAM1 = "RankVo";
-// public static final String ARG_PARAM2 = "topTask";
-// public static final String ARG_PARAM3 = "sceneTypeName";
-// public static final String ARG_PARAM4 = "rankType";//棣栨灞曠ず鐨勬帓鍚嶇被鍨嬶紝鍦烘櫙缁煎悎鎺掑悕 鎴� 琛楅亾缁煎悎鎺掑悕
-//
-// private final String TITLE = "鎺掑悕";
-//
-// private RankVo rankVo;
-// private String topTask;
-// private String sceneTypeName;
-// private int rankType;
-//
-// private Unbinder unbinder;
-// //</editor-fold>
-//
-// //<editor-fold desc="鐢熷懡鍛ㄦ湡">
-// @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
-// @Override
-// protected void onCreate(Bundle savedInstanceState) {
-// super.onCreate(savedInstanceState);
-// setContentView(R.layout.activity_analysis_rank);
-// unbinder = ButterKnife.bind(this);
-// Intent intent = getIntent();
-// this.rankVo = (RankVo) intent.getSerializableExtra(ARG_PARAM1);
-// this.topTask = intent.getStringExtra(ARG_PARAM2);
-// this.sceneTypeName = intent.getStringExtra(ARG_PARAM3);
-// this.rankType = intent.getIntExtra(ARG_PARAM4, 0);
-//
-// initToolBar();
-// initTitle();
-// initTab();
-// initViewPager();
-// }
-//
-//
-//
-// @Override
-// protected void onDestroy() {
-// super.onDestroy();
-// if (unbinder != null) {
-// unbinder.unbind();
-// }
-// }
-//
-// //</editor-fold>
-//
-// //<editor-fold desc="鏍囬鏍�">
-// @BindView(R.id.action_bar_rank) View action_bar;
-//
-// @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
-// private void initToolBar() {
-// action_bar.setElevation(0);
-// action_bar.setBackgroundColor(Color.alpha(0));
-// action_bar.findViewById(R.id.spinner_topclass_task).setVisibility(View.GONE);
-//// action_bar.findViewById(R.id.img_left).setVisibility(View.GONE);
-// action_bar.findViewById(R.id.img_right).setVisibility(View.INVISIBLE);
-// action_bar.findViewById(R.id.ll_menu_text).setVisibility(View.VISIBLE);
-// TextView title = action_bar.findViewById(R.id.actionbar_title);
-// title.setText(TITLE);
-// }
-//
-// @OnClick(R.id.img_left)
-// void onClickBack() {
-// this.finish();
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="鍐呭鏍囬">
-// @BindView(R.id.text_topTask) TextView text_topTask;
-// @BindView(R.id.text_scene) TextView text_scene;
-//
-// private void initTitle() {
-// text_topTask.setText(topTask);
-// text_scene.setText(sceneTypeName);
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="ViewPager鍒濆鍖�">
-// @BindView(R.id.tabLayout) TabLayout tabLayout;
-// @BindView(R.id.viewPager) ViewPager viewPager;
-// private List<String> tabIndicators;//tab鏍囬
-// private List<Fragment> tabFragments;//鍐呭
-// private ContentPagerAdapter contentAdapter;//viewPager鍐呭椤甸潰閫傞厤鍣�
-//
-// private void initTab(){
-// tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
-// tabLayout.setTabGravity(Gravity.CENTER_HORIZONTAL);
-// tabLayout.setTabTextColors(ContextCompat.getColor(this, R.color.black), ContextCompat.getColor(this, R.color.orange));
-// tabLayout.setSelectedTabIndicatorColor(ContextCompat.getColor(this, R.color.orange));
-// ViewCompat.setElevation(tabLayout, 2);
-// tabLayout.setupWithViewPager(viewPager);//灏唗ab鍜寁iewPager缁戝畾
-//
-// }
-//
-// private void initViewPager(){
-// tabIndicators = new ArrayList<>();
-// tabIndicators.add("鍦烘櫙缁煎悎鎺掑悕");
-// tabIndicators.add("琛楅亾缁煎悎鎺掑悕");
-//
-// tabFragments = new ArrayList<>();
-// tabFragments.add(SceneRankContentFragment.newInstance(rankVo.getSceneRanks()));
-// tabFragments.add(TownRankContentFragment.newInstance(rankVo.getTownRanks()));
-//
-// contentAdapter = new ContentPagerAdapter(getSupportFragmentManager());
-// viewPager.setAdapter(contentAdapter);
-// try {
-// viewPager.setCurrentItem(rankType);
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-// }
-//
-// /**
-// * viewPager閫傞厤鍣�
-// */
-// class ContentPagerAdapter extends FragmentPagerAdapter {
-//
-// public ContentPagerAdapter(FragmentManager fm) {
-// super(fm);
-// }
-//
-// @Override
-// public Fragment getItem(int position) {
-// return tabFragments.get(position);
-// }
-//
-// @Override
-// public int getCount() {
-// return tabIndicators.size();
-// }
-//
-// @Override
-// public CharSequence getPageTitle(int position) {
-// return tabIndicators.get(position);
-// }
-// }
-// //</editor-fold>
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment_B.java
deleted file mode 100644
index e12c437..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment_B.java
+++ /dev/null
@@ -1,127 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis.rank;
-//
-//
-//import android.os.Bundle;
-//import android.support.annotation.Nullable;
-//import android.support.v4.app.Fragment;
-//import android.support.v7.widget.LinearLayoutManager;
-//import android.support.v7.widget.RecyclerView;
-//import android.view.LayoutInflater;
-//import android.view.View;
-//import android.view.ViewGroup;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import butterknife.BindView;
-//import butterknife.ButterKnife;
-//import butterknife.Unbinder;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter;
-//import cn.flightfeather.thirdapp.bean.vo.RankVo;
-//
-//public class SceneRankContentFragment_B extends Fragment {
-//
-// //<editor-fold desc="鍏ㄥ眬鍙橀噺">
-// private static final String ARG_PARAM1 = "param1";
-//
-// private List<RankVo.SceneRank> sceneRanks;
-//
-// private Unbinder unbinder;
-// //</editor-fold>
-//
-// //<editor-fold desc="constructor">
-// public SceneRankContentFragment_B() {
-// // Required empty public constructor
-// }
-//
-// // TODO: Rename and change types and number of parameters
-// public static SceneRankContentFragment_B newInstance(ArrayList<RankVo.SceneRank> params) {
-// SceneRankContentFragment_B fragment = new SceneRankContentFragment_B();
-// Bundle args = new Bundle();
-// args.putSerializable(ARG_PARAM1, params);
-// fragment.setArguments(args);
-// return fragment;
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="lifecycle">
-// @Override
-// public void onCreate(Bundle savedInstanceState) {
-// super.onCreate(savedInstanceState);
-// if (getArguments() != null) {
-// sceneRanks = (List<RankVo.SceneRank>) getArguments().getSerializable(ARG_PARAM1);
-// }
-// }
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-// // Inflate the layout for this fragment
-// View view = inflater.inflate(R.layout.fragment_rank_content, container, false);
-// unbinder = ButterKnife.bind(this, view);
-// return view;
-// }
-//
-//
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-// initView();
-// }
-//
-//
-// @Override
-// public void onDestroy() {
-// super.onDestroy();
-// if (unbinder != null) {
-// unbinder.unbind();
-// }
-// }
-//
-// //</editor-fold>
-//
-// //<editor-fold desc="initView">
-// @BindView(R.id.rv_content) RecyclerView rv_rank_content;
-// AllRecyclerViewAdapter<RankVo.SceneRank> adapter;
-//
-// private void initView() {
-// adapter = new AllRecyclerViewAdapter<RankVo.SceneRank>(sceneRanks, R.layout.item_problem_count, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, RankVo.SceneRank obj, boolean isSelected, int position) {
-// int rank = obj.getRankNo();
-// holder.setText(R.id.text_name, obj.getSceneName())
-// .setText(R.id.text_firstCount, getScore(obj.getScore()))
-// .setVisibility(R.id.text_secondCount, View.GONE)
-// .setVisibility(R.id.image_rank, View.GONE)
-// .setText(R.id.text_no, String.valueOf(rank));
-// switch (rank) {
-// case 1:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_4);
-// break;
-// case 2:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_3);
-// break;
-// case 3:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_2);
-// break;
-// default:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_5);
-// break;
-// }
-// }
-// };
-//
-// LinearLayoutManager lm = new LinearLayoutManager(getActivity());
-// lm.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_rank_content.setLayoutManager(lm);
-// rv_rank_content.setAdapter(adapter);
-// }
-// //</editor-fold>
-//
-// private String getScore(int score) {
-// return String.valueOf(score == -1 ? "鏈瘎鍒�" : score);
-// }
-//
-//
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment_B.java b/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment_B.java
deleted file mode 100644
index 0be966f..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment_B.java
+++ /dev/null
@@ -1,127 +0,0 @@
-//package cn.flightfeather.thirdapp.dataanalysis.rank;
-//
-//
-//import android.os.Bundle;
-//import android.support.annotation.Nullable;
-//import android.support.v4.app.Fragment;
-//import android.support.v7.widget.LinearLayoutManager;
-//import android.support.v7.widget.RecyclerView;
-//import android.view.LayoutInflater;
-//import android.view.View;
-//import android.view.ViewGroup;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//
-//import butterknife.BindView;
-//import butterknife.ButterKnife;
-//import butterknife.Unbinder;
-//import cn.flightfeather.thirdapp.R;
-//import cn.flightfeather.thirdapp.adapter.AllRecyclerViewAdapter;
-//import cn.flightfeather.thirdapp.bean.vo.RankVo;
-//
-//public class TownRankContentFragment_B extends Fragment {
-//
-// //<editor-fold desc="鍏ㄥ眬鍙橀噺">
-// private static final String ARG_PARAM1 = "param1";
-//
-// private List<RankVo.TownRank> townRanks;
-//
-// private Unbinder unbinder;
-// //</editor-fold>
-//
-// //<editor-fold desc="constructor">
-// public TownRankContentFragment_B() {
-// // Required empty public constructor
-// }
-//
-// // TODO: Rename and change types and number of parameters
-// public static TownRankContentFragment_B newInstance(ArrayList<RankVo.TownRank> params) {
-// TownRankContentFragment_B fragment = new TownRankContentFragment_B();
-// Bundle args = new Bundle();
-// args.putSerializable(ARG_PARAM1, params);
-// fragment.setArguments(args);
-// return fragment;
-// }
-// //</editor-fold>
-//
-// //<editor-fold desc="lifecycle">
-// @Override
-// public void onCreate(Bundle savedInstanceState) {
-// super.onCreate(savedInstanceState);
-// if (getArguments() != null) {
-// townRanks = (List<RankVo.TownRank>) getArguments().getSerializable(ARG_PARAM1);
-// }
-// }
-//
-// @Override
-// public View onCreateView(LayoutInflater inflater, ViewGroup container,
-// Bundle savedInstanceState) {
-// // Inflate the layout for this fragment
-// View view = inflater.inflate(R.layout.fragment_rank_content, container, false);
-// unbinder = ButterKnife.bind(this, view);
-// return view;
-// }
-//
-//
-// @Override
-// public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
-// super.onViewCreated(view, savedInstanceState);
-// initView();
-// }
-//
-//
-// @Override
-// public void onDestroy() {
-// super.onDestroy();
-// if (unbinder != null) {
-// unbinder.unbind();
-// }
-// }
-//
-// //</editor-fold>
-//
-// //<editor-fold desc="initView">
-// @BindView(R.id.rv_content) RecyclerView rv_rank_content;
-// AllRecyclerViewAdapter<RankVo.TownRank> adapter;
-//
-// private void initView() {
-// adapter = new AllRecyclerViewAdapter<RankVo.TownRank>(townRanks, R.layout.item_problem_count, getActivity()) {
-// @Override
-// public void bindView(MyViewHolder holder, RankVo.TownRank obj, boolean isSelected, int position) {
-// int rank = obj.getRankNo();
-// holder.setText(R.id.text_name, obj.getTownName())
-// .setText(R.id.text_firstCount, getScore(obj.getAverageScore()))
-// .setVisibility(R.id.text_secondCount, View.GONE)
-// .setVisibility(R.id.image_rank, View.GONE)
-// .setText(R.id.text_no, String.valueOf(rank));;
-// switch (rank) {
-// case 1:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_4);
-// break;
-// case 2:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_3);
-// break;
-// case 3:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_2);
-// break;
-// default:
-// holder.setImageResource(R.id.image_no, R.drawable.icon_rank_5);
-// break;
-// }
-// }
-// };
-//
-// LinearLayoutManager lm = new LinearLayoutManager(getActivity());
-// lm.setOrientation(LinearLayoutManager.VERTICAL);
-// rv_rank_content.setLayoutManager(lm);
-// rv_rank_content.setAdapter(adapter);
-// }
-// //</editor-fold>
-//
-// private String getScore(int score) {
-// return String.valueOf(score == -1 ? "鏈瘎鍒�" : score);
-// }
-//
-//
-//}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/SearchService.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/SearchService.kt
index b1aa147..9d4b13b 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/SearchService.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/SearchService.kt
@@ -1,11 +1,16 @@
package cn.flightfeather.thirdappmodule.httpservice
+import cn.flightfeather.thirdappmodule.bean.entity.Subtask
+import cn.flightfeather.thirdappmodule.model.bean.BaseResponse
import cn.flightfeather.thirdappmodule.model.bean.ExcelConfigVo
+import cn.flightfeather.thirdappmodule.util.Constant
import io.reactivex.Observable
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.Body
+import retrofit2.http.GET
import retrofit2.http.POST
+import retrofit2.http.Query
/**
* @author riku
@@ -20,4 +25,12 @@
fun getExcel(
@Body config: ExcelConfigVo
): Observable<Response<ResponseBody>>
+
+ @GET("search/subtask/keyword")
+ fun searchSubtask(
+ @Query("userId") userId: String,
+ @Query("keyword") keyword:String,
+ @Query("page") page: Int,
+ @Query("perPage") perPage: Int = Constant.PAGE_SIZE
+ ): Observable<Response<BaseResponse<List<Subtask>>>>
}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/MainActivity.java b/app/src/main/java/cn/flightfeather/thirdappmodule/module/MainActivity.java
index 7ec2bd0..9bf6b4c 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/MainActivity.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/MainActivity.java
@@ -22,7 +22,7 @@
import cn.flightfeather.thirdappmodule.R;
import cn.flightfeather.thirdappmodule.bean.entity.Subtask;
import cn.flightfeather.thirdappmodule.bean.vo.ProblemlistVo;
-import cn.flightfeather.thirdappmodule.dataanalysis.AnalysisOverViewFragment;
+import cn.flightfeather.thirdappmodule.module.dataanalysis.AnalysisOverViewFragment;
import cn.flightfeather.thirdappmodule.fragment.SettingFragment;
import cn.flightfeather.thirdappmodule.module.home.HomeFragment;
import cn.flightfeather.thirdappmodule.module.home.HomeFragment_comptent;
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt
index 6564dfa..9b8234e 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt
@@ -9,11 +9,13 @@
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentTransaction
+import android.support.v4.content.ContextCompat
import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.Toolbar
import android.view.MenuItem
import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
+import android.widget.EditText
import com.bumptech.glide.Glide
import io.reactivex.disposables.Disposable
import org.greenrobot.eventbus.EventBus
@@ -62,6 +64,28 @@
abstract fun getLayoutId(): Int
+ /**
+ * 鎷撳睍activity涓嚜鍔ㄦ樉绀鸿蒋閿洏鐨勬柟娉�
+ */
+ fun autoShowKeyboard(editText: EditText, delay: Long = 500) {
+ editText.postDelayed({
+ ContextCompat.getSystemService(this, InputMethodManager::class.java)?.run {
+ editText.requestFocus()
+ showSoftInput(editText, 0)
+ }
+ }, delay)
+ }
+
+ /**
+ * 鎷撳睍activity涓殣钘忚蒋閿洏鐨勬柟娉�
+ */
+ fun hideKeyboard() {
+ this.window?.peekDecorView()?.let {
+ val inputManager =
+ this.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
+ inputManager.hideSoftInputFromWindow(it.windowToken, 0)
+ }
+ }
}
fun Context.startActivity(cls: Class<*>) {
@@ -78,15 +102,4 @@
inline fun FragmentManager.inTransaction(func: FragmentTransaction.() -> FragmentTransaction) {
beginTransaction().func().commit()
-}
-
-/**
- * 鎷撳睍fragment涓殣钘忚蒋閿洏鐨勬柟娉�
- */
-fun Activity.hideKeyboard() {
- this.window?.peekDecorView()?.let {
- val inputManager =
- this.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
- inputManager.hideSoftInputFromWindow(it.windowToken, 0)
- }
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseTakePicActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseTakePicActivity.kt
index eabeb8c..ea86d12 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseTakePicActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseTakePicActivity.kt
@@ -56,10 +56,11 @@
//鏌ョ湅涓存椂鎷嶆憚鍥剧墖鍙互鍒犻櫎
data?.getIntExtra("position", -1)?.let {
if (it > -1) {
- if (pathTempList[it].first.exists()) {
- pathTempList[it].first.delete()
- }
+ val file = pathTempList[it].first
pathTempList.removeAt(it)
+ if (file.exists()) {
+ file.delete()
+ }
refreshImageView()
}
}
@@ -68,16 +69,17 @@
val paths = data?.getStringArrayListExtra(EXTRA_SELECT_IMAGES)
paths?.forEach {
val oldFile = File(it)
- val newFile = File(Environment.getExternalStorageDirectory(), "FlightFeather/Temp/" + UUIDGenerator.generateUUID(4) + ".jpg")
- if (!newFile.parentFile.exists()) {
- newFile.parentFile.mkdirs()
- }
- try {
- FileUtil.copyFile(oldFile, newFile)
- pathTempList.add(Pair(newFile, true))
- } catch (e: IOException) {
- e.printStackTrace()
- application.toast("澶嶅埗鏂囦欢澶辫触")
+ if (it.contains("FlightFeather/Temp")) {
+ pathTempList.add(Pair(oldFile, true))
+ } else {
+ val newFile = File(Environment.getExternalStorageDirectory(), "FlightFeather/Temp/" + UUIDGenerator.generateUUID(4) + ".jpg")
+ try {
+ FileUtil.copyFile(oldFile, newFile)
+ pathTempList.add(Pair(newFile, true))
+ } catch (e: IOException) {
+ e.printStackTrace()
+ application.toast("澶嶅埗鏂囦欢澶辫触")
+ }
}
}
refreshImageView()
@@ -132,7 +134,7 @@
return View.OnClickListener {
val t = imageViewList.size - pathTempList.size
val picNum = if (t >= 0) t else 0
- PhotoUtil.pickPhoto2(this, TAKE_PHOTO, picNum)
+ PhotoUtil.pickPhoto(this, TAKE_PHOTO, picNum)
}
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/CameraActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/CameraActivity.kt
index f9d6440..699d98d 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/CameraActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/CameraActivity.kt
@@ -1,115 +1,243 @@
package cn.flightfeather.thirdappmodule.module.common
+import android.annotation.SuppressLint
import android.app.Activity
import android.content.Intent
import android.graphics.Bitmap
import android.graphics.BitmapFactory
+import android.graphics.Canvas
import android.graphics.Matrix
import android.media.ExifInterface
import android.os.Bundle
+import android.os.Environment
import android.os.Environment.DIRECTORY_PICTURES
import android.view.View
import cn.flightfeather.thirdappmodule.R
+import cn.flightfeather.thirdappmodule.activity.PhotoViewerActivity
import cn.flightfeather.thirdappmodule.module.base.BaseActivity
-import cn.flightfeather.thirdappmodule.module.base.BaseTakePicActivity
-import cn.flightfeather.thirdappmodule.util.DateFormatter
+import cn.flightfeather.thirdappmodule.module.base.VIEW_PHOTO
+import cn.flightfeather.thirdappmodule.util.*
import cn.flightfeather.thirdappmodule.util.location.LocationUtil
import cn.flightfeather.thirdappmodule.util.photo.ExifHelper
import cn.flightfeather.thirdappmodule.util.photo.ImageMergeUtil
+import com.lcw.library.imagepicker.ImagePicker
import com.otaliastudios.cameraview.CameraListener
import com.otaliastudios.cameraview.CameraOptions
+import com.otaliastudios.cameraview.Size
import io.reactivex.Observable
+import io.reactivex.android.schedulers.AndroidSchedulers
+import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.activity_camera.*
import java.io.File
import java.io.FileOutputStream
+import java.io.Serializable
import java.util.*
+import kotlin.collections.ArrayList
+import kotlin.math.abs
+import kotlin.math.round
/**
*
*/
class CameraActivity : BaseActivity(), View.OnClickListener {
+ // gps瀹氫綅宸ュ叿
private lateinit var locationUtil: LocationUtil
+ // 鍥剧墖鏂囨湰鍚堝苟宸ュ叿
private lateinit var imageMergeUtil: ImageMergeUtil
- override fun getLayoutId(): Int =R.layout.activity_camera
+ // 鎷嶆憚鍥剧墖缂撳瓨鍦板潃
+ private var photoPath = mutableListOf<String>()
+
+ // 鍥剧墖姘村嵃
+ private lateinit var logo: Bitmap
+
+ // 鍏佽鏈�澶у浘鐗囨媿鎽勬暟閲�
+ private var maxPic = 3
+
+ override fun getLayoutId(): Int = R.layout.activity_camera
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
+ initLogoBitmap()
initCamera()
initLocation()
+ img_cancel.setOnClickListener(this)
+ img_confirm.setOnClickListener(this)
+ img_thumbnail.setOnClickListener(this)
+// toggle(false)
+
+ maxPic = intent.getIntExtra("maxPic", 3)
+
+ onShootDone()
}
override fun onResume() {
- camera_view.start()
super.onResume()
+ camera_view.start()
}
override fun onPause() {
- camera_view.stop()
super.onPause()
+ camera_view.stop()
}
override fun onDestroy() {
- locationUtil.onDestroy()
super.onDestroy()
+ camera_view.destroy()
+ locationUtil.onDestroy()
+ }
+
+ private fun toggle(isShot: Boolean = true) {
+ if (isShot) {
+ cl_part1.visibility = View.GONE
+ cl_part2.visibility = View.VISIBLE
+ } else {
+ cl_part1.visibility = View.VISIBLE
+ cl_part2.visibility = View.GONE
+ }
+ }
+
+ private fun initLogoBitmap() {
+ logo = BitmapFactory.decodeResource(resources, R.mipmap.ic_logo)
}
private fun initCamera() {
imageMergeUtil = ImageMergeUtil(this)
+
+ // 鏍规嵁绯荤粺鎻愪緵鐨勫彲閫夊垎杈ㄧ巼锛岄�夋嫨鍜屽綋鍓嶆樉绀哄尯鍩熸渶鎺ヨ繎鐨�
+ camera_view.setPictureSize{
+ var min = -1//褰撳墠鍒嗚鲸鐜囦笌鏈�灏忓垎杈ㄧ巼鐨勯暱瀹藉垎鍒搴旂殑宸�肩殑鍜�
+
+// val screenWith = ScreenUtils.getScreenWidth(this)
+// val screenHeight = ScreenUtils.getScreenHeight(this)
+
+ val screenWith = camera_view.width
+ val screenHeight = camera_view.height
+
+ val resultList = mutableListOf<Size>()
+
+ it.forEach {size ->
+ if (size.width > screenWith) return@forEach
+
+ val w = abs(size.width - screenWith)
+ val h = abs(size.height - screenHeight)
+ if (min < 0) {
+ min = w + h
+ resultList.add(0, size)
+ }else if (w + h < min) {
+ min = w + h
+ resultList.add(0, size)
+ }
+ }
+ resultList
+ }
camera_view.addCameraListener(object : CameraListener() {
override fun onCameraOpened(options: CameraOptions) {
super.onCameraOpened(options)
- btn_shot.setOnClickListener(this@CameraActivity)
+ btn_shoot.setOnClickListener(this@CameraActivity)
}
override fun onPictureTaken(jpeg: ByteArray?) {
super.onPictureTaken(jpeg)
- val d = Observable.create<String> {
- jpeg?.let {
- var b = toBitmap(it)
- val x = txt_location.x - camera_view.x
- val y = txt_location.y - camera_view.y
- b?.let {bitmap ->
- b = imageMergeUtil.mergeText(bitmap, txt_location.text.toString(), Pair(x, y))
- // todo: 2020/5/31 淇濆瓨鍥剧墖
-// SystemServiceUtils.saveBitmap(0)
- }
+ camera_view.stop()
+ jpeg?.let {
+ toBitmap(it)?.let {b->
+ merge(b)
}
}
- val pathList = arrayListOf<String>()
- val intent = Intent()
- intent.putStringArrayListExtra(BaseTakePicActivity.EXTRA_SELECT_IMAGES, pathList)
- setResult(Activity.RESULT_OK, intent)
- onBackPressed()
}
override fun onCameraClosed() {
super.onCameraClosed()
- onBackPressed()
}
})
}
+ @SuppressLint("SetTextI18n")
private fun initLocation() {
locationUtil = LocationUtil(this)
locationUtil.startLocation {
val date = Date()
val time = DateFormatter.dateTimeFormat3.format(date)
- val locationInfo = "缁忓害: ${it.longitude}" +
- "\n绾害: ${it.latitude}" +
- "\n鍦板潃: ${it.address}" +
- "\n鏃堕棿: $time"
runOnUiThread {
- txt_location.text = locationInfo
+ txt_latitude.text = "缁忓害: ${round(it.longitude * 1000000) / 1000000}"
+ txt_longitude.text = "绾害: ${round(it.latitude * 1000000) / 1000000}"
+ txt_address.text = "鍦板潃: ${it.address}"
+ txt_time.text = "鏃堕棿: $time"
}
}
}
- override fun onClick(v: View?) {
- camera_view.capturePicture()
+ private fun merge(b: Bitmap) {
+ val d = Observable.create<Bitmap> { emitter ->
+ var newB: Bitmap
+ val width = camera_view.width
+ val height = camera_view.height
+
+ var x = txt_latitude.x - camera_view.x
+ var y = txt_latitude.y - camera_view.y
+ var xScale = x / width
+ var yScale = y / height
+ newB = imageMergeUtil.mergeText(b, txt_latitude, Pair(x, y), xScale, yScale)
+
+ x = txt_longitude.x - camera_view.x
+ y = txt_longitude.y - camera_view.y
+ xScale = x / width
+ yScale = y / height
+ newB = imageMergeUtil.mergeText(newB, txt_longitude, Pair(x, y), xScale, yScale)
+
+ x = txt_address.x - camera_view.x
+ y = txt_address.y - camera_view.y
+ xScale = x / width
+ yScale = y / height
+ newB = imageMergeUtil.mergeText(newB, txt_address, Pair(x, y), xScale, yScale)
+
+ x = txt_time.x - camera_view.x
+ y = txt_time.y - camera_view.y
+ xScale = x / width
+ yScale = y / height
+ newB = imageMergeUtil.mergeText(newB, txt_time, Pair(x, y), xScale, yScale)
+
+ newB = imageMergeUtil.addLogo(newB, logo)
+
+ // 缂撳瓨鍥剧墖
+ val path = Environment.getExternalStorageDirectory().path + "/FlightFeather/Temp/" + UUIDGenerator.generateUUID(4) + ".jpg"
+ photoPath.add(path)
+ SystemServiceUtils.saveBitmap(path, newB)
+
+ emitter.onNext(newB)
+ emitter.onComplete()
+ }.subscribeOn(Schedulers.io())
+ .observeOn(AndroidSchedulers.mainThread())
+ .subscribe {
+// toggle(true)
+
+ // 鎷嶆憚loading缁撴潫
+ onShootDone()
+
+ // 鍦ㄧ缉鐣ュ浘涓婃樉绀烘渶鏂颁竴寮犲浘鐗�, 骞舵洿鏂扮‘璁ゆ寜閽枃瀛楁樉绀�
+ img_thumbnail.setImageBitmap(it)
+ val t = "${getString(R.string.yes)}(${photoPath.size}/${maxPic})"
+ img_confirm.text = t
+ // 鍒ゆ柇鏄惁杈惧埌鍏佽鏈�澶у浘鐗囨暟閲�
+ if (photoPath.size == maxPic) {
+ // 寮瑰嚭鎻愮ず妗嗭紝纭鎴栬�呴噸鎷�
+ DialogUtil2.showAlertDialog2(this, "鏈�澶氭媿${maxPic}寮犵収鐗�", getString(R.string.yes), getString(R.string.reshoot), { d ->
+ d.dismiss()
+ onConfirm()
+ }, { d ->
+ d.dismiss()
+ onCancel()
+ camera_view.start()
+ })
+ } else {
+ camera_view.start()
+ }
+ }
+ disposableList.add(d)
}
private fun toBitmap(source: ByteArray): Bitmap? {
@@ -123,7 +251,7 @@
outputStream.write(source)
val exif = ExifInterface(file.absolutePath)
val exifOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION,
- ExifInterface.ORIENTATION_NORMAL)
+ ExifInterface.ORIENTATION_NORMAL)
orientation = ExifHelper.getOrientation(exifOrientation)
flip = exifOrientation == ExifInterface.ORIENTATION_FLIP_HORIZONTAL ||
exifOrientation == ExifInterface.ORIENTATION_FLIP_VERTICAL ||
@@ -146,7 +274,7 @@
matrix.setRotate(orientation.toFloat())
val temp = bitmap
bitmap = Bitmap.createBitmap(bitmap!!, 0, 0, bitmap.width,
- bitmap.height, matrix, true)
+ bitmap.height, matrix, true)
temp!!.recycle()
}
} catch (e: OutOfMemoryError) {
@@ -154,4 +282,76 @@
}
return bitmap
}
+
+ /**
+ * 纭杩斿洖
+ */
+ private fun onConfirm() {
+ if (photoPath.isEmpty()) return
+ val intent = Intent()
+ intent.putStringArrayListExtra(ImagePicker.EXTRA_SELECT_IMAGES, ArrayList(photoPath))
+ setResult(Activity.RESULT_OK, intent)
+ this.finish()
+ }
+
+ /**
+ * 鍙栨秷鎷嶆憚
+ */
+ private fun onCancel() {
+ photoPath.forEach {
+ val pic = File(it)
+ if (pic.exists()) pic.delete()
+ }
+ photoPath.clear()
+ img_thumbnail.setImageResource(R.drawable.bg_btngroup)
+ img_confirm.text = getString(R.string.yes)
+ }
+
+ /**
+ * 鐓х墖鎷嶆憚澶勭悊涓�
+ */
+ private fun onShooting() {
+ pro_shooting.visibility = View.VISIBLE
+ btn_shoot.isEnabled = false
+ }
+
+ /**
+ * 鐓х墖鎷嶆憚澶勭悊瀹屾瘯
+ */
+ private fun onShootDone() {
+ pro_shooting.visibility = View.GONE
+ btn_shoot.isEnabled = true
+ }
+
+ override fun onBackPressed() {
+ onCancel()
+ super.onBackPressed()
+ }
+
+ override fun onClick(v: View?) {
+ when (v?.id) {
+ R.id.btn_shoot -> {
+ onShooting()
+ camera_view.capturePicture()
+// capture()
+ }
+ // 鍙栨秷鎷嶆憚鐨勫浘鐗囧苟鍥為��
+ R.id.img_cancel -> {
+ onBackPressed()
+ }
+ //
+ R.id.img_confirm -> onConfirm()
+ R.id.img_thumbnail -> {
+ if (photoPath.isEmpty()) return
+ val fileList = mutableListOf<File>()
+ photoPath.forEach { fileList.add(File(it)) }
+ val intent = Intent(this, PhotoViewerActivity::class.java)
+ intent.putExtra("position", fileList.size - 1)
+ intent.putExtra("type", PhotoViewerActivity.EVIDENCE_PHOTO_TEMP)
+ intent.putExtra("deletable", false)
+ intent.putExtra(PhotoViewerActivity.PARA_FILES, fileList as Serializable)
+ startActivityForResult(intent, VIEW_PHOTO)
+ }
+ }
+ }
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchActivity.kt
new file mode 100644
index 0000000..d13b643
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchActivity.kt
@@ -0,0 +1,106 @@
+package cn.flightfeather.thirdappmodule.module.common
+
+import android.arch.lifecycle.ViewModelProviders
+import android.content.Intent
+import android.os.Bundle
+import android.text.Editable
+import android.text.TextWatcher
+import android.view.View
+import android.view.inputmethod.EditorInfo
+import cn.flightfeather.thirdappmodule.R
+import cn.flightfeather.thirdappmodule.bean.entity.Subtask
+import cn.flightfeather.thirdappmodule.module.base.BaseActivity
+import cn.flightfeather.thirdappmodule.module.inspection.InspectionDetailActivity
+import cn.flightfeather.thirdappmodule.util.Constant
+import cn.flightfeather.thirdappmodule.util.DateUtil
+import cn.flightfeather.thirdappmodule.util.Domain
+import cn.flightfeather.thirdappmodule.view.recyclerview.BaseCustomViewHolder
+import cn.flightfeather.thirdappmodule.view.recyclerview.MySection
+import cn.flightfeather.thirdappmodule.view.recyclerview.RecyclerViewPanel
+import com.chad.library.adapter.base.BaseQuickAdapter
+import com.chad.library.adapter.base.BaseViewHolder
+import kotlinx.android.synthetic.main.activity_search.*
+import kotlinx.android.synthetic.main.layout_search_title.*
+
+/**
+ * @author riku
+ * Date: 2022/2/17
+ */
+class SearchActivity : BaseActivity() {
+
+ private lateinit var searViewModel: SearchViewModel
+ private lateinit var recyclerViewPanel: RecyclerViewPanel<Subtask>
+
+ override fun getLayoutId(): Int = R.layout.activity_search
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ searViewModel = ViewModelProviders.of(this).get(SearchViewModel::class.java)
+
+ initClickListener()
+ initRecyclerView()
+ }
+
+ private fun initClickListener() {
+ // 鍥為��閿�
+ img_cancel.setOnClickListener { onBackPressed() }
+ // 鎼滅储娓呯┖鏂囨湰鎸夐挳
+ btn_clear.visibility = View.GONE
+ btn_clear.setOnClickListener { edt_search.setText("") }
+ // 鎼滅储妗�
+ autoShowKeyboard(edt_search)
+ edt_search.apply {
+ // 鈥滄悳绱⑩�濇寜閽洃鍚簨浠�
+ setOnEditorActionListener { v, actionId, _ ->
+ if (actionId == EditorInfo.IME_ACTION_SEARCH && !v.text.isNullOrBlank()) {
+ searViewModel.keyword = v.text.toString()
+ recyclerViewPanel.startRefresh()
+ hideKeyboard()
+ }
+ true
+ }
+ // 娓呯┖鏂囧瓧鎸夐挳鐨勬樉绀洪�昏緫
+ addTextChangedListener(object : TextWatcher {
+ override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) = Unit
+ override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) = Unit
+ override fun afterTextChanged(s: Editable?) {
+ btn_clear.visibility=if (s.isNullOrBlank()) View.GONE else View.VISIBLE
+ }
+ })
+ }
+
+ }
+
+ private fun initRecyclerView() {
+ recyclerViewPanel = object : RecyclerViewPanel<Subtask>(searViewModel.subtaskResult, recycler_view, this) {
+ override fun getItemLayoutId(): Int? = R.layout.item_task_list_2
+
+ override fun onBindView(holder: BaseCustomViewHolder, item: MySection<Subtask>?) {
+ item?.t?.let {s ->
+ val planStartTime = DateUtil.getYearMonthDayStr(s.planstarttime, true)
+
+ val names = s.executorrealtimes?.replace(Constant.CONNECTOR.toRegex(), Constant.CONNECTOR_FOR_VIEW)
+ holder.setText(R.id.tv_item_task_list_name, s.name)
+ .setText(R.id.tv_item_task_list_address, s.scenseaddress)
+ .setText(R.id.tv_item_task_list_time, planStartTime)
+ .setText(R.id.tv_task_staff, names)
+ when (s.status) {
+ Domain.TASK_STATUS_RUNNING -> holder.setImageResource(R.id.img_task_status, R.mipmap.ic_task_executing)
+ Domain.TASK_STATUS_FINISHED -> holder.setImageResource(R.id.img_task_status, R.mipmap.ic_task_complete)
+ else -> holder.setImageResource(R.id.img_task_status, R.mipmap.ic_task_ready_to_start)
+ }
+ }
+ }
+
+ override fun onItemClick(adapter: BaseQuickAdapter<Any?, BaseViewHolder>, view: View, position: Int, dataList: List<Subtask>) {
+ super.onItemClick(adapter, view, position, dataList)
+ val intent = Intent(this@SearchActivity, InspectionDetailActivity::class.java)
+ intent.putExtra("subTask", dataList[position])
+ startActivity(intent)
+ }
+ }.also {
+ it.init()
+ it.startRefresh()
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchViewModel.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchViewModel.kt
new file mode 100644
index 0000000..2f7ccdb
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchViewModel.kt
@@ -0,0 +1,42 @@
+package cn.flightfeather.thirdappmodule.module.common
+
+import cn.flightfeather.thirdappmodule.bean.entity.Subtask
+import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
+import cn.flightfeather.thirdappmodule.module.base.BaseViewModel
+import cn.flightfeather.thirdappmodule.repository.SearchRepository
+import cn.flightfeather.thirdappmodule.view.recyclerview.DataLoadModel
+
+/**
+ * @author riku
+ * Date: 2022/2/17
+ * 鏌ヨ鐣岄潰viewModel
+ */
+class SearchViewModel : BaseViewModel() {
+ private val searchRepository = SearchRepository()
+
+ // 鎼滅储瀛愪换鍔�
+ var keyword = ""// 鎼滅储鍏抽敭瀛�
+ val subtaskResult = object : DataLoadModel<Subtask>(application) {
+ override fun loadDataByRefresh() {
+ searchSubtask(keyword, 1, this)
+ }
+
+ override fun loadDataByLoadMore(page: Int) {
+ searchSubtask(keyword, page, this)
+ }
+ }
+
+ /**
+ * 鏍规嵁鍏抽敭瀛楁悳绱㈠瓙浠诲姟
+ * @param keyword 鍏抽敭璇�
+ * @param page 鍒嗛〉鏁�
+ * @param callBack 缁撴灉鍥炶皟鍑芥暟
+ */
+ fun searchSubtask(keyword: String, page: Int, callBack: ResultCallBack<List<Subtask>>) {
+ if (keyword.isEmpty()) {
+ callBack.onSuccess(emptyList())
+ } else {
+ searchRepository.searchSubtask(application.currentUser.guid, keyword, page, callBack)
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisOverViewFragment.kt
similarity index 99%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisOverViewFragment.kt
index 4cc4f6f..0d826de 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisOverViewFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis
+package cn.flightfeather.thirdappmodule.module.dataanalysis
import android.app.Dialog
import android.content.Context
@@ -26,7 +26,7 @@
import cn.flightfeather.thirdappmodule.bean.vo.TaskFrequencyVo
import cn.flightfeather.thirdappmodule.bean.vo.TaskFrequencyVo.FrequencyInfo
import cn.flightfeather.thirdappmodule.bean.vo.TaskVo
-import cn.flightfeather.thirdappmodule.dataanalysis.rank.AnalysisRankActivity
+import cn.flightfeather.thirdappmodule.module.dataanalysis.rank.AnalysisRankActivity
import cn.flightfeather.thirdappmodule.httpservice.ProblemListService
import cn.flightfeather.thirdappmodule.httpservice.TaskService
import cn.flightfeather.thirdappmodule.util.*
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisProblemFragment.kt
similarity index 99%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisProblemFragment.kt
index ae27241..f67d6a7 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisProblemFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis
+package cn.flightfeather.thirdappmodule.module.dataanalysis
import android.app.DatePickerDialog
import android.app.Dialog
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisTabActivity.kt
similarity index 98%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisTabActivity.kt
index e57c590..328856f 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisTabActivity.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis
+package cn.flightfeather.thirdappmodule.module.dataanalysis
import android.os.Bundle
import android.support.design.widget.TabLayout
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisFragment.kt
similarity index 98%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisFragment.kt
index 4e30c64..e5a3315 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis
+package cn.flightfeather.thirdappmodule.module.dataanalysis
import android.os.Bundle
import android.support.design.widget.NavigationView
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisProgressFragment.java b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisProgressFragment.java
similarity index 98%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisProgressFragment.java
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisProgressFragment.java
index fe284b5..626f5da 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisProgressFragment.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisProgressFragment.java
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis;
+package cn.flightfeather.thirdappmodule.module.dataanalysis;
import android.app.Dialog;
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisRankFragment.kt
similarity index 99%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisRankFragment.kt
index dbc67c8..6772238 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisRankFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis
+package cn.flightfeather.thirdappmodule.module.dataanalysis
import android.graphics.Color
import android.os.Bundle
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProblemDetailFragment.kt
similarity index 99%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProblemDetailFragment.kt
index f640227..74d16a5 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProblemDetailFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis
+package cn.flightfeather.thirdappmodule.module.dataanalysis
import android.app.Fragment
import android.graphics.Color
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProgressDetailFragment.kt
similarity index 99%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProgressDetailFragment.kt
index bce55fd..945c5e9 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProgressDetailFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis
+package cn.flightfeather.thirdappmodule.module.dataanalysis
import android.content.Context
import android.graphics.Color
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/TaskProgressAdapter.java b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/TaskProgressAdapter.java
similarity index 98%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/TaskProgressAdapter.java
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/TaskProgressAdapter.java
index 34f3946..ac3715e 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/TaskProgressAdapter.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/TaskProgressAdapter.java
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis;
+package cn.flightfeather.thirdappmodule.module.dataanalysis;
import android.content.Context;
import android.content.Intent;
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/packageinfo b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/packageinfo
similarity index 100%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/packageinfo
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/packageinfo
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/AnalysisRankActivity.kt
similarity index 98%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/AnalysisRankActivity.kt
index 9d266df..ff725d3 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/AnalysisRankActivity.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis.rank
+package cn.flightfeather.thirdappmodule.module.dataanalysis.rank
import android.graphics.Color
import android.os.Build
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/SceneRankContentFragment.kt
similarity index 97%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/SceneRankContentFragment.kt
index de9ed94..0578bc0 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/SceneRankContentFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis.rank
+package cn.flightfeather.thirdappmodule.module.dataanalysis.rank
import android.os.Bundle
import android.support.v4.app.Fragment
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/TownRankContentFragment.kt
similarity index 97%
rename from app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment.kt
rename to app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/TownRankContentFragment.kt
index 9989cb9..e99fa14 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/TownRankContentFragment.kt
@@ -1,4 +1,4 @@
-package cn.flightfeather.thirdappmodule.dataanalysis.rank
+package cn.flightfeather.thirdappmodule.module.dataanalysis.rank
import android.os.Bundle
import android.support.v4.app.Fragment
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/home/HomeFragment_scene.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/home/HomeFragment_scene.kt
index 41e3055..d7867f5 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/home/HomeFragment_scene.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/home/HomeFragment_scene.kt
@@ -22,7 +22,7 @@
import cn.flightfeather.thirdappmodule.bean.vo.RankVo.SceneRank
import cn.flightfeather.thirdappmodule.bean.vo.TaskVo
import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
-import cn.flightfeather.thirdappmodule.dataanalysis.AnalysisOverViewFragment.Companion.rankS
+import cn.flightfeather.thirdappmodule.module.dataanalysis.AnalysisOverViewFragment.Companion.rankS
import cn.flightfeather.thirdappmodule.httpservice.InspectionService
import cn.flightfeather.thirdappmodule.httpservice.TaskService
import cn.flightfeather.thirdappmodule.model.bean.NightWorkFileVo
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuCameraActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuCameraActivity.kt
index 6fd1f5c..50e25a0 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuCameraActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuCameraActivity.kt
@@ -43,6 +43,11 @@
const val BUSINESS_TYPE_CAMERA = 5
+/**
+ * @author riku
+ * Date: 2019/8/1
+ * 浠绘剰鎷嶇収
+ */
class MenuCameraActivity : BaseActivity() {
override fun getLayoutId(): Int = R.layout.dialog_camera_3
@@ -160,7 +165,7 @@
currentTypeName = title.text.toString()
//鎷嶇収
if (dataList[position].guid == null) {
- PhotoUtil.pickPhoto2(this@MenuCameraActivity, TAKE_PHOTO, 9)
+ PhotoUtil.pickPhoto(this@MenuCameraActivity, TAKE_PHOTO, 9)
}
//鏌ョ湅鍥剧墖
else {
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuChangeActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuChangeActivity.kt
index 42625ae..d21c16f 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuChangeActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuChangeActivity.kt
@@ -10,6 +10,11 @@
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
+/**
+ * @author riku
+ * Date: 2019/8/1
+ * 鏁存敼娓呭崟
+ */
class MenuChangeActivity : BaseProblemListActivity() {
override var viewHolderType: Int = ProblemListAdapter.PROBLEM_LIST
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt
index 2b13e15..bf1be53 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt
@@ -27,6 +27,11 @@
import java.io.IOException
import java.util.*
+/**
+ * @author riku
+ * Date: 2019/8/1
+ * 闂鎷嶇収鍙栬瘉
+ */
open class MenuEvidenceActivity : BaseTakePicActivity() {
override fun getLayoutId(): Int = R.layout.dialog_take_evidence
@@ -75,6 +80,7 @@
}
private fun initUI() {
+ // 闂绫诲瀷鍒濆鍖�
sp_take_evidence_select_problem_type.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onNothingSelected(parent: AdapterView<*>?) = Unit
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
@@ -93,6 +99,7 @@
}
}
+ // 鍏蜂綋闂鍒濆鍖�
sp_take_evidence_select_problem.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onNothingSelected(parent: AdapterView<*>?) = Unit
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
@@ -100,6 +107,7 @@
}
}
+ // 鎻愪氦闂鎸夐挳鍒濆鍖�
fab_take_evidence_ok.setOnClickListener {
val now = Date()
if (now.time - submitTime >= 1000) {
@@ -108,9 +116,29 @@
}
}
+ // 鍙栨秷鎻愪氦闂鎸夐挳鍒濆鍖�
fab_take_evidence_close.setOnClickListener {
finish()
}
+
+ // 澶囨敞鏍忎竴閿鍒跺叿浣撻棶棰樺姛鑳�
+ listOf(Pair(btn_copy_problem_des, et_take_evidence_problem_des)).forEach {
+ it.first.isSelected = false
+ it.first.setOnClickListener {v ->
+ if (v.isSelected) {
+ // 娓呯┖澶囨敞鏍忔枃鏈�
+ it.second.setText("")
+ v.isSelected = !v.isSelected
+ } else {
+ // 澶嶅埗褰撳墠閫夋嫨鐨勫叿浣撻棶棰�
+ val p = sp_take_evidence_select_problem.selectedItem
+ if (p is Problemtype) {
+ it.second.setText(p.name)
+ v.isSelected = !v.isSelected
+ }
+ }
+ }
+ }
}
open fun initObserver() {
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuNewGitActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuNewGitActivity.kt
index a1c96b1..fb77b24 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuNewGitActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuNewGitActivity.kt
@@ -39,6 +39,11 @@
import java.util.*
import kotlin.collections.ArrayList
+/**
+ * @author riku
+ * Date: 2019/8/1
+ * 鎶�闃叉帾鏂�
+ */
class MenuNewGitActivity : BaseTakePicActivity() {
override val picDeletable: Boolean = true
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemListActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemListActivity.kt
index f33aff9..16ebfda 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemListActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemListActivity.kt
@@ -9,6 +9,11 @@
import cn.flightfeather.thirdappmodule.util.DialogUtil2
import kotlinx.android.synthetic.main.dialog_problem_list.*
+/**
+ * @author riku
+ * Date: 2019/8/1
+ * 闂娓呭崟
+ */
class MenuProblemListActivity : BaseProblemListActivity() {
override var viewHolderType: Int = ProblemListAdapter.PROBLEM_LIST
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt
index 6ca501d..435ec0e 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt
@@ -62,14 +62,12 @@
when (requestCode) {
VIEW_PHOTO -> {
//鏌ョ湅涓存椂鎷嶆憚鍥剧墖鍙互鍒犻櫎
- data?.getIntExtra("position", -1)?.let {
+ data?.getIntExtra("position", -1)?.also {
val size = viewModel.mediaFileList.value?.size ?: 0
if (it > -1 && it < size) {
viewModel.mediaFileList.value?.get(it)?.let { m ->
deleteMediaFileList.add(m)
}
- } else {
- toast("瑕佸垹闄ょ殑鍥剧墖涓嶅瓨鍦�")
}
}
}
@@ -248,6 +246,12 @@
viewModel.deleteMediaFile(deleteMediaFileList)
}
+ /**
+ * 1. 鑷姩鍖归厤鍘熷厛閫夋嫨鐨勯棶棰�
+ * 2. 閫夋嫨闂绫诲瀷鍚庯紝鏇存柊鍏蜂綋闂涓嬫媺妗嗛�夐」
+ * 3. 鍚屾淇敼澶囨敞澶嶅埗鎸夐挳鐘舵��
+ *
+ */
private fun onProblemTypeSelected(position: Int) {
val problemType = viewModel.problemFatherType.value?.get(position)
viewModel.refreshProblems(problemType)
@@ -264,6 +268,8 @@
for (i in problemNameList.indices) {
if (problemNameList[i].name == originProblemName) {
sp_take_evidence_select_problem.setSelection(i)
+ // 鍒锋柊澶嶅埗鎸夐挳鐘舵��
+ btn_copy_problem_des.isSelected = true
break
}
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewSubTaskActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewSubTaskActivity.kt
index 7776e03..81274b6 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewSubTaskActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewSubTaskActivity.kt
@@ -40,7 +40,11 @@
lateinit var unSelectedSceneAdapter:AllRecyclerViewAdapter<Scense>
- override var translucent: Boolean = true
+ override var translucent: Boolean = false
+
+ override fun getLayoutId(): Int = R.layout.activity_new_sub_task
+
+ override fun getMapView(): MapView = map_view
open fun getViewMode():NewSubTaskViewModel = ViewModelProviders.of(this).get(NewSubTaskViewModel::class.java)
@@ -200,10 +204,6 @@
}
}
}
-
- override fun getLayoutId(): Int = R.layout.activity_new_sub_task
-
- override fun getMapView(): MapView = map_view
fun submitDialog() {
viewModel.generateTodayTask()
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewTopTaskActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewTopTaskActivity.kt
index 02011c9..dca080a 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewTopTaskActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewTopTaskActivity.kt
@@ -19,7 +19,7 @@
class NewTopTaskActivity : BaseMapActivity() {
override fun getMapView(): MapView = map_view
- override var translucent: Boolean = true
+ override var translucent: Boolean = false
var topTask: Task? = null
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.java b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.java
deleted file mode 100644
index 5517944..0000000
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.java
+++ /dev/null
@@ -1,605 +0,0 @@
-package cn.flightfeather.thirdappmodule.module.task;
-
-import android.app.AlertDialog;
-import android.arch.lifecycle.ViewModelProviders;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Toast;
-
-import com.ping.greendao.gen.ScenseDao;
-
-import org.greenrobot.greendao.query.QueryBuilder;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import cn.flightfeather.thirdappmodule.CommonApplication;
-import cn.flightfeather.thirdappmodule.R;
-import cn.flightfeather.thirdappmodule.activity.NewMonthTaskActivity;
-import cn.flightfeather.thirdappmodule.activity.ScenseMapActivity;
-import cn.flightfeather.thirdappmodule.activity.TaskActivity;
-import cn.flightfeather.thirdappmodule.adapter.RecyclerItemClickListener;
-import cn.flightfeather.thirdappmodule.adapter.TaskListAdapter;
-import cn.flightfeather.thirdappmodule.bean.entity.Scense;
-import cn.flightfeather.thirdappmodule.bean.entity.Subtask;
-import cn.flightfeather.thirdappmodule.bean.entity.Userinfo;
-import cn.flightfeather.thirdappmodule.bean.vo.TaskPack;
-import cn.flightfeather.thirdappmodule.bean.vo.TaskVo;
-import cn.flightfeather.thirdappmodule.common.net.ResultCallBack;
-import cn.flightfeather.thirdappmodule.httpservice.SubTaskService;
-import cn.flightfeather.thirdappmodule.httpservice.TaskService;
-import cn.flightfeather.thirdappmodule.util.CommonUtils;
-import cn.flightfeather.thirdappmodule.util.Constant;
-import cn.flightfeather.thirdappmodule.util.DateFormatter;
-import cn.flightfeather.thirdappmodule.util.Domain;
-import cn.flightfeather.thirdappmodule.util.UUIDGenerator;
-import cn.flightfeather.thirdappmodule.view.CircleProgressView;
-import okhttp3.ResponseBody;
-import retrofit2.Call;
-import retrofit2.Callback;
-import retrofit2.Response;
-import retrofit2.Retrofit;
-
-/**
- *
- */
-public class TaskFragment extends Fragment implements RecyclerItemClickListener.OnItemClickListener
- , View.OnClickListener {
-
- private int taskKindChoice = 1;
- private CommonApplication application;
- private Retrofit mRetrofit;
- private boolean requestAgain;
- private Map<String, List<TaskVo>> taskAllMapList = new HashMap<>();
- private boolean firstLoad = true;
- private String mCurYearMonth;
- private String mToday;
- private ArrayList<TaskVo> mTopClassTaskList = new ArrayList<>();
- private ArrayList<Subtask> mSubtaskList = new ArrayList<>();
- private ArrayList<TaskVo> mDayTaskList = new ArrayList<>();
- private CircleProgressView daytask_circleprogress;
- private CircleProgressView weektask_circleprogress;
- private CircleProgressView monthtask_circleprogress;
- private TaskListAdapter mAdapter;
- private View tv_no_task;
- private View view_waiting;
- private AlertDialog mCreateUnfixedScenseTaskDialog;
- private int mTopClassTaskChoice;
-
- private TaskViewModel taskViewModel;
-
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
-
- taskViewModel = ViewModelProviders.of(this).get(TaskViewModel.class);
-
- // Inflate the layout for this fragment
- return inflater.inflate(R.layout.fragment_task, container, false);
- }
-
- @Override
- public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
- initUI(view);
- initData();
- }
-
- /**
- * 鑾峰彇鏁版嵁
- */
- private void initData() {
- application = (CommonApplication) getActivity().getApplication();
- mRetrofit = application.getRetrofit();
- Date now = Calendar.getInstance().getTime();
- mCurYearMonth = DateFormatter.YearMonthFormat.format(now);
- mToday = DateFormatter.dateFormat2.format(now);
- getTodaySubTask();
- }
-
- private void initUI(View view) {
- ViewGroup rl_addTask = view.findViewById(R.id.rl_add_task);
- view.findViewById(R.id.rl_scense_map).setOnClickListener(this);
- view.findViewById(R.id.rl_add_scense).setOnClickListener(this);
- view.findViewById(R.id.day_task).setOnClickListener(this);
- view.findViewById(R.id.week_task).setOnClickListener(this);
- view.findViewById(R.id.month_task).setOnClickListener(this);
- view.findViewById(R.id.ll_container_taskadjust).setOnClickListener(this);
- view_waiting = view.findViewById(R.id.view_waiting);
- tv_no_task = view.findViewById(R.id.tv_no_task);
- RecyclerView mRecyclerView = (RecyclerView) view.findViewById(R.id.rv_container);
- LinearLayoutManager manager = new LinearLayoutManager(getActivity());
- mRecyclerView.setLayoutManager(manager);
- mAdapter = new TaskListAdapter(getActivity(), mSubtaskList);
- mAdapter.setShowDate(false);
- mRecyclerView.setAdapter(mAdapter);
- mRecyclerView.addOnItemTouchListener(new RecyclerItemClickListener(getActivity(), mRecyclerView, this));
- daytask_circleprogress = (CircleProgressView) view.findViewById(R.id.daytask_circleprogress);
- weektask_circleprogress = (CircleProgressView) view.findViewById(R.id.weektask_circleprogress);
- monthtask_circleprogress = (CircleProgressView) view.findViewById(R.id.monthtask_circleprogress);
-
- daytask_circleprogress.setRGB(83, 230, 149);
- weektask_circleprogress.setRGB(107, 191, 245);
- monthtask_circleprogress.setRGB(236, 120, 101);
-
- daytask_circleprogress.setProgress(0, 0);
- weektask_circleprogress.setProgress(0, 0);
- monthtask_circleprogress.setProgress(0, 0);
- rl_addTask.setOnClickListener(this);
- }
-
- private void getTodaySubTask() {
- view_waiting.setVisibility(View.VISIBLE);
- taskViewModel.getSubTaskByDate(new Date(), new ResultCallBack<List<Subtask>>() {
- @Override
- public void onPage(int current, int total) {
-
- }
-
- @Override
- public void onCacheSuccess(@org.jetbrains.annotations.Nullable List<Subtask> result) {
-
- }
-
- @Override
- public void onSuccess(@org.jetbrains.annotations.Nullable List<Subtask> result) {
- view_waiting.setVisibility(View.GONE);
- if (result != null) {
- refreshUI(result);
- }
- }
-
- @Override
- public void onFailure() {
- view_waiting.setVisibility(View.GONE);
- }
- });
- }
-
- /**
- * 鑾峰彇褰撳墠鏈堝強鍓嶅悗鏈堢殑浠诲姟淇℃伅
- *
- * @param yearMonth 骞存湀:渚嬶細2018-01
- * @param type Middle銆丩eft銆丷ight
- */
- private void getThreeMonthTask(final String yearMonth, final String type) {
- Call<List<TaskPack>> loadThreeMonthTasks = mRetrofit.create(TaskService.class).loadThreeMonthTasks(yearMonth, application.getCurrentUser().getGuid(), type);
- loadThreeMonthTasks.enqueue(new Callback<List<TaskPack>>() {
- @Override
- public void onResponse(@NonNull Call<List<TaskPack>> call, @NonNull Response<List<TaskPack>> response) {
- view_waiting.setVisibility(View.GONE);
- if (response.body() != null) {
- requestAgain = false;
- List<TaskPack> taskPackList = response.body();
- if (taskPackList != null && taskPackList.size() > 0) {
- for (TaskPack taskPack : taskPackList) {
- taskAllMapList.put(taskPack.getDate(), taskPack.getUpperTaskList());
- }
- if (firstLoad) {
- firstLoad = false;
-// showMonthAllTask(calendarCurrent);
- }
- invalidate();
- }
- } else if (response.errorBody() != null) {
- if (!requestAgain) {
- requestAgain = true;
- getThreeMonthTask(yearMonth, type);
- } else {
- Toast.makeText(application, "鑾峰彇浠诲姟淇℃伅鍑洪敊", Toast.LENGTH_SHORT).show();
-// showMonthAllTask(calendarCurrent);
- }
- System.out.println("ThreeMonthTask:" + response.errorBody());
- }
- }
-
- @Override
- public void onFailure(@NonNull Call<List<TaskPack>> call, @NonNull Throwable t) {
- if (!requestAgain) {
- requestAgain = true;
- getThreeMonthTask(yearMonth, type);
- } else {
- Toast.makeText(application, "缃戠粶閾炬帴澶辫触", Toast.LENGTH_SHORT).show();
-// showMonthAllTask(calendarCurrent);
- }
- System.out.println("ThreeMonthTask:" + t.toString());
- }
- });
- }
-
- private void refreshUI(List<Subtask> subTaskList) {
- mSubtaskList.clear();
- int subTaskTotalNumToday = 0;
- int subTaskFinishedNumToday = 0;
- for (Subtask subTask : subTaskList) {
- subTaskTotalNumToday++;
- if (subTask.getStatus().equals(Domain.TASK_STATUS_FINISHED)) {
- subTaskFinishedNumToday++;
- }
- mSubtaskList.add(subTask);
- }
-
- Subtask subtask = new Subtask();
- subtask.setPlanstarttime(new Date());
- subtask.setExtension1(String.valueOf(subTaskTotalNumToday));
- subtask.setExtension2(String.valueOf(subTaskFinishedNumToday));
- mSubtaskList.add(0, subtask);
-
- if (mSubtaskList.size() > 0) {
- mAdapter.notifyDataSetChanged();
- tv_no_task.setVisibility(View.GONE);
- }
- }
-
- /**
- * 閬嶅巻鑾峰彇鐨勬暟鎹紝鏇存柊鐣岄潰
- */
- private void invalidate() {
- mTopClassTaskList.clear();
- mDayTaskList.clear();
- mSubtaskList.clear();
- int daytaskTotalNumThisWeek = 0;
- int daytaskFinishedNumThisWeek = 0;
- int daytaskTotalNumThisMonth = 0;
- int daytaskFinishedNumThisMonth = 0;
- int subtaskTotalNumToday = 0;
- int subtaskFinishedNumToday = 0;
- for (TaskVo taskVo : taskAllMapList.get(mCurYearMonth)) {
- mTopClassTaskList.add(taskVo);
- for (TaskVo dayTaskVo : taskVo.getDaytaskList()) {
- daytaskTotalNumThisMonth++;
- mDayTaskList.add(dayTaskVo);
- long taskTime = dayTaskVo.getStarttime().getTime();
- long monday = CommonUtils.getTimesWeekmorning().getTime();
- long sunday = CommonUtils.getTimesWeeknight().getTime();
- if (taskTime >= monday && taskTime <= sunday) {
- daytaskTotalNumThisWeek++;
- if (dayTaskVo.getRuningstatus().equals(Domain.TASK_STATUS_FINISHED)) {
- daytaskFinishedNumThisWeek++;
- }
- }
- if (dayTaskVo.getRuningstatus().equals(Domain.TASK_STATUS_FINISHED)) {
- daytaskFinishedNumThisMonth++;
- }
- List<Subtask> subTaskList = dayTaskVo.getSubtaskList();
- for (Subtask subtask : subTaskList) {
- String subtaskStartTime = DateFormatter.dateFormat2.format(subtask.getPlanstarttime());
- if (subtaskStartTime.equals(mToday)) {
- subtaskTotalNumToday++;
- if (subtask.getStatus().equals(Domain.TASK_STATUS_FINISHED)) {
- subtaskFinishedNumToday++;
- }
- mSubtaskList.add(subtask);
- }
- }
- }
- }
- daytask_circleprogress.setProgress(subtaskFinishedNumToday, subtaskTotalNumToday);
- weektask_circleprogress.setProgress(daytaskFinishedNumThisWeek, daytaskTotalNumThisWeek);
- monthtask_circleprogress.setProgress(daytaskFinishedNumThisMonth, daytaskTotalNumThisMonth);
-
- if (mSubtaskList.size() > 0) {
- mAdapter.notifyDataSetChanged();
- tv_no_task.setVisibility(View.GONE);
- }
- }
-
- @Override
- public void onClick(View v) {
- int id = v.getId();
- if (id == R.id.rl_add_task) {
- showTaskKindDialog();
- } else if (id == R.id.rl_scense_map) {
- Intent intent1 = new Intent(getActivity(), ScenseMapActivity.class);
- ArrayList<Subtask> list = new ArrayList<>();
- if (!mSubtaskList.isEmpty()) {
- list.addAll(mSubtaskList.subList(1, mSubtaskList.size()));
- }
- intent1.putExtra(Constant.KEY_INTENT_TODAY_TASKLIST, list);
- getActivity().startActivityForResult(intent1, Constant.REQUESTCODE_FROM_TASKFRAGMENT);
- } else if (id == R.id.rl_add_scense) {
- startActivity(new Intent(getActivity(), SceneDetailActivity.class));
- } else if (id == R.id.day_task || id == R.id.week_task || id == R.id.month_task) {
- Intent intent = new Intent(getActivity(), TaskActivity.class);
- intent.putExtra(Constant.KEY_INTENT_TASK_PERIOD, v.getId());
- startActivity(intent);
- } else if (id == R.id.ll_container_taskadjust) {
- Intent intent2 = new Intent(getActivity(), MonthTaskManagementActivity.class);
- startActivity(intent2);
- }
- }
-
- /**
- * 鏄剧ず鏂板浠诲姟绫诲瀷锛氶《灞備换鍔°�佸瓙浠诲姟
- * @deprecated Use {@link #showTaskKindDialog_newType()}
- */
- @Deprecated
- private void showTaskKindDialog() {
- AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
- //鏃犲浐瀹氬満鏅贰鏌ヤ换鍔℃槸褰撲换鍔$被鍨嬩负宸℃煡鏃舵墠浣跨敤锛屾晠姝ゆ鏀捐閫夐」涓嶅悎閫傦紝鏆傛椂鍏堟斁姝ゅ
- final String[] items = {"椤跺眰浠诲姟", "瀛愪换鍔�", "鏃犲浐瀹氬満鏅贰鏌ヤ换鍔�"};
- builder.setTitle("閫夋嫨浠诲姟绫诲瀷");
- builder.setSingleChoiceItems(items, taskKindChoice,
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- taskKindChoice = which;
- }
- });
- builder.setPositiveButton("纭畾", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.dismiss();
- Intent intent;
- if (taskKindChoice < 2) {
- if (taskKindChoice == 0) {
- intent = new Intent(getActivity(), NewMonthTaskActivity.class);
- } else {
-// intent = new Intent(getActivity(), MOVMapActivity.class);
-// intent.putExtra(Constant.KEY_INTENT_MODE, MOVMapActivity.MODE_ADD_SUBTASK);
- intent = new Intent(getActivity(), NewSubTaskActivity.class);
- }
- startActivity(intent);
- } else {
- showCreateUnfixedScenseTaskDialog();
- }
-
- }
- });
- builder.create().show();
- }
-
- /**
- * 鏇存崲鏂版牱寮忕殑寮瑰嚭妗嗭紝鍔熻兘鏈慨鏀�
- * 鏄剧ず鏂板浠诲姟绫诲瀷锛氶《灞備换鍔°�佸瓙浠诲姟
- */
- private void showTaskKindDialog_newType() {
-
- }
-
- private void showCreateUnfixedScenseTaskDialog() {
- AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
- final ArrayList<TaskVo> list = new ArrayList<>();
- for (TaskVo taskVo : mTopClassTaskList) {
- if (taskVo.getExtension2() != null && taskVo.getExtension2().equals(Domain.UNFIXED_SCNESE_ALLOWED)) {
- list.add(taskVo);
- }
- }
- final String[] items = new String[list.size()];
- for (int i = 0; i < items.length; i++) {
- TaskVo taskVo = list.get(i);
- items[i] = taskVo.getName();
- }
- builder.setSingleChoiceItems(items, mTopClassTaskChoice,
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- mTopClassTaskChoice = which;
- }
- });
- builder.setPositiveButton("纭畾", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if (list.isEmpty()) {
- return;
- }
- showCheckTaskInfoDialog(list.get(mTopClassTaskChoice));
- }
- });
- mCreateUnfixedScenseTaskDialog = builder.create();
- mCreateUnfixedScenseTaskDialog.show();
- }
-
- private void showCheckTaskInfoDialog(final TaskVo taskVo) {
- AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
- builder.setTitle("鎻愮ず");
- builder.setMessage("褰撳墠閫変腑鐨勯《灞備换鍔′负" + taskVo.getName());
- builder.setPositiveButton("纭畾", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- createSubtask(taskVo);
- }
- });
- builder.create().show();
- }
-
- private void createSubtask(TaskVo topClassTask) {
- SubTaskService subtaskService = mRetrofit.create(SubTaskService.class);
- Subtask subtask = new Subtask();
- TaskVo currentDayTask = null;
- Calendar now = Calendar.getInstance();
- for (TaskVo taskVo : mDayTaskList) {
- if (taskVo.getTsguid().equals(topClassTask.getTguid())) {
- Calendar cal = Calendar.getInstance();
- cal.setTime(taskVo.getStarttime());
- if (now.get(Calendar.YEAR) == cal.get(Calendar.YEAR)
- && now.get(Calendar.MONTH) == cal.get(Calendar.MONTH)
- && now.get(Calendar.DAY_OF_MONTH) == cal.get(Calendar.DAY_OF_MONTH)) {
- currentDayTask = taskVo;
- break;
- }
- }
- }
- if (currentDayTask == null) {
- currentDayTask = createDayTask(topClassTask);
- callPutDayTask(topClassTask, subtaskService, subtask, currentDayTask, now);
- } else {
- callPutSubtask(topClassTask, subtaskService, subtask, currentDayTask, now);
- }
- }
-
- private void callPutSubtask(TaskVo topClassTask, SubTaskService subtaskService,
- final Subtask subtask, TaskVo currentDayTask, Calendar now) {
- subtask.setStguid(UUIDGenerator.generate16ShortUUID());
- subtask.setTguid(topClassTask.getTguid());
- subtask.setTsguid(currentDayTask.getTguid());
- subtask.setTypeno(topClassTask.getTypeno());
- subtask.setType(topClassTask.getTypename());
- subtask.setProvincecode(topClassTask.getProvincecode());
- subtask.setProvincename(topClassTask.getProvincename());
- subtask.setCitycode(topClassTask.getCitycode());
- subtask.setCityname(topClassTask.getCityname());
- subtask.setDistrictcode(topClassTask.getDistrictcode());
- subtask.setDistrictname(topClassTask.getDistrictname());
- subtask.setTowncode(topClassTask.getTowncode());
- subtask.setTownname(topClassTask.getTownname());
- QueryBuilder<Scense> qb = application.getDaoSession().getScenseDao().queryBuilder();
- Scense scense;
- if (subtask.getTowncode() == null) {
- scense = qb.where(ScenseDao.Properties.Provincecode.eq(subtask.getProvincecode())
- , ScenseDao.Properties.Citycode.eq(subtask.getCitycode())
- , ScenseDao.Properties.Districtcode.eq(subtask.getDistrictcode())
- , ScenseDao.Properties.Typeid.eq(Domain.SCENSETYPE_UNFIXED_SCENSE)).unique();
- } else {
- scense = qb.where(ScenseDao.Properties.Provincecode.eq(subtask.getProvincecode())
- , ScenseDao.Properties.Citycode.eq(subtask.getCitycode())
- , ScenseDao.Properties.Districtcode.eq(subtask.getDistrictcode())
- , ScenseDao.Properties.Towncode.eq(subtask.getTowncode())
- , ScenseDao.Properties.Typeid.eq(Domain.SCENSETYPE_UNFIXED_SCENSE)).unique();
- }
- subtask.setScenseid(scense.getGuid());
- subtask.setScensename(scense.getName());
- subtask.setDeploytime(now.getTime());
- subtask.setPlanstarttime(now.getTime());
- now.set(Calendar.HOUR_OF_DAY, 23);
- now.set(Calendar.MINUTE, 59);
- now.set(Calendar.SECOND, 59);
- subtask.setPlanendtime(now.getTime());
- Userinfo currentUser = application.getCurrentUser();
- subtask.setDeployerguid(currentUser.getGuid());
- subtask.setDeployerrealname(currentUser.getRealname());
- subtask.setDeployerusername(currentUser.getAcountname());
- subtask.setExecutorguids(currentUser.getGuid());
- subtask.setExecutorrealtimes(currentUser.getRealname());
- subtask.setExecutorusernames(currentUser.getAcountname());
- subtask.setStatus(Domain.TASK_STATUS_WAITING);
- String template = "%s%s鐨�%s鏃犲浐瀹氬満鏅贰鏌�";
- String area;
- if (subtask.getTownname() == null) {
- area = subtask.getCityname() + subtask.getDistrictname();
- } else {
- area = subtask.getCityname() + subtask.getDistrictname() + subtask.getTownname();
- }
- subtask.setName(String.format(Locale.CHINA, template
- , DateFormatter.dateTimeFormat_month_2_minute.format(subtask.getPlanstarttime())
- , subtask.getExecutorrealtimes(), area));
- Call<ResponseBody> call = subtaskService.putSubTask(subtask);
- call.enqueue(new Callback<ResponseBody>() {
- @Override
- public void onResponse(@NonNull Call<ResponseBody> call, @NonNull Response<ResponseBody> response) {
- if (response.body() != null) {
- Toast.makeText(getActivity(), "瀛愪换鍔″垱寤烘垚鍔熴��", Toast.LENGTH_SHORT).show();
- showTurnToInspectionDialog(subtask);
- } else if (response.errorBody() != null) {
- Toast.makeText(getActivity(), "瀛愪换鍔″垱寤哄け璐ャ��", Toast.LENGTH_SHORT).show();
- }
- }
-
- @Override
- public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) {
- Toast.makeText(getActivity(), "鎺ュ彛璋冪敤澶辫触銆�", Toast.LENGTH_SHORT).show();
- }
- });
- }
-
- private void showTurnToInspectionDialog(final Subtask subtask) {
- new AlertDialog.Builder(getActivity()).setTitle("鎻愮ず")
- .setMessage("瀛愪换鍔″垱寤烘垚鍔燂紝鍓嶅線鎵ц锛�")
- .setNegativeButton(R.string.cancel, null)
- .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.cancel();
- if (subtask != null) {
- Intent intent = new Intent("cn.flightfeather.thirdapp.broadcasereceiver.MainReceiver");
- try {
- intent.putExtra("subtask", subtask);
-// Log.e("鏁版嵁锛侊紒", intent.getStringExtra("subtask"));
- intent.setAction(Constant.GOTOSUBTASK);
-// getActivity().switchSelectedFragment(ll_inspection);
- getActivity().sendBroadcast(intent);
- } catch (NullPointerException e) {
- e.printStackTrace();
- }
- }
- }
- }).show();
- }
-
- private TaskVo createDayTask(TaskVo topClassTask) {
- TaskVo dayTask = topClassTask.clone();
- dayTask.setTguid(UUIDGenerator.generate16ShortUUID());
- dayTask.setTsguid(topClassTask.getTguid());
- dayTask.setDeadlinetype(null);
- dayTask.setExtension1(null);
- dayTask.setLevelnum(null);
- Calendar cal = Calendar.getInstance();
- dayTask.setSettime(cal.getTime());
- cal.set(Calendar.HOUR_OF_DAY, 0);
- cal.set(Calendar.MINUTE, 0);
- cal.set(Calendar.SECOND, 0);
- dayTask.setStarttime(cal.getTime());
- cal.set(Calendar.HOUR_OF_DAY, 23);
- cal.set(Calendar.MINUTE, 59);
- cal.set(Calendar.SECOND, 59);
- dayTask.setEndtime(cal.getTime());
- dayTask.setPlannerguid(application.getCurrentUser().getGuid());
- dayTask.setPlannerusername(application.getCurrentUser().getAcountname());
- dayTask.setPlannerrealname(application.getCurrentUser().getRealname());
- dayTask.setT1stverifierguid(application.getCurrentUser().getGuid());
- dayTask.setT1stverifierusername(application.getCurrentUser().getAcountname());
- dayTask.setT1stverifierrealname(application.getCurrentUser().getRealname());
- String template = "%d鏈�%d鏃�%s鏃犲浐瀹氬満鏅贰鏌ヤ换鍔�";
- cal.setTime(dayTask.getStarttime());
- String area = dayTask.getCityname()+dayTask.getDistrictname();
- dayTask.setName(String.format(Locale.CHINA, template, cal.get(Calendar.MONTH)+1,
- cal.get(Calendar.DAY_OF_MONTH), area));
- return dayTask;
- }
-
- private void callPutDayTask(final TaskVo topClassTask, final SubTaskService subtaskService,
- final Subtask subtask, final TaskVo currentDayTask, final Calendar now) {
- Call<ResponseBody> call = mRetrofit.create(TaskService.class).putTask(currentDayTask.taskVo2Task());
- call.enqueue(new Callback<ResponseBody>() {
- @Override
- public void onResponse(@NonNull Call<ResponseBody> call, @NonNull Response<ResponseBody> response) {
- if (response.body() != null) {
- Toast.makeText(getActivity(), "鏃ヤ换鍔″垱寤烘垚鍔熴��", Toast.LENGTH_SHORT).show();
- callPutSubtask(topClassTask, subtaskService, subtask, currentDayTask, now);
- } else if (response.errorBody() != null) {
- Toast.makeText(getActivity(), "鏃ヤ换鍔″垱寤哄け璐ャ��", Toast.LENGTH_SHORT).show();
- }
- }
-
- @Override
- public void onFailure(@NonNull Call<ResponseBody> call, @NonNull Throwable t) {
- Toast.makeText(getActivity(), "鏃ヤ换鍔″垱寤哄け璐ャ��", Toast.LENGTH_SHORT).show();
- }
- });
- }
-
- @Override
- public void onItemClick(View view, int position) {
-
- }
-
- @Override
- public void onItemLongClick(View view, int position) {
-
- }
-}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.kt
new file mode 100644
index 0000000..0c9f9fd
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.kt
@@ -0,0 +1,298 @@
+package cn.flightfeather.thirdappmodule.module.task
+
+import android.annotation.SuppressLint
+import android.app.AlertDialog
+import android.arch.lifecycle.Observer
+import android.arch.lifecycle.ViewModelProviders
+import android.content.DialogInterface
+import android.content.Intent
+import android.os.Bundle
+import android.support.v4.app.Fragment
+import android.support.v7.widget.LinearLayoutManager
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import cn.flightfeather.thirdappmodule.CommonApplication
+import cn.flightfeather.thirdappmodule.R
+import cn.flightfeather.thirdappmodule.activity.NewMonthTaskActivity
+import cn.flightfeather.thirdappmodule.activity.ScenseMapActivity
+import cn.flightfeather.thirdappmodule.activity.UploadMediaFilesActivity
+import cn.flightfeather.thirdappmodule.adapter.AllRecyclerViewAdapter
+import cn.flightfeather.thirdappmodule.adapter.TaskListAdapter
+import cn.flightfeather.thirdappmodule.bean.entity.Subtask
+import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
+import cn.flightfeather.thirdappmodule.module.common.SearchActivity
+import cn.flightfeather.thirdappmodule.module.inspection.InspectionDetailActivity
+import cn.flightfeather.thirdappmodule.module.inspection.InspectionViewModel
+import cn.flightfeather.thirdappmodule.util.Constant
+import cn.flightfeather.thirdappmodule.util.DateUtil
+import cn.flightfeather.thirdappmodule.util.Domain
+import kotlinx.android.synthetic.main.fragment_task.*
+import java.util.*
+
+/**
+ *
+ */
+class TaskFragment : Fragment(), View.OnClickListener {
+ private var taskKindChoice = 1
+
+ private val mSubtaskList = ArrayList<Subtask>()
+ private var mAdapter: TaskListAdapter? = null
+
+ private val unCompleteSubtaskList = ArrayList<Subtask>()
+ private var mAdapter2: AllRecyclerViewAdapter<Subtask>? = null
+
+ private var btnList = mutableListOf<View>()
+ private lateinit var taskViewModel: TaskViewModel
+ private lateinit var inspectionViewModel: InspectionViewModel
+
+ override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
+ taskViewModel = ViewModelProviders.of(this).get(TaskViewModel::class.java)
+ inspectionViewModel = ViewModelProviders.of(this).get(InspectionViewModel::class.java)
+ return inflater.inflate(R.layout.fragment_task, container, false)
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+ initUI()
+ initData()
+ initObserver()
+ }
+
+ /**
+ * 鑾峰彇鏁版嵁
+ */
+ private fun initData() {
+ fetchTodaySubTask()
+ fetchTaskRemind()
+ }
+
+ private fun initUI() {
+ // 鎼滅储妗�
+ tv_search.setOnClickListener(this)
+
+ // 搴曢儴鍔熻兘鎸夐挳
+ rl_add_task.setOnClickListener(this)
+ rl_add_scense.setOnClickListener(this)
+ rl_scense_map.setOnClickListener(this)
+
+ // 涓棿浠婃棩浠诲姟鐩稿叧鍔熻兘鎸夐挳
+ ll_container_todytask.isSelected = true
+ ll_container_todytask.setOnClickListener(this)
+ rl_container_taskremind.setOnClickListener(this)
+ ll_container_taskadjust.setOnClickListener(this)
+ btnList.addAll(listOf(ll_container_todytask, rl_container_taskremind))
+
+ // "浠诲姟鎻愰啋"鐣岄潰
+ cl_un_upload_pic.setOnClickListener(this)
+ img_tip.visibility = View.GONE
+ img_tip_2.visibility = View.GONE
+
+ // 鈥滀粖鏃ヤ换鍔♀�濈晫闈�
+ val manager = LinearLayoutManager(activity)
+ rv_container.layoutManager = manager
+ mAdapter = TaskListAdapter(activity, mSubtaskList)
+ mAdapter!!.setShowDate(false)
+ rv_container.adapter = mAdapter
+
+ v_today_task.visibility = View.VISIBLE
+ v_task_remind.visibility = View.GONE
+ }
+
+ private fun initObserver() {
+ // 鏈湴鍥剧墖鏈笂浼�
+ inspectionViewModel.hasUnUploadImage.observe(this, Observer {
+ it?.let {onHasUnUploadImg(it)}
+ })
+ }
+
+ /**
+ * 鑾峰彇浠婃棩鎵�鏈変汉鐨勫瓙浠诲姟
+ */
+ private fun fetchTodaySubTask() {
+ view_waiting.visibility = View.VISIBLE
+// val date = Date(Date().time - 24 * 60 * 60 * 1000)
+ taskViewModel.getSubTaskByDate(Date(), object : ResultCallBack<List<Subtask>> {
+ override fun onSuccess(result: List<Subtask>?) {
+ view_waiting.visibility = View.GONE
+ result?.let { refreshTodaySubtask(it) }
+ }
+
+ override fun onFailure() {
+ view_waiting.visibility = View.GONE
+ }
+ })
+ }
+
+ /**
+ * 鑾峰彇浠诲姟鎻愰啋
+ */
+ private fun fetchTaskRemind() {
+ // 鏈湴鍥剧墖鏈笂浼�
+ inspectionViewModel.checkUnUploadImage()
+ // 褰撳墠鐢ㄦ埛鏈夋湭瀹屾垚鐨勪换鍔�
+ }
+
+ /**
+ * 鏍规嵁瀛愪换鍔″埛鏂扮晫闈�
+ */
+ @SuppressLint("NotifyDataSetChanged")
+ private fun refreshTodaySubtask(subTaskList: List<Subtask>) {
+ mSubtaskList.clear()
+ unCompleteSubtaskList.clear()
+ var subTaskTotalNumToday = 0
+ var subTaskFinishedNumToday = 0
+ for (subTask in subTaskList) {
+ subTaskTotalNumToday++
+ if (subTask.status == Domain.TASK_STATUS_FINISHED) {
+ subTaskFinishedNumToday++
+ } else {
+ if (subTask.executorguids.contains(CommonApplication.getInstance().currentUser.guid)) {
+ unCompleteSubtaskList.add(subTask)
+ }
+ }
+ mSubtaskList.add(subTask)
+ }
+ val subtask = Subtask()
+ subtask.planstarttime = Date()
+ subtask.extension1 = subTaskTotalNumToday.toString()
+ subtask.extension2 = subTaskFinishedNumToday.toString()
+ mSubtaskList.add(0, subtask)
+ mAdapter!!.notifyDataSetChanged()
+ if (mSubtaskList.size > 1) {
+ tv_no_task!!.visibility = View.GONE
+ }
+
+ onUnCompleteTask()
+
+ }
+
+ /**
+ * 褰撴煡璇㈠埌鏈夋湭涓婁紶鐨勫浘鐗囨椂锛屽埛鏂扮晫闈�
+ */
+ private fun onHasUnUploadImg(hasOrNot: Boolean) {
+ if (hasOrNot) {
+ img_tip.visibility = View.VISIBLE
+ img_tip_2.visibility = View.VISIBLE
+ tv_un_upload_pic.text = "鏈湴鏈夋湭涓婁紶鍥剧墖"
+ } else {
+ img_tip.visibility = View.GONE
+ img_tip_2.visibility = View.GONE
+ tv_un_upload_pic.text = "鏈湴鍥剧墖宸插叏閮ㄤ笂浼�"
+ }
+ }
+
+ /**
+ * 褰撳瓨鍦ㄦ湁鏈畬鎴愮殑浠诲姟鏃讹紝鍒锋柊鐣岄潰
+ */
+ @SuppressLint("SetTextI18n", "NotifyDataSetChanged")
+ private fun onUnCompleteTask() {
+ if (mAdapter2 == null) {
+ mAdapter2 = object : AllRecyclerViewAdapter<Subtask>(unCompleteSubtaskList, R.layout.item_task_list_2 , activity) {
+ override fun bindView(holder: MyViewHolder?, obj: Subtask?, isSelected: Boolean, position: Int) {
+ var planStartTime = DateUtil.getHourMinStr(obj?.planstarttime)
+ if (planStartTime == "00:00") {
+ planStartTime = "鍏ㄥぉ"
+ }
+
+ val names = obj?.executorrealtimes?.replace(Constant.CONNECTOR.toRegex(), Constant.CONNECTOR_FOR_VIEW)
+ holder?.setText(R.id.tv_item_task_list_name, obj?.name)
+ ?.setText(R.id.tv_item_task_list_address, obj?.scenseaddress)
+ ?.setText(R.id.tv_item_task_list_time, planStartTime)
+ ?.setText(R.id.tv_task_staff, names)
+ when (obj?.status) {
+ Domain.TASK_STATUS_RUNNING -> holder?.setImageResource(R.id.img_task_status, R.mipmap.ic_task_executing)
+ Domain.TASK_STATUS_FINISHED -> holder?.setImageResource(R.id.img_task_status, R.mipmap.ic_task_complete)
+ else -> holder?.setImageResource(R.id.img_task_status, R.mipmap.ic_task_ready_to_start)
+ }
+
+ holder?.setOnItemClickListener {
+ val intent = Intent(activity, InspectionDetailActivity::class.java)
+ intent.putExtra("subTask", obj)
+ startActivity(intent)
+ }
+ }
+ }
+ rv_un_complete_task.adapter = mAdapter2
+ rv_un_complete_task.layoutManager = LinearLayoutManager(activity)
+ }
+ mAdapter2?.notifyDataSetChanged()
+ tv_task_num.text = "${unCompleteSubtaskList.size}涓�"
+ }
+
+ override fun onClick(v: View) {
+ when (v.id) {
+ // 璺宠浆鎼滅储鐣岄潰
+ R.id.tv_search -> {
+ val intent = Intent(activity, SearchActivity::class.java)
+ startActivity(intent)
+ }
+ R.id.rl_add_task -> {
+ showTaskKindDialog()
+ }
+ R.id.rl_scense_map -> {
+ val intent1 = Intent(activity, ScenseMapActivity::class.java)
+ val list = ArrayList<Subtask>()
+ if (mSubtaskList.isNotEmpty()) {
+ list.addAll(mSubtaskList.subList(1, mSubtaskList.size))
+ }
+ intent1.putExtra(Constant.KEY_INTENT_TODAY_TASKLIST, list)
+ activity!!.startActivityForResult(intent1, Constant.REQUESTCODE_FROM_TASKFRAGMENT)
+ }
+ R.id.rl_add_scense -> {
+ startActivity(Intent(activity, SceneDetailActivity::class.java))
+ }
+// R.id.day_task, R.id.week_task, R.id.month_task -> {
+// val intent = Intent(activity, TaskActivity::class.java)
+// intent.putExtra(Constant.KEY_INTENT_TASK_PERIOD, v.id)
+// startActivity(intent)
+// }
+ R.id.ll_container_taskadjust -> {
+ val intent2 = Intent(activity, MonthTaskManagementActivity::class.java)
+ startActivity(intent2)
+ }
+ R.id.ll_container_todytask -> {
+ btnList.forEach { it.isSelected = false }
+ v.isSelected = true
+ v_today_task.visibility = View.VISIBLE
+ v_task_remind.visibility = View.GONE
+ fetchTodaySubTask()
+ }
+ R.id.rl_container_taskremind -> {
+ btnList.forEach { it.isSelected = false }
+ v.isSelected = true
+ v_today_task.visibility = View.GONE
+ v_task_remind.visibility = View.VISIBLE
+ }
+ R.id.cl_un_upload_pic -> {
+ val intent = Intent(activity, UploadMediaFilesActivity::class.java)
+ startActivity(intent)
+ }
+
+ }
+ }
+
+ /**
+ * 鏄剧ず鏂板浠诲姟绫诲瀷锛氶《灞備换鍔°�佸瓙浠诲姟
+ */
+ private fun showTaskKindDialog() {
+ val builder = AlertDialog.Builder(context)
+ //鏃犲浐瀹氬満鏅贰鏌ヤ换鍔℃槸褰撲换鍔$被鍨嬩负宸℃煡鏃舵墠浣跨敤锛屾晠姝ゆ鏀捐閫夐」涓嶅悎閫傦紝鏆傛椂鍏堟斁姝ゅ
+ val items = arrayOf("椤跺眰浠诲姟", "瀛愪换鍔�")
+ builder.setTitle("閫夋嫨浠诲姟绫诲瀷")
+ builder.setSingleChoiceItems(
+ items, taskKindChoice
+ ) { dialog: DialogInterface?, which: Int -> taskKindChoice = which }
+ builder.setPositiveButton("纭畾") { dialog: DialogInterface, which: Int ->
+ dialog.dismiss()
+ val intent: Intent = if (taskKindChoice == 0) {
+ Intent(activity, NewMonthTaskActivity::class.java)
+ } else {
+ Intent(activity, NewSubTaskActivity::class.java)
+ }
+ startActivity(intent)
+ }
+ builder.create().show()
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskViewModel.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskViewModel.kt
index fea06d2..3970da3 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskViewModel.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskViewModel.kt
@@ -1,24 +1,17 @@
package cn.flightfeather.thirdappmodule.module.task
import android.arch.lifecycle.MutableLiveData
-import android.widget.Toast
import cn.flightfeather.thirdappmodule.bean.entity.Domainitem
import cn.flightfeather.thirdappmodule.bean.entity.Subtask
import cn.flightfeather.thirdappmodule.bean.vo.ProblemDetailVo
import cn.flightfeather.thirdappmodule.bean.vo.TaskVo
import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
-import cn.flightfeather.thirdappmodule.httpservice.SubTaskService
-import cn.flightfeather.thirdappmodule.httpservice.TaskService
import cn.flightfeather.thirdappmodule.module.base.BaseViewModel
import cn.flightfeather.thirdappmodule.repository.ProblemRepository
import cn.flightfeather.thirdappmodule.repository.SubTaskRepository
import cn.flightfeather.thirdappmodule.repository.TaskRepository
import cn.flightfeather.thirdappmodule.util.Constant
import cn.flightfeather.thirdappmodule.util.DateFormatter
-import cn.flightfeather.thirdappmodule.util.Domain
-import cn.flightfeather.thirdappmodule.util.UUIDGenerator
-import com.ping.greendao.gen.ScenseDao
-import okhttp3.ResponseBody
import java.util.*
import kotlin.collections.ArrayList
@@ -35,20 +28,25 @@
private val taskRepository = TaskRepository()
private val subTaskRepository = SubTaskRepository()
private val problemRepository = ProblemRepository()
+ private val allTopTaskList = ArrayList<TaskVo>()// 绯荤粺涓墍鏈夋�讳换鍔�
+ private val problemMap = mutableMapOf<String, MutableList<String>>()// 闂绫诲瀷涓庡叿浣撻棶棰�
+ /**涓存椂浠诲姟鍔熻兘涓庝换鍔′俊鎭鍑哄姛鑳�***************************************************************************/
+ // 鎬讳换鍔$被鍨�
val allTaskTypeList = MutableLiveData<ArrayList<Domainitem>>().apply { value = ArrayList() }
-
+ // 褰撳墠绛涢�夋潯浠朵笅鐨勬�讳换鍔�
val topTaskList = MutableLiveData<ArrayList<TaskVo>>().apply { value = ArrayList() }
-
- val allTopTaskList = ArrayList<TaskVo>()
-
+ // 闂绫诲瀷
val problemTypeList = MutableLiveData<ArrayList<String>>().apply { value = ArrayList() }
-
+ // 鍏蜂綋闂
val problemDetailList = MutableLiveData<ArrayList<String>>().apply { value = ArrayList() }
+ // 瀛愪换鍔d涓庡悕绉�
+ val subTaskNameList = MutableLiveData<ArrayList<Pair<String, String>>>().apply { value = ArrayList() }
+ /***********************************************************************************************************/
- val problemMap = mutableMapOf<String, MutableList<String>>()
-
- val subTaskList = MutableLiveData<ArrayList<Pair<String, String>>>().apply { value = ArrayList() }
+ /**浠诲姟鍒惰銆佷换鍔℃彁閱掔浉鍏�***********************************************************************************/
+
+ /***********************************************************************************************************/
fun getTaskType() {
taskRepository.getTaskType(object : ResultCallBack<List<Domainitem>> {
@@ -176,11 +174,11 @@
subTaskRepository.getByTopTaskAndDate(topTaskId,startTime,endTime, object : ResultCallBack<List<Subtask>> {
override fun onSuccess(result: List<Subtask>?) {
result?.let {
- subTaskList.value?.clear()
+ subTaskNameList.value?.clear()
it.forEach {s ->
- subTaskList.value?.add(Pair(s.stguid, s.name))
+ subTaskNameList.value?.add(Pair(s.stguid, s.name))
}
- subTaskList.value = subTaskList.value
+ subTaskNameList.value = subTaskNameList.value
}
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/SearchRepository.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/SearchRepository.kt
index 4e1b569..bdf08bd 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/SearchRepository.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/SearchRepository.kt
@@ -1,9 +1,12 @@
package cn.flightfeather.thirdappmodule.repository
+import cn.flightfeather.thirdappmodule.bean.entity.Subtask
import cn.flightfeather.thirdappmodule.common.net.NetWorkProgressListener
import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
+import cn.flightfeather.thirdappmodule.common.net.ResultObserver
import cn.flightfeather.thirdappmodule.common.net.RetrofitFactory
import cn.flightfeather.thirdappmodule.httpservice.SearchService
+import cn.flightfeather.thirdappmodule.model.bean.BaseResponse
import cn.flightfeather.thirdappmodule.model.bean.ExcelConfigVo
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
@@ -16,6 +19,8 @@
*/
class SearchRepository {
+ val retrofit = RetrofitFactory.instance.retrofit
+
fun getExcel(excelConfigVo: ExcelConfigVo, resultCallBack: ResultCallBack<Response<ResponseBody>>, listener: NetWorkProgressListener? = null) {
val service = RetrofitFactory.withProgressListeningRetrofit(listener).create(SearchService::class.java)
.getExcel(excelConfigVo)
@@ -27,4 +32,23 @@
resultCallBack.onFailure()
})
}
+
+ fun searchSubtask(userId: String, keyword: String, page: Int, resultCallBack: ResultCallBack<List<Subtask>>) {
+ val service = retrofit.create(SearchService::class.java).searchSubtask(userId, keyword, page)
+
+ RetrofitFactory.executeResult(service, object : ResultObserver<BaseResponse<List<Subtask>>>() {
+ override fun onSuccess(result: BaseResponse<List<Subtask>>?) {
+ resultCallBack.onSuccess(result?.data)
+ }
+
+ override fun onPage(current: Int, total: Int) {
+ super.onPage(current, total)
+ resultCallBack.onPage(current, total)
+ }
+
+ override fun onFailure(e: Throwable, isNetWorkError: Boolean) {
+ resultCallBack.onFailure()
+ }
+ })
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/util/DialogUtil2.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/util/DialogUtil2.kt
index f1bad8e..0a6dff3 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/util/DialogUtil2.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/util/DialogUtil2.kt
@@ -71,6 +71,41 @@
}
}
+ fun showAlertDialog2(
+ context: Context?,
+ content: String,
+ pStr: String? = null,
+ nStr: String? = null,
+ onConfirmed: (dialog: Dialog) -> Unit = { it.dismiss() },
+ onCanceled: (dialog: Dialog) -> Unit = { it.dismiss() }
+ ): Dialog? {
+ val view = LayoutInflater.from(context).inflate(R.layout.dialog_alert_2, null)
+ return context?.let {
+ Dialog(it).apply {
+ setCancelable(false)
+ setCanceledOnTouchOutside(false)
+ setContentView(view)
+ view.findViewById<TextView>(R.id.tv_dialog_content).text = content
+ view.findViewById<TextView>(R.id.tv_positive).let {t ->
+ pStr?.let { p -> t.text = p }
+ t.setOnClickListener { onConfirmed(this) }
+ }
+ view.findViewById<TextView>(R.id.tv_neutral).let {t ->
+ nStr?.let { n -> t.text = n }
+ t.setOnClickListener { onCanceled(this) }
+ }
+ window?.attributes?.apply {
+ gravity = Gravity.CENTER
+ width = (ScreenUtils.getScreenWidth(context) * 0.8).toInt()
+ windowAnimations = R.style.dialog_anim_style
+ }
+ window?.setBackgroundDrawableResource(android.R.color.transparent)
+ window?.setGravity(Gravity.CENTER)
+ show()
+ }
+ }
+ }
+
fun showBottomDialog(
activity: Activity?,
anchorView: View,
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/util/location/LocationUtil.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/util/location/LocationUtil.kt
index 6eac707..4e38776 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/util/location/LocationUtil.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/util/location/LocationUtil.kt
@@ -25,7 +25,7 @@
val mLocationOption = AMapLocationClientOption().apply {
isNeedAddress = true
locationMode = AMapLocationClientOption.AMapLocationMode.Hight_Accuracy
- interval = 2000
+ interval = 1000
}
mLocationClient.setLocationOption(mLocationOption)
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/ImageMergeUtil.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/ImageMergeUtil.kt
index d1a6a81..8fae237 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/ImageMergeUtil.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/ImageMergeUtil.kt
@@ -6,12 +6,15 @@
import android.os.Build
import android.support.annotation.ColorInt
import android.util.DisplayMetrics
+import android.widget.TextView
import cn.flightfeather.thirdappmodule.R
import cn.flightfeather.thirdappmodule.util.DateFormatter
import cn.flightfeather.thirdappmodule.util.dp
import cn.flightfeather.thirdappmodule.util.sp
+import org.jetbrains.anko.backgroundColor
import java.util.*
import java.util.regex.Pattern
+import kotlin.math.abs
import kotlin.math.max
import kotlin.math.roundToInt
@@ -27,6 +30,7 @@
private val bgWidth:Float
private val bgHeight: Float
private val textPaint:Paint
+ private val textPaint2:Paint
private val indexPaint:Paint
private val titlePaint:Paint
@@ -51,6 +55,14 @@
isAntiAlias = true
textSize = 14f.sp
}
+ textPaint2 = Paint().apply {
+ textAlign = Paint.Align.LEFT
+ color = Color.WHITE
+ style = Paint.Style.FILL_AND_STROKE
+// strokeWidth = density * 2
+ isAntiAlias = true
+ textSize = 14f.sp
+ }
indexPaint = Paint().apply {
textAlign = Paint.Align.CENTER
color = Color.BLACK
@@ -67,6 +79,24 @@
textSize = 14f.sp
typeface = Typeface.create(Typeface.DEFAULT, Typeface.BOLD)
}
+ }
+
+ /**
+ * 缁欏浘鐗囨坊鍔犳按鍗�
+ * 榛樿姘村嵃
+ */
+ fun addLogo(bitmap: Bitmap, logo: Bitmap): Bitmap {
+ // 榛樿姘村嵃瀹藉害涓哄浘鐗囩殑 1/8
+ val newLogo = resizeBitmap(logo, bitmap.width.toFloat() / 7)
+ val newBitmap = Bitmap.createBitmap(bitmap.width, bitmap.height, bitmap.config)
+ val canvas = Canvas(newBitmap)
+ canvas.drawBitmap(bitmap, 0f, 0f, null)
+ val margin = 24f// 璁惧畾logo鍜屽浘鐗囩殑杈硅窛
+ val x = bitmap.width - newLogo.width - margin
+ val y = margin
+ canvas.drawBitmap(newLogo, x, y, null)
+
+ return newBitmap
}
fun mergeImage(bitmaps: MutableList<Bitmap>): Bitmap? {
@@ -324,12 +354,39 @@
return newBitmap
}
- fun mergeText(bitmap1: Bitmap, text: String, coordinate: Pair<Float, Float>): Bitmap {
- val result = Bitmap.createBitmap(bitmap1.width, bitmap1.height, Bitmap.Config.ARGB_8888)
- val canvas = Canvas(result)
+ fun mergeText(bitmap1: Bitmap, textView: TextView, coordinateO: Pair<Float, Float>, xScale: Float, yScale: Float): Bitmap {
+ textPaint2.textSize = textView.textSize
+ var coordinate = coordinateO
+ var textMaxWidth = bgWidth - coordinate.first * 2
+ /* 鏍规嵁灞忓箷澶у皬閲嶇粯鏂扮殑鍥剧墖瀹介珮锛岀‘淇濇枃鏈瓧浣撴樉绀轰笉浼氳缂╁皬 */
+ val scaledBitmap = if (bitmap1.width > bgWidth) {
+ val y = coordinate.second / bgHeight * bitmap1.height
+ coordinate = Pair(coordinate.first, y)
+ textPaint2.textSize = textPaint2.textSize / bgHeight * bitmap1.height
+ textMaxWidth = bitmap1.width - coordinate.first * 2
+// resizeBitmap(bitmap1, bgWidth)
+ Bitmap.createBitmap(bitmap1.width, bitmap1.height, bitmap1.config)
+ } else {
+ Bitmap.createBitmap(bitmap1.width, bitmap1.height, bitmap1.config)
+ }
+
+ val fontMetrics = textPaint2.fontMetrics
+ val textHeight = abs(fontMetrics.bottom) + abs(fontMetrics.ascent)
+ /* 鏂囨湰鎹㈣ */
+ val textArray = linefeed(textView.text.toString(), textMaxWidth, textPaint2)
+ val canvas = Canvas(scaledBitmap)
canvas.drawBitmap(bitmap1, 0F, 0F, null)
- canvas.drawText(text, coordinate.first, coordinate.second, null)
- return result
+
+ var y = scaledBitmap.height * yScale + abs(fontMetrics.top)
+ val x = scaledBitmap.width * xScale
+ textArray.forEach {
+ textPaint2.color = Color.BLACK
+ canvas.drawText(it, x + 3, y + 3, textPaint2)
+ textPaint2.color = Color.WHITE
+ canvas.drawText(it, x, y, textPaint2)
+ y += textHeight
+ }
+ return scaledBitmap
}
fun createTitle(text: String, time: Date?): Bitmap {
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/PhotoUtil.java b/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/PhotoUtil.java
index f65fd3a..5b47250 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/PhotoUtil.java
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/PhotoUtil.java
@@ -169,6 +169,7 @@
});
function1List.add(popupWindow -> {
Intent intent = new Intent(activity, CameraActivity.class);
+ intent.putExtra("maxPic", num);
activity.startActivityForResult(intent, requestCode);
popupWindow.dismiss();
return null;
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/view/recyclerview/RecyclerViewPanel.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/view/recyclerview/RecyclerViewPanel.kt
index 5b4b9fc..23c09a7 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/view/recyclerview/RecyclerViewPanel.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/view/recyclerview/RecyclerViewPanel.kt
@@ -18,17 +18,9 @@
* Date: 2019/11/22
* reference layout is [R.layout.layout_recycler_view_refresh]
*/
-abstract class RecyclerViewPanel<T>(
- private val dataLoadModel: DataLoadModel<T>,
- private val rootView: View? = null
-) : RecyclerViewSetInterface<T>, SwipeRefreshLayoutSetInterface {
+abstract class RecyclerViewPanel<T>(private val dataLoadModel: DataLoadModel<T>, private val rootView: View? = null) : RecyclerViewSetInterface<T>, SwipeRefreshLayoutSetInterface {
- constructor(
- dataLoadModel: DataLoadModel<T>,
- recyclerView: RecyclerView,
- context: Context?,
- refreshLayout: SwipeRefreshLayout? = null
- ) : this(dataLoadModel) {
+ constructor(dataLoadModel: DataLoadModel<T>, recyclerView: RecyclerView, context: Context?, refreshLayout: SwipeRefreshLayout? = null) : this(dataLoadModel) {
context?.let { this.context = it }
tempRecyclerView = recyclerView
this.tempRefreshLayout = refreshLayout
@@ -38,6 +30,9 @@
private var tempRecyclerView: RecyclerView? = null
private var tempRefreshLayout: SwipeRefreshLayout? = null
+ /**
+ * 鍦ㄦ帴鍙RecyclerViewSetInterface.initList]涓細鑷姩鍒濆鍖�
+ */
override var adapter: BaseRecyclerAdapter<T>? = null
private var mRecyclerView: RecyclerView? = null
@@ -76,8 +71,7 @@
}
}
- override fun getRecyclerView(): RecyclerView? =
- mRecyclerView ?: rootView?.findViewById(R.id.recycler_view) ?: tempRecyclerView
+ override fun getRecyclerView(): RecyclerView? = mRecyclerView ?: rootView?.findViewById(R.id.recycler_view) ?: tempRecyclerView
override fun onRefreshDone() = stopRefresh()
override fun onRefreshFail() = stopRefresh()
@@ -86,29 +80,17 @@
override fun onLoadMoreFail() = Unit
override fun onRefreshNone() = stopRefresh()
- override fun getMyLayoutManager(): RecyclerView.LayoutManager =
- LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
+ override fun getMyLayoutManager(): RecyclerView.LayoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
override fun getItemLayoutIdMap(): Map<Int, Int> = emptyMap()
override fun getSectionLayoutId(): Int = R.layout.recycler_item_section_head
- override fun getSectionDataList(): List<MySection<T>> =
- MySection.convert2Section(dataLoadModel.dataList)
+ override fun getSectionDataList(): List<MySection<T>> = MySection.convert2Section(dataLoadModel.dataList)
- override fun onItemClick(
- adapter: BaseQuickAdapter<Any?, BaseViewHolder>,
- view: View,
- position: Int,
- dataList: List<T>
- ) = Unit
+ override fun onItemClick(adapter: BaseQuickAdapter<Any?, BaseViewHolder>, view: View, position: Int, dataList: List<T>) = Unit
- override fun onItemChildClick(
- adapter: BaseQuickAdapter<Any?, BaseViewHolder>,
- view: View,
- position: Int,
- dataList: List<T>
- ) = Unit
+ override fun onItemChildClick(adapter: BaseQuickAdapter<Any?, BaseViewHolder>, view: View, position: Int, dataList: List<T>) = Unit
override fun enableLoadMore(): Boolean = true
@@ -124,8 +106,7 @@
override fun enableUpFetch(): Boolean = false
@SuppressLint("InflateParams")
- override fun getMyEmptyView(): View? =
- LayoutInflater.from(context).inflate(R.layout.layout_empty_view, null)
+ override fun getMyEmptyView(): View? = LayoutInflater.from(context).inflate(R.layout.layout_empty_view, null)
@SuppressLint("InflateParams")
override fun getMyLoadingView(): View? = LayoutInflater.from(context).inflate(R.layout.layout_loading_view, null)
@@ -135,8 +116,7 @@
//******************************SwipeRefreshLayout************************************************************
- override fun getSwipeRefreshLayout(): SwipeRefreshLayout? =
- refreshLayout ?: rootView?.findViewById(R.id.refresh_layout) ?: tempRefreshLayout
+ override fun getSwipeRefreshLayout(): SwipeRefreshLayout? = refreshLayout ?: rootView?.findViewById(R.id.refresh_layout) ?: tempRefreshLayout
override fun enableRefresh(): Boolean = true
diff --git a/app/src/main/res/drawable/ic_baseline_backspace_24.xml b/app/src/main/res/drawable/ic_baseline_backspace_24.xml
new file mode 100644
index 0000000..cc1a3df
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_backspace_24.xml
@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#FF6767"
+ android:viewportHeight="24" android:viewportWidth="24"
+ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FFFFFF" android:pathData="M22,3L7,3c-0.69,0 -1.23,0.35 -1.59,0.88L0,12l5.41,8.11c0.36,0.53 0.9,0.89 1.59,0.89h15c1.1,0 2,-0.9 2,-2L24,5c0,-1.1 -0.9,-2 -2,-2zM19,15.59L17.59,17 14,13.41 10.41,17 9,15.59 12.59,12 9,8.41 10.41,7 14,10.59 17.59,7 19,8.41 15.41,12 19,15.59z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_baseline_content_copy_24.xml b/app/src/main/res/drawable/ic_baseline_content_copy_24.xml
new file mode 100644
index 0000000..3949a4d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_content_copy_24.xml
@@ -0,0 +1,5 @@
+<vector android:height="24dp" android:tint="#1091F5"
+ android:viewportHeight="24" android:viewportWidth="24"
+ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FFFFFF" android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
+</vector>
diff --git a/app/src/main/res/drawable/selector_bg_gray_or_white.xml b/app/src/main/res/drawable/selector_bg_gray_or_white.xml
new file mode 100644
index 0000000..3900873
--- /dev/null
+++ b/app/src/main/res/drawable/selector_bg_gray_or_white.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_selected="true">
+ <shape android:shape="rectangle">
+ <!-- 濉厖鐨勯鑹� -->
+ <solid android:color="@color/addTaskBG"/>
+ <!-- 璁剧疆鎸夐挳鐨勫洓涓涓哄姬褰� -->
+ <!-- android:radius 寮у舰鐨勫崐寰� -->
+ <corners android:radius="2dp" />
+ <!--鎻忚竟-->
+<!-- <stroke-->
+<!-- android:width="0.5dp"-->
+<!-- android:color="@color/main_text_color" />-->
+ <!-- padding锛欱utton閲岄潰鐨勬枃瀛椾笌Button杈圭晫鐨勯棿闅� -->
+ <padding
+ android:bottom="2dp"
+ android:left="2dp"
+ android:right="2dp"
+ android:top="2dp" />
+ </shape>
+ </item>
+ <item>
+ <shape android:shape="rectangle">
+ <!-- 濉厖鐨勯鑹� -->
+ <solid android:color="@color/transparent"/>
+ <!-- 璁剧疆鎸夐挳鐨勫洓涓涓哄姬褰� -->
+ <!-- android:radius 寮у舰鐨勫崐寰� -->
+ <corners android:radius="2dp" />
+ <!--鎻忚竟-->
+<!-- <stroke-->
+<!-- android:width="0.5dp"-->
+<!-- android:color="@color/main_text_color" />-->
+ <!-- padding锛欱utton閲岄潰鐨勬枃瀛椾笌Button杈圭晫鐨勯棿闅� -->
+ <padding
+ android:bottom="2dp"
+ android:left="2dp"
+ android:right="2dp"
+ android:top="2dp" />
+ </shape>
+ </item>
+
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_btn_copy_delete.xml b/app/src/main/res/drawable/selector_btn_copy_delete.xml
new file mode 100644
index 0000000..e9b2493
--- /dev/null
+++ b/app/src/main/res/drawable/selector_btn_copy_delete.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <item android:state_selected="true" android:drawable="@drawable/ic_baseline_backspace_24"/>
+ <item android:state_selected="false" android:drawable="@drawable/ic_baseline_content_copy_24"/>
+</selector>
diff --git a/app/src/main/res/layout/activity_analysis_rank.xml b/app/src/main/res/layout/activity_analysis_rank.xml
index 2c1e8e2..115e6c4 100644
--- a/app/src/main/res/layout/activity_analysis_rank.xml
+++ b/app/src/main/res/layout/activity_analysis_rank.xml
@@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shape_bg_gradient"
- tools:context=".dataanalysis.rank.AnalysisRankActivity">
+ tools:context=".module.dataanalysis.rank.AnalysisRankActivity">
<include android:id="@+id/action_bar_rank"
layout="@layout/layout_actionbar" />
diff --git a/app/src/main/res/layout/activity_analysis_tab.xml b/app/src/main/res/layout/activity_analysis_tab.xml
index b08b19e..f03556a 100644
--- a/app/src/main/res/layout/activity_analysis_tab.xml
+++ b/app/src/main/res/layout/activity_analysis_tab.xml
@@ -5,7 +5,7 @@
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:theme="@style/AppTheme.NoActionBar"
- tools:context=".dataanalysis.AnalysisTabActivity">
+ tools:context=".module.dataanalysis.AnalysisTabActivity">
<include
android:id="@+id/toolbar"
diff --git a/app/src/main/res/layout/activity_camera.xml b/app/src/main/res/layout/activity_camera.xml
index 9929799..a35d933 100644
--- a/app/src/main/res/layout/activity_camera.xml
+++ b/app/src/main/res/layout/activity_camera.xml
@@ -8,41 +8,163 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".module.common.CameraActivity">
- <com.otaliastudios.cameraview.CameraView
- android:id="@+id/camera_view"
+ <android.support.constraint.ConstraintLayout
+ android:id="@+id/cl_part1"
android:layout_width="match_parent"
android:layout_height="match_parent"
- app:cameraPictureSizeSmallest="false"
- app:cameraPictureSizeBiggest="true"
- app:cameraGestureTap="focus"
- app:cameraGesturePinch="zoom"
- app:cameraFacing="back"
- app:cameraHdr="on"
- app:cameraFlash="auto"
- app:cameraWhiteBalance="auto"
- app:cameraAudio="off"
- app:cameraGrid="off"
- app:cameraVideoCodec="deviceDefault">
+ android:visibility="visible">
- </com.otaliastudios.cameraview.CameraView>
+ <ImageView
+ android:id="@+id/img_cancel"
+ android:layout_width="30dp"
+ android:layout_height="30dp"
+ android:layout_margin="@dimen/dimen16"
+ android:elevation="@dimen/dimen2"
+ android:padding="@dimen/dimen8"
+ android:src="@drawable/icon_back_white"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ tools:ignore="UnusedAttribute" />
- <TextView
- android:id="@+id/txt_location"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/app_name"
- android:textColor="@color/white"
- android:layout_marginStart="@dimen/dimen16"
- android:layout_marginBottom="@dimen/dimen16"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintBottom_toTopOf="@id/btn_shot"/>
- <Button
- android:id="@+id/btn_shot"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="SHOT"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
- android:layout_marginBottom="16dp"/>
+ <com.otaliastudios.cameraview.CameraView
+ android:id="@+id/camera_view"
+ android:layout_width="wrap_content"
+ android:layout_height="0dp"
+ app:cameraPictureSizeSmallest="false"
+ app:cameraPictureSizeBiggest="true"
+ app:cameraGestureTap="focus"
+ app:cameraGesturePinch="zoom"
+ app:cameraFacing="back"
+ app:cameraHdr="on"
+ app:cameraFlash="auto"
+ app:cameraWhiteBalance="auto"
+ app:cameraAudio="off"
+ app:cameraGrid="off"
+ app:cameraVideoCodec="deviceDefault"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/cl_part2">
+
+ </com.otaliastudios.cameraview.CameraView>
+
+ <TextView
+ android:id="@+id/txt_latitude"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ tools:text="@string/app_name"
+ android:textColor="@color/white"
+ android:textSize="14sp"
+ android:layout_marginStart="@dimen/dimen16"
+ android:layout_marginEnd="@dimen/dimen16"
+ android:layout_marginBottom="@dimen/dimen2"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/txt_longitude"/>
+ <TextView
+ android:id="@+id/txt_longitude"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ tools:text="@string/app_name"
+ android:textColor="@color/white"
+ android:textSize="14sp"
+ android:layout_marginStart="@dimen/dimen16"
+ android:layout_marginEnd="@dimen/dimen16"
+ android:layout_marginBottom="@dimen/dimen2"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/txt_address"/>
+ <TextView
+ android:id="@+id/txt_address"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ tools:text="@string/app_name"
+ android:textColor="@color/white"
+ android:textSize="14sp"
+ android:layout_marginStart="@dimen/dimen16"
+ android:layout_marginEnd="@dimen/dimen16"
+ android:layout_marginBottom="@dimen/dimen2"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/txt_time"/>
+ <TextView
+ android:id="@+id/txt_time"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ tools:text="@string/app_name"
+ android:textColor="@color/white"
+ android:textSize="14sp"
+ android:layout_marginStart="@dimen/dimen16"
+ android:layout_marginEnd="@dimen/dimen16"
+ android:layout_marginBottom="@dimen/dimen16"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toBottomOf="@id/camera_view"/>
+
+ <android.support.constraint.ConstraintLayout
+ android:id="@+id/cl_part2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/transBlack"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent">
+
+ <ImageView
+ android:id="@+id/img_thumbnail"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_margin="@dimen/dimen16"
+ android:src="@drawable/bg_btngroup"
+ android:scaleType="centerCrop"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/btn_shoot"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <ProgressBar
+ android:id="@+id/pro_shooting"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:elevation="@dimen/dimen6"
+ android:indeterminateTint="@color/gray"
+ app:layout_constraintStart_toStartOf="@id/btn_shoot"
+ app:layout_constraintEnd_toEndOf="@id/btn_shoot"
+ app:layout_constraintTop_toTopOf="@id/btn_shoot"
+ app:layout_constraintBottom_toBottomOf="@id/btn_shoot"/>
+
+ <android.support.design.widget.FloatingActionButton
+ android:id="@+id/btn_shoot"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:backgroundTint="@color/white"
+ android:layout_marginTop="@dimen/dimen16"
+ android:layout_marginBottom="@dimen/dimen16"
+ app:elevation="0dp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent" />
+
+ <TextView
+ android:id="@+id/img_confirm"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingStart="@dimen/dimen8"
+ android:paddingEnd="@dimen/dimen8"
+ android:paddingTop="@dimen/dimen6"
+ android:paddingBottom="@dimen/dimen6"
+ android:layout_margin="@dimen/dimen16"
+ android:elevation="@dimen/dimen2"
+ android:text="@string/yes"
+ android:textColor="@color/primary_text"
+ android:background="@drawable/shape_button_green"
+ android:backgroundTint="@color/white"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toEndOf="@id/btn_shoot"
+ app:layout_constraintEnd_toEndOf="parent"
+ tools:ignore="UnusedAttribute" />
+ </android.support.constraint.ConstraintLayout>
+ </android.support.constraint.ConstraintLayout>
+
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml
new file mode 100644
index 0000000..71244c4
--- /dev/null
+++ b/app/src/main/res/layout/activity_search.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <android.support.constraint.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ android:background="@color/colorPrimary">
+
+ <ImageView
+ android:id="@+id/img_cancel"
+ android:layout_width="30dp"
+ android:layout_height="30dp"
+ android:elevation="@dimen/dimen2"
+ android:padding="@dimen/dimen8"
+ android:layout_margin="@dimen/dimen8"
+ android:src="@drawable/icon_back_white"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/edt_search"
+ tools:ignore="UnusedAttribute" />
+
+ <include
+ layout="@layout/layout_search_title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/dimen16"
+ android:layout_marginBottom="@dimen/dimen16"
+ android:layout_marginEnd="@dimen/dimen16"
+ app:layout_constraintStart_toEndOf="@id/img_cancel"
+ app:layout_constraintEnd_toStartOf="@id/btn_search"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <TextView
+ android:id="@+id/btn_search"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/search"
+ style="@style/TextButtonStyle"
+ android:visibility="gone"
+ android:paddingStart="@dimen/dimen16"
+ android:paddingEnd="@dimen/dimen16"
+ app:layout_constraintStart_toEndOf="@id/edt_search"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="@id/edt_search"
+ app:layout_constraintBottom_toBottomOf="@id/edt_search"/>
+ </android.support.constraint.ConstraintLayout>
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/recycler_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_constraintTop_toTopOf="parent">
+ </android.support.v7.widget.RecyclerView>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_take_evidence.xml b/app/src/main/res/layout/dialog_take_evidence.xml
index b98715b..8986924 100644
--- a/app/src/main/res/layout/dialog_take_evidence.xml
+++ b/app/src/main/res/layout/dialog_take_evidence.xml
@@ -47,104 +47,90 @@
android:layout_marginTop="@dimen/dimen8"
android:layout_marginBottom="@dimen/dimen8">
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:paddingBottom="30dp"
- android:paddingLeft="18dp"
- android:paddingRight="18dp"
- android:paddingTop="12dp">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:paddingBottom="30dp"
+ android:paddingLeft="18dp"
+ android:paddingRight="18dp"
+ android:paddingTop="12dp">
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
-
- android:orientation="horizontal">
-
- <TextView
- android:id="@+id/tv_dialog_take_evidence_title"
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="闂鍙栬瘉"
- android:textColor="@color/primary_text"
- android:textSize="18sp" />
- </LinearLayout>
- <TextView
- android:id="@+id/tv_type"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dp"
- android:text="闂绫诲瀷" />
+ android:orientation="horizontal">
- <Spinner
- android:id="@+id/sp_take_evidence_select_problem_type"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/dimen4"
- style="@style/SpinnerStyle.Black"
- tools:listitem="@layout/item_spinner_drop_down" />
+ <TextView
+ android:id="@+id/tv_dialog_take_evidence_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="闂鍙栬瘉"
+ android:textColor="@color/primary_text"
+ android:textSize="18sp" />
+ </LinearLayout>
- <TextView
- android:id="@+id/tv_chose"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dp"
- android:text="閫夋嫨涓�涓棶棰�" />
-
- <Spinner
- android:id="@+id/sp_take_evidence_select_problem"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/dimen4"
- style="@style/SpinnerStyle.Black"
- tools:listitem="@layout/item_spinner_drop_down"/>
-
- <EditText
- android:id="@+id/et_take_evidence_problem_des"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="闂鎻忚堪(鍙��)"
- android:textSize="@dimen/textSize_14"
- android:visibility="visible" />
-
- <TextView
- android:id="@+id/tv_location"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:text="浣嶇疆" />
-
- <Spinner
- android:id="@+id/sp_take_evidence_select_location"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/dimen4"
- style="@style/SpinnerStyle.Black"
- tools:listitem="@layout/item_spinner_drop_down"/>
-
- <EditText
- android:id="@+id/et_take_evidence_location"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:hint="浣嶇疆澶囨敞(鍙��)"
- android:textSize="@dimen/textSize_14"/>
-
- <LinearLayout
- android:id="@+id/ll_change_suggestion"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:visibility="visible">
<TextView
- android:id="@+id/tv_suggestion"
+ android:id="@+id/tv_type"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:text="闂绫诲瀷" />
+
+ <Spinner
+ android:id="@+id/sp_take_evidence_select_problem_type"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/dimen4"
+ style="@style/SpinnerStyle.Black"
+ tools:listitem="@layout/item_spinner_drop_down" />
+
+ <TextView
+ android:id="@+id/tv_chose"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:text="閫夋嫨涓�涓棶棰�" />
+
+ <Spinner
+ android:id="@+id/sp_take_evidence_select_problem"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/dimen4"
+ style="@style/SpinnerStyle.Black"
+ tools:listitem="@layout/item_spinner_drop_down"/>
+
+ <android.support.constraint.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <EditText
+ android:id="@+id/et_take_evidence_problem_des"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:hint="闂鎻忚堪(鍙��)"
+ android:textSize="@dimen/textSize_14"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/btn_copy_problem_des"/>
+ <ImageView
+ android:id="@+id/btn_copy_problem_des"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="@dimen/dimen8"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="@id/et_take_evidence_problem_des"
+ app:layout_constraintBottom_toBottomOf="@id/et_take_evidence_problem_des"
+ android:src="@drawable/selector_btn_copy_delete" />
+ </android.support.constraint.ConstraintLayout>
+
+ <TextView
+ android:id="@+id/tv_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
- android:text="@string/change_suggestion" />
+ android:text="浣嶇疆" />
<Spinner
- android:id="@+id/sp_take_evidence_select_suggestion"
+ android:id="@+id/sp_take_evidence_select_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen4"
@@ -152,12 +138,40 @@
tools:listitem="@layout/item_spinner_drop_down"/>
<EditText
- android:id="@+id/et_take_evidence_suggestion"
+ android:id="@+id/et_take_evidence_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:hint="鏁存敼寤鸿(鍙��)"
+ android:hint="浣嶇疆澶囨敞(鍙��)"
android:textSize="@dimen/textSize_14"/>
- </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/ll_change_suggestion"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="visible">
+ <TextView
+ android:id="@+id/tv_suggestion"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:text="@string/change_suggestion" />
+
+ <Spinner
+ android:id="@+id/sp_take_evidence_select_suggestion"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/dimen4"
+ style="@style/SpinnerStyle.Black"
+ tools:listitem="@layout/item_spinner_drop_down"/>
+
+ <EditText
+ android:id="@+id/et_take_evidence_suggestion"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="鏁存敼寤鸿(鍙��)"
+ android:textSize="@dimen/textSize_14"/>
+ </LinearLayout>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
@@ -204,7 +218,7 @@
app:layout_constraintTop_toTopOf="parent"/>
</android.support.constraint.ConstraintLayout>
- </LinearLayout>
+ </LinearLayout>
</ScrollView>
</android.support.v7.widget.CardView>
diff --git a/app/src/main/res/layout/fragment_analysis_over_view.xml b/app/src/main/res/layout/fragment_analysis_over_view.xml
index 66d5a48..269c1f7 100644
--- a/app/src/main/res/layout/fragment_analysis_over_view.xml
+++ b/app/src/main/res/layout/fragment_analysis_over_view.xml
@@ -5,7 +5,7 @@
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
- tools:context=".dataanalysis.AnalysisOverViewFragment">
+ tools:context=".module.dataanalysis.AnalysisOverViewFragment">
<include android:id="@+id/action_bar" layout="@layout/layout_actionbar"/>
<include android:id="@+id/tab_time_pannel" layout="@layout/tab_time_swtich"/>
diff --git a/app/src/main/res/layout/fragment_rank_content.xml b/app/src/main/res/layout/fragment_rank_content.xml
index b00649d..442c71a 100644
--- a/app/src/main/res/layout/fragment_rank_content.xml
+++ b/app/src/main/res/layout/fragment_rank_content.xml
@@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- tools:context=".dataanalysis.rank.SceneRankContentFragment">
+ tools:context=".module.dataanalysis.rank.SceneRankContentFragment">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_content"
diff --git a/app/src/main/res/layout/fragment_task.xml b/app/src/main/res/layout/fragment_task.xml
index 8f4fe5d..e72f80d 100644
--- a/app/src/main/res/layout/fragment_task.xml
+++ b/app/src/main/res/layout/fragment_task.xml
@@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/taskBG"
- tools:context="cn.flightfeather.thirdappmodule.module.task.TaskFragment">
+ tools:context="cn.flightfeather.thirdappmodule.module.task.TaskFragment"
+ tools:ignore="UnusedAttribute">
<FrameLayout
android:layout_width="match_parent"
@@ -19,8 +20,7 @@
android:id="@+id/tv_task_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="24dp"
- android:layout_marginTop="20dp"
+ android:layout_marginTop="@dimen/dimen2"
android:text="@string/task"
android:textColor="@color/white"
android:textSize="17sp"
@@ -31,41 +31,56 @@
android:id="@+id/view_waiting"
android:layout_width="@dimen/fab_margin"
android:layout_height="@dimen/fab_margin"
- app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintEnd_toEndOf="@id/card_view"
app:layout_constraintTop_toTopOf="@id/tv_task_title"
app:layout_constraintBottom_toBottomOf="@id/tv_task_title"
- android:layout_marginEnd="24dp"
/>
+
+ <TextView
+ android:id="@+id/tv_search"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/white"
+ android:hint="@string/search"
+ android:paddingStart="@dimen/dimen8"
+ android:paddingEnd="@dimen/dimen8"
+ android:paddingTop="@dimen/dimen6"
+ android:paddingBottom="@dimen/dimen6"
+ android:textSize="@dimen/sp_14"
+ android:drawableStart="@mipmap/ic_search"
+ android:drawablePadding="@dimen/dimen8"
+ android:layout_marginStart="@dimen/dimen16"
+ android:layout_marginEnd="@dimen/dimen16"
+ app:layout_constraintTop_toBottomOf="@id/tv_task_title"
+ app:layout_constraintBottom_toTopOf="@id/card_view"
+ android:elevation="@dimen/dimen4" />
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_width="0dp"
android:layout_height="0dp"
- android:layout_marginBottom="15dp"
- android:layout_marginLeft="20dp"
- android:layout_marginRight="20dp"
- android:layout_marginTop="20dp"
+ android:layout_marginLeft="@dimen/dimen16"
+ android:layout_marginRight="@dimen/dimen16"
+ android:layout_marginTop="@dimen/dimen8"
android:background="#FFF"
- app:cardCornerRadius="4dp"
- app:cardElevation="8dp"
+ app:cardCornerRadius="@dimen/dimen4"
+ app:cardElevation="@dimen/dimen4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toBottomOf="@id/tv_task_title"
- app:layout_constraintBottom_toTopOf="@id/task_progress_llcontainer">
+ app:layout_constraintTop_toBottomOf="@id/tv_search"
+ app:layout_constraintBottom_toTopOf="@id/rl_add_task">
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingBottom="10dp"
- android:paddingTop="13dp">
+ <android.support.constraint.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<RelativeLayout
+ android:id="@+id/v_today_task"
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_marginLeft="12dp"
- android:layout_marginRight="12dp"
- android:layout_weight="1">
+ android:visibility="gone"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/ll_buttons">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_container"
@@ -80,26 +95,122 @@
android:text="浠婃棩鏃犱换鍔�" />
</RelativeLayout>
-
- <TextView
- android:id="@+id/tv_tody_task"
+ <LinearLayout
+ android:id="@+id/v_task_remind"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="46dp"
- android:text="鏃犲緟瀹屾垚鐨勪换鍔�"
- android:visibility="gone" />
+ android:layout_height="0dp"
+ android:visibility="visible"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toTopOf="@id/ll_buttons"
+ android:orientation="vertical">
+
+ <android.support.constraint.ConstraintLayout
+ android:id="@+id/cl_un_upload_pic"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/colorPrimary"
+ android:paddingTop="@dimen/dimen16"
+ android:paddingBottom="@dimen/dimen16"
+ android:paddingStart="@dimen/dimen8"
+ android:paddingEnd="@dimen/dimen8"
+ android:elevation="@dimen/dimen6"
+ tools:ignore="UnusedAttribute">
+
+ <TextView
+ android:id="@+id/tv_un_upload_pic"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ tools:text="鏈湴鍥剧墖鏈笂浼�"
+ style="@style/TextStyle.Title"
+ android:textStyle="bold"
+ android:textSize="16sp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <ImageView
+ android:id="@+id/img_tip"
+ android:layout_width="@dimen/dimen8"
+ android:layout_height="@dimen/dimen8"
+ android:src="@drawable/icon_rank_1"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/img_arrow"/>
+
+ <ImageView
+ android:id="@+id/img_arrow"
+ android:layout_width="26dp"
+ android:layout_height="26dp"
+ android:src="@drawable/ic_keyboard_arrow_right_light_blue_600_36dp"
+ android:tint="@color/white"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </android.support.constraint.ConstraintLayout>
+
+ <android.support.constraint.ConstraintLayout
+ android:id="@+id/cl_un_complete_task"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/colorPrimary"
+ android:paddingTop="@dimen/dimen16"
+ android:paddingBottom="@dimen/dimen16"
+ android:paddingStart="@dimen/dimen8"
+ android:paddingEnd="@dimen/dimen8"
+ android:layout_marginTop="@dimen/dimen4"
+ tools:ignore="UnusedAttribute">
+
+ <TextView
+ android:id="@+id/tv_un_complete_task"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="浠婃棩鏈畬鎴愪换鍔�"
+ style="@style/TextStyle.Title"
+ android:textStyle="bold"
+ android:textSize="16sp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <TextView
+ android:id="@+id/tv_task_num"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="@style/TextStyle.Title"
+ android:textStyle="bold"
+ android:textSize="16sp"
+ tools:text="2涓�"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </android.support.constraint.ConstraintLayout>
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/rv_un_complete_task"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ tools:listitem="@layout/item_task_list_2" />
+
+ </LinearLayout>
<LinearLayout
+ android:id="@+id/ll_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:baselineAligned="false">
+ android:baselineAligned="false"
+ app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:id="@+id/ll_container_todytask"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:paddingTop="@dimen/dimen6"
+ android:paddingBottom="@dimen/dimen6"
+ android:background="@drawable/selector_bg_gray_or_white"
+ android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical">
<ImageView
@@ -122,8 +233,11 @@
android:id="@+id/rl_container_taskremind"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_toRightOf="@id/ll_container_todytask"
android:layout_weight="1"
+ android:paddingTop="@dimen/dimen6"
+ android:paddingBottom="@dimen/dimen6"
+ android:background="@drawable/selector_bg_gray_or_white"
+ android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical">
<ImageView
@@ -134,11 +248,12 @@
android:layout_gravity="center_horizontal"
android:background="@drawable/icon_task_alert" />
- <View
- android:id="@+id/superscript"
- android:layout_width="26dp"
- android:layout_height="26dp"
- android:layout_toRightOf="@id/iv_taskremind" />
+ <ImageView
+ android:id="@+id/img_tip_2"
+ android:layout_width="@dimen/dimen8"
+ android:layout_height="@dimen/dimen8"
+ android:layout_toEndOf="@id/iv_taskremind"
+ android:src="@drawable/icon_rank_1" />
<TextView
android:layout_width="wrap_content"
@@ -154,6 +269,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:paddingTop="@dimen/dimen6"
+ android:paddingBottom="@dimen/dimen6"
+ android:background="@drawable/selector_bg_gray_or_white"
+ android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical">
<ImageView
@@ -170,7 +289,7 @@
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>
- </LinearLayout>
+ </android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
<android.support.constraint.ConstraintLayout
@@ -275,13 +394,13 @@
android:id="@+id/rl_add_task"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_margin="20dp"
+ android:layout_margin="@dimen/dimen16"
android:paddingStart="@dimen/dimen16"
android:paddingEnd="@dimen/dimen16"
android:paddingBottom="@dimen/dimen16"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/rl_add_scense"
- app:layout_constraintTop_toBottomOf="@id/task_progress_llcontainer"
+ app:layout_constraintTop_toBottomOf="@id/card_view"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintVertical_bias="1"
android:background="@drawable/shape_orange_add_task">
diff --git a/app/src/main/res/layout/item_selector_head.xml b/app/src/main/res/layout/item_selector_head.xml
new file mode 100644
index 0000000..b9e3ac9
--- /dev/null
+++ b/app/src/main/res/layout/item_selector_head.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:background="@color/colorPrimary"
+ android:padding="@dimen/dimen8"
+ android:elevation="@dimen/dimen6"
+ tools:ignore="UnusedAttribute">
+
+ <TextView
+ android:id="@+id/tv_header"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ tools:text="@string/app_name"
+ style="@style/TextStyle.Title"
+ android:textStyle="bold"
+ android:textSize="16sp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <ImageView
+ android:id="@+id/img_arrow"
+ android:layout_width="@dimen/dimen16"
+ android:layout_height="@dimen/dimen16"
+ android:src="@drawable/selector_show_hide_white"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+</android.support.constraint.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_search_title.xml b/app/src/main/res/layout/layout_search_title.xml
new file mode 100644
index 0000000..495b933
--- /dev/null
+++ b/app/src/main/res/layout/layout_search_title.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/white"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ tools:ignore="Autofill">
+
+ <EditText
+ android:id="@+id/edt_search"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:background="@color/white"
+ android:hint="@string/search"
+ android:paddingStart="@dimen/dimen8"
+ android:paddingEnd="@dimen/dimen8"
+ android:paddingTop="@dimen/dimen6"
+ android:paddingBottom="@dimen/dimen6"
+ android:textSize="@dimen/sp_14"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:inputType="text"
+ android:drawableStart="@mipmap/ic_search"
+ android:drawablePadding="@dimen/dimen8"
+ android:imeOptions="actionSearch"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/btn_clear"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+
+ <ImageView
+ android:id="@+id/btn_clear"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_baseline_backspace_24"
+ android:layout_marginEnd="@dimen/dimen8"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintBottom_toBottomOf="parent"/>
+</android.support.constraint.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_search.png b/app/src/main/res/mipmap-hdpi/ic_search.png
new file mode 100644
index 0000000..25a86ca
--- /dev/null
+++ b/app/src/main/res/mipmap-hdpi/ic_search.png
Binary files differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_search.png b/app/src/main/res/mipmap-mdpi/ic_search.png
new file mode 100644
index 0000000..b195a23
--- /dev/null
+++ b/app/src/main/res/mipmap-mdpi/ic_search.png
Binary files differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_logo.png b/app/src/main/res/mipmap-xhdpi/ic_logo.png
new file mode 100644
index 0000000..84ce098
--- /dev/null
+++ b/app/src/main/res/mipmap-xhdpi/ic_logo.png
Binary files differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_search.png b/app/src/main/res/mipmap-xhdpi/ic_search.png
new file mode 100644
index 0000000..a3d692c
--- /dev/null
+++ b/app/src/main/res/mipmap-xhdpi/ic_search.png
Binary files differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_search.png b/app/src/main/res/mipmap-xxhdpi/ic_search.png
new file mode 100644
index 0000000..d44614f
--- /dev/null
+++ b/app/src/main/res/mipmap-xxhdpi/ic_search.png
Binary files differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_search.png b/app/src/main/res/mipmap-xxxhdpi/ic_search.png
new file mode 100644
index 0000000..c6b5e4b
--- /dev/null
+++ b/app/src/main/res/mipmap-xxxhdpi/ic_search.png
Binary files differ
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index fc96abe..e10a981 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -146,5 +146,7 @@
<string name="minus">- </string>
<string name="signed">宸茬鏀�</string>
<string name="unsigned">鏈鏀�</string>
+ <string name="reshoot">閲嶆媿</string>
+ <string name="search">鎼滅储</string>
</resources>
\ No newline at end of file
diff --git a/appDucha/src/main/java/com/flightfeather/ducha/module/DCMainActivity.kt b/appDucha/src/main/java/com/flightfeather/ducha/module/DCMainActivity.kt
index 1675e8b..2e5a9be 100644
--- a/appDucha/src/main/java/com/flightfeather/ducha/module/DCMainActivity.kt
+++ b/appDucha/src/main/java/com/flightfeather/ducha/module/DCMainActivity.kt
@@ -1,8 +1,7 @@
package com.flightfeather.ducha.module
import android.view.View
-import cn.flightfeather.thirdappmodule.dataanalysis.AnalysisOverViewFragment
-import cn.flightfeather.thirdappmodule.fragment.SettingFragment
+import cn.flightfeather.thirdappmodule.module.dataanalysis.AnalysisOverViewFragment
import cn.flightfeather.thirdappmodule.module.MainActivity
import cn.flightfeather.thirdappmodule.module.home.HomeFragment_comptent
import cn.flightfeather.thirdappmodule.module.home.HomeFragment_scene
@@ -15,6 +14,7 @@
/**
* @author riku
* Date: 2021/7/29
+ * 鐫e療app涓婚〉
*/
class DCMainActivity : MainActivity() {
override fun initModule() {
diff --git a/appDucha/src/main/java/com/flightfeather/ducha/module/common/FileExportActivity.kt b/appDucha/src/main/java/com/flightfeather/ducha/module/common/FileExportActivity.kt
index bdd014f..ce7ba1d 100644
--- a/appDucha/src/main/java/com/flightfeather/ducha/module/common/FileExportActivity.kt
+++ b/appDucha/src/main/java/com/flightfeather/ducha/module/common/FileExportActivity.kt
@@ -284,7 +284,7 @@
problemDetailAdapter.notifyDataSetChanged()
})
- taskViewModel.subTaskList.observe(this, Observer {
+ taskViewModel.subTaskNameList.observe(this, Observer {
txt_subTask_content.setOnClickListener(this)
createSubTaskDialog()
})
@@ -330,7 +330,7 @@
}
private fun createSubTaskDialog() {
- val dataArray = taskViewModel.subTaskList.value?.toTypedArray() ?: emptyArray()
+ val dataArray = taskViewModel.subTaskNameList.value?.toTypedArray() ?: emptyArray()
subTaskDialog = DialogUtil2.createMultiDialog(this, "閫夋嫨瀛愪换鍔�", dataArray) {
val text = StringBuilder()
selectedSubTaskIds.clear()
diff --git a/appsupervision/build.gradle b/appsupervision/build.gradle
index e93139f..b80d30d 100644
--- a/appsupervision/build.gradle
+++ b/appsupervision/build.gradle
@@ -11,8 +11,8 @@
applicationId "cn.flightfeather.thirdapp"
minSdkVersion 19
targetSdkVersion 28
- versionCode 32
- versionName "1.1.14.16"
+ versionCode 33
+ versionName "1.1.14.17"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
renderscriptTargetApi 25
diff --git a/moduleBase/build.gradle b/moduleBase/build.gradle
index d13fa4d..f76b913 100644
--- a/moduleBase/build.gradle
+++ b/moduleBase/build.gradle
@@ -8,7 +8,7 @@
defaultConfig {
minSdkVersion 19
- targetSdkVersion 30
+ targetSdkVersion 28
versionCode 1
versionName "1.0"
--
Gitblit v1.9.3