riku
2022-02-18 d59d55575d913646b7a90fca651904ab889c6723
### 一、任务模块相关

1. 【任务】界面新增【任务提醒】功能,包括用户未结束的任务以及本地未上传的图片;
2. 【任务】界面新增【搜索】功能,可根据关键字按照巡查任务名称进行搜索;

### 二、巡查模块相关

1. 【问题取证】功能中,【问题备注】一栏添加【一键复制】功能;
2. 【拍照】功能更新,新增连拍功能,同时所拍摄图片会自动添加地理位置、时间及公司水印等信息;
已修改40个文件
已删除12个文件
已添加16个文件
已重命名13个文件
5674 ■■■■ 文件已修改
.idea/assetWizardSettings.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/misc.xml 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/build.gradle 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/AndroidManifest.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/CommonApplication.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/activity/MapActivity.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/activity/ProblemDetailActivity.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment_B.java 644 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment_B.java 855 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity_B.java 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment_B.java 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment_B.java 308 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/BlankFragment.java 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment_B.java 345 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment_B.java 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity_B.java 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment_B.java 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment_B.java 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/SearchService.kt 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/MainActivity.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseTakePicActivity.kt 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/common/CameraActivity.kt 256 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchActivity.kt 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/common/SearchViewModel.kt 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisOverViewFragment.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisProblemFragment.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisTabActivity.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisFragment.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisProgressFragment.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisRankFragment.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProblemDetailFragment.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProgressDetailFragment.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/TaskProgressAdapter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/packageinfo 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/AnalysisRankActivity.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/SceneRankContentFragment.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/TownRankContentFragment.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/home/HomeFragment_scene.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuCameraActivity.kt 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuChangeActivity.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuNewGitActivity.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemListActivity.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuProblemUpdateActivity.kt 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewSubTaskActivity.kt 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/NewTopTaskActivity.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.java 605 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.kt 298 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskViewModel.kt 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/repository/SearchRepository.kt 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/util/DialogUtil2.kt 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/util/location/LocationUtil.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/ImageMergeUtil.kt 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/util/photo/PhotoUtil.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/cn/flightfeather/thirdappmodule/view/recyclerview/RecyclerViewPanel.kt 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/ic_baseline_backspace_24.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/ic_baseline_content_copy_24.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/selector_bg_gray_or_white.xml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/drawable/selector_btn_copy_delete.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_analysis_rank.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_analysis_tab.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_camera.xml 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_search.xml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/dialog_take_evidence.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_analysis_over_view.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_rank_content.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_task.xml 193 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/item_selector_head.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/layout_search_title.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-hdpi/ic_search.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-mdpi/ic_search.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xhdpi/ic_logo.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xhdpi/ic_search.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xxhdpi/ic_search.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/mipmap-xxxhdpi/ic_search.png 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/strings.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
appDucha/src/main/java/com/flightfeather/ducha/module/DCMainActivity.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
appDucha/src/main/java/com/flightfeather/ducha/module/common/FileExportActivity.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
appsupervision/build.gradle 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
moduleBase/build.gradle 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.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>
.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>
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
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>
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/";
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 {
    //定位
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);
            }
        };
    }
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisOverViewFragment_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisProblemFragment_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnalysisTabActivity_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisFragment_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/BlankFragment.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProblemDetailFragment_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/ProgressDetailFragment_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/AnalysisRankActivity_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/SceneRankContentFragment_B.java
ÎļþÒÑɾ³ý
app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/rank/TownRankContentFragment_B.java
ÎļþÒÑɾ³ý
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>>>>
}
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;
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)
    }
}
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)
                    if (it.contains("FlightFeather/Temp")) {
                        pathTempList.add(Pair(oldFile, true))
                    } else {
                    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("复制文件失败")
                        }
                    }
                }
                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)
        }
    }
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
    // æ‹æ‘„图片缓存地址
    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> {
                camera_view.stop()
                    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)
                    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? {
@@ -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)
            }
        }
    }
}
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()
        }
    }
}
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)
        }
    }
}
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisOverViewFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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.*
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisProblemFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnalysisTabActivity.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisProgressFragment.java
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisProgressFragment.java ÐÞ¸Ä
@@ -1,4 +1,4 @@
package cn.flightfeather.thirdappmodule.dataanalysis;
package cn.flightfeather.thirdappmodule.module.dataanalysis;
import android.app.Dialog;
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/AnysisRankFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProblemDetailFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/ProgressDetailFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/TaskProgressAdapter.java
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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;
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/packageinfo
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/AnalysisRankActivity.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/SceneRankContentFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
app/src/main/java/cn/flightfeather/thirdappmodule/module/dataanalysis/rank/TownRankContentFragment.kt
ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/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
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
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 {
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
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() {
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
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
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
            }
        }
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()
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
app/src/main/java/cn/flightfeather/thirdappmodule/module/task/TaskFragment.java
ÎļþÒÑɾ³ý
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()
    }
}
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() }
    // å­ä»»åŠ¡id与名称
    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
                }
            }
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()
            }
        })
    }
}
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,
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)
    }
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 {
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;
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
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>
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>
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:Button里面的文字与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:Button里面的文字与Button边界的间隔 -->
            <padding
                android:bottom="2dp"
                android:left="2dp"
                android:right="2dp"
                android:top="2dp" />
        </shape>
    </item>
</selector>
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>
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" />
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"
app/src/main/res/layout/activity_camera.xml
@@ -8,10 +8,28 @@
    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"
        android:visibility="visible">
        <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" />
        <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"
@@ -22,27 +40,131 @@
        app:cameraWhiteBalance="auto"
        app:cameraAudio="off"
        app:cameraGrid="off"
        app:cameraVideoCodec="deviceDefault">
            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_location"
        android:layout_width="wrap_content"
            android:id="@+id/txt_latitude"
            android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/app_name"
            tools:text="@string/app_name"
        android:textColor="@color/white"
            android:textSize="14sp"
        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"
            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"
        android:layout_marginBottom="16dp"/>
                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>
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>
app/src/main/res/layout/dialog_take_evidence.xml
@@ -100,13 +100,27 @@
                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="match_parent"
                        android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:hint="问题描述(可选)"
                android:textSize="@dimen/textSize_14"
                android:visibility="visible" />
                        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"
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"/>
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"
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>
            <LinearLayout
                android:id="@+id/v_task_remind"
                android:layout_width="match_parent"
                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_tody_task"
                        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:layout_marginTop="46dp"
                android:text="无待完成的任务"
                android:visibility="gone" />
                    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">
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>
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>
app/src/main/res/mipmap-hdpi/ic_search.png
app/src/main/res/mipmap-mdpi/ic_search.png
app/src/main/res/mipmap-xhdpi/ic_logo.png
app/src/main/res/mipmap-xhdpi/ic_search.png
app/src/main/res/mipmap-xxhdpi/ic_search.png
app/src/main/res/mipmap-xxxhdpi/ic_search.png
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>
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
 * ç£å¯Ÿapp主页
 */
class DCMainActivity : MainActivity() {
    override fun initModule() {
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()
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
moduleBase/build.gradle
@@ -8,7 +8,7 @@
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 30
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"