### 一、任务模块相关
1. 【任务】界面新增【任务提醒】功能,包括用户未结束的任务以及本地未上传的图片;
2. 【任务】界面新增【搜索】功能,可根据关键字按照巡查任务名称进行搜索;
### 二、巡查模块相关
1. 【问题取证】功能中,【问题备注】一栏添加【一键复制】功能;
2. 【拍照】功能更新,新增连拍功能,同时所拍摄图片会自动添加地理位置、时间及公司水印等信息;
已修改40个文件
已删除12个文件
已添加16个文件
已重命名13个文件
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | <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> |
| | |
| | | // 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 |
| | |
| | | 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 |
| | |
| | | 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> |
| | |
| | | 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/"; |
| | |
| | | |
| | | import cn.flightfeather.thirdappmodule.R; |
| | | |
| | | /** |
| | | * @author riku |
| | | * Date: 2019/8/1 |
| | | * ä¿®æ¹åºæ¯ä½ç½® |
| | | */ |
| | | public class MapActivity extends AppCompatActivity implements View.OnClickListener,AMap.OnMyLocationChangeListener { |
| | | |
| | | //å®ä½ |
| | |
| | | return new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | PhotoUtil.pickPhoto2(ProblemDetailActivity.this, type, picNum); |
| | | PhotoUtil.pickPhoto(ProblemDetailActivity.this, type, picNum); |
| | | } |
| | | }; |
| | | } |
| | |
| | | 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 |
| | |
| | | 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>>>> |
| | | } |
| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | |
| | | 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<*>) { |
| | |
| | | |
| | | 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) |
| | | } |
| | | } |
| | |
| | | //æ¥çä¸´æ¶ææå¾çå¯ä»¥å é¤ |
| | | 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() |
| | | } |
| | | } |
| | |
| | | val paths = data?.getStringArrayListExtra(EXTRA_SELECT_IMAGES) |
| | | paths?.forEach { |
| | | val oldFile = File(it) |
| | | val newFile = File(Environment.getExternalStorageDirectory(), "FlightFeather/Temp/" + UUIDGenerator.generateUUID(4) + ".jpg") |
| | | if (!newFile.parentFile.exists()) { |
| | | newFile.parentFile.mkdirs() |
| | | } |
| | | try { |
| | | FileUtil.copyFile(oldFile, newFile) |
| | | pathTempList.add(Pair(newFile, true)) |
| | | } catch (e: IOException) { |
| | | e.printStackTrace() |
| | | application.toast("å¤å¶æä»¶å¤±è´¥") |
| | | if (it.contains("FlightFeather/Temp")) { |
| | | pathTempList.add(Pair(oldFile, true)) |
| | | } else { |
| | | val newFile = File(Environment.getExternalStorageDirectory(), "FlightFeather/Temp/" + UUIDGenerator.generateUUID(4) + ".jpg") |
| | | try { |
| | | FileUtil.copyFile(oldFile, newFile) |
| | | pathTempList.add(Pair(newFile, true)) |
| | | } catch (e: IOException) { |
| | | e.printStackTrace() |
| | | application.toast("å¤å¶æä»¶å¤±è´¥") |
| | | } |
| | | } |
| | | } |
| | | refreshImageView() |
| | |
| | | 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) |
| | | } |
| | | } |
| | | |
| | |
| | | package cn.flightfeather.thirdappmodule.module.common |
| | | |
| | | import android.annotation.SuppressLint |
| | | import android.app.Activity |
| | | import android.content.Intent |
| | | import android.graphics.Bitmap |
| | | import android.graphics.BitmapFactory |
| | | import android.graphics.Canvas |
| | | import android.graphics.Matrix |
| | | import android.media.ExifInterface |
| | | import android.os.Bundle |
| | | import android.os.Environment |
| | | import android.os.Environment.DIRECTORY_PICTURES |
| | | import android.view.View |
| | | import cn.flightfeather.thirdappmodule.R |
| | | import cn.flightfeather.thirdappmodule.activity.PhotoViewerActivity |
| | | import cn.flightfeather.thirdappmodule.module.base.BaseActivity |
| | | import cn.flightfeather.thirdappmodule.module.base.BaseTakePicActivity |
| | | import cn.flightfeather.thirdappmodule.util.DateFormatter |
| | | import cn.flightfeather.thirdappmodule.module.base.VIEW_PHOTO |
| | | import cn.flightfeather.thirdappmodule.util.* |
| | | import cn.flightfeather.thirdappmodule.util.location.LocationUtil |
| | | import cn.flightfeather.thirdappmodule.util.photo.ExifHelper |
| | | import cn.flightfeather.thirdappmodule.util.photo.ImageMergeUtil |
| | | import com.lcw.library.imagepicker.ImagePicker |
| | | import com.otaliastudios.cameraview.CameraListener |
| | | import com.otaliastudios.cameraview.CameraOptions |
| | | import com.otaliastudios.cameraview.Size |
| | | import io.reactivex.Observable |
| | | import io.reactivex.android.schedulers.AndroidSchedulers |
| | | import io.reactivex.schedulers.Schedulers |
| | | import kotlinx.android.synthetic.main.activity_camera.* |
| | | import java.io.File |
| | | import java.io.FileOutputStream |
| | | import java.io.Serializable |
| | | import java.util.* |
| | | import kotlin.collections.ArrayList |
| | | import kotlin.math.abs |
| | | import kotlin.math.round |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | class CameraActivity : BaseActivity(), View.OnClickListener { |
| | | |
| | | // gpså®ä½å·¥å
· |
| | | private lateinit var locationUtil: LocationUtil |
| | | |
| | | // å¾çææ¬åå¹¶å·¥å
· |
| | | private lateinit var imageMergeUtil: ImageMergeUtil |
| | | |
| | | override fun getLayoutId(): Int =R.layout.activity_camera |
| | | // ææå¾çç¼åå°å |
| | | private var photoPath = mutableListOf<String>() |
| | | |
| | | // å¾çæ°´å° |
| | | private lateinit var logo: Bitmap |
| | | |
| | | // å
许æå¤§å¾çæææ°é |
| | | private var maxPic = 3 |
| | | |
| | | override fun getLayoutId(): Int = R.layout.activity_camera |
| | | |
| | | override fun onCreate(savedInstanceState: Bundle?) { |
| | | super.onCreate(savedInstanceState) |
| | | initLogoBitmap() |
| | | initCamera() |
| | | initLocation() |
| | | img_cancel.setOnClickListener(this) |
| | | img_confirm.setOnClickListener(this) |
| | | img_thumbnail.setOnClickListener(this) |
| | | // toggle(false) |
| | | |
| | | maxPic = intent.getIntExtra("maxPic", 3) |
| | | |
| | | onShootDone() |
| | | } |
| | | |
| | | override fun onResume() { |
| | | camera_view.start() |
| | | super.onResume() |
| | | camera_view.start() |
| | | } |
| | | |
| | | override fun onPause() { |
| | | camera_view.stop() |
| | | super.onPause() |
| | | camera_view.stop() |
| | | } |
| | | |
| | | override fun onDestroy() { |
| | | locationUtil.onDestroy() |
| | | super.onDestroy() |
| | | camera_view.destroy() |
| | | locationUtil.onDestroy() |
| | | } |
| | | |
| | | private fun toggle(isShot: Boolean = true) { |
| | | if (isShot) { |
| | | cl_part1.visibility = View.GONE |
| | | cl_part2.visibility = View.VISIBLE |
| | | } else { |
| | | cl_part1.visibility = View.VISIBLE |
| | | cl_part2.visibility = View.GONE |
| | | } |
| | | } |
| | | |
| | | private fun initLogoBitmap() { |
| | | logo = BitmapFactory.decodeResource(resources, R.mipmap.ic_logo) |
| | | } |
| | | |
| | | private fun initCamera() { |
| | | imageMergeUtil = ImageMergeUtil(this) |
| | | |
| | | // æ ¹æ®ç³»ç»æä¾çå¯éå辨çï¼éæ©åå½åæ¾ç¤ºåºåææ¥è¿ç |
| | | camera_view.setPictureSize{ |
| | | var min = -1//å½åå辨ç䏿å°å辨ççé¿å®½åå«å¯¹åºçå·®å¼çå |
| | | |
| | | // val screenWith = ScreenUtils.getScreenWidth(this) |
| | | // val screenHeight = ScreenUtils.getScreenHeight(this) |
| | | |
| | | val screenWith = camera_view.width |
| | | val screenHeight = camera_view.height |
| | | |
| | | val resultList = mutableListOf<Size>() |
| | | |
| | | it.forEach {size -> |
| | | if (size.width > screenWith) return@forEach |
| | | |
| | | val w = abs(size.width - screenWith) |
| | | val h = abs(size.height - screenHeight) |
| | | if (min < 0) { |
| | | min = w + h |
| | | resultList.add(0, size) |
| | | }else if (w + h < min) { |
| | | min = w + h |
| | | resultList.add(0, size) |
| | | } |
| | | } |
| | | resultList |
| | | } |
| | | camera_view.addCameraListener(object : CameraListener() { |
| | | override fun onCameraOpened(options: CameraOptions) { |
| | | super.onCameraOpened(options) |
| | | btn_shot.setOnClickListener(this@CameraActivity) |
| | | btn_shoot.setOnClickListener(this@CameraActivity) |
| | | } |
| | | |
| | | |
| | | override fun onPictureTaken(jpeg: ByteArray?) { |
| | | super.onPictureTaken(jpeg) |
| | | val d = Observable.create<String> { |
| | | jpeg?.let { |
| | | var b = toBitmap(it) |
| | | val x = txt_location.x - camera_view.x |
| | | val y = txt_location.y - camera_view.y |
| | | b?.let {bitmap -> |
| | | b = imageMergeUtil.mergeText(bitmap, txt_location.text.toString(), Pair(x, y)) |
| | | // todo: 2020/5/31 ä¿åå¾ç |
| | | // SystemServiceUtils.saveBitmap(0) |
| | | } |
| | | camera_view.stop() |
| | | jpeg?.let { |
| | | toBitmap(it)?.let {b-> |
| | | merge(b) |
| | | } |
| | | } |
| | | val pathList = arrayListOf<String>() |
| | | val intent = Intent() |
| | | intent.putStringArrayListExtra(BaseTakePicActivity.EXTRA_SELECT_IMAGES, pathList) |
| | | setResult(Activity.RESULT_OK, intent) |
| | | onBackPressed() |
| | | } |
| | | |
| | | override fun onCameraClosed() { |
| | | super.onCameraClosed() |
| | | onBackPressed() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | @SuppressLint("SetTextI18n") |
| | | private fun initLocation() { |
| | | locationUtil = LocationUtil(this) |
| | | locationUtil.startLocation { |
| | | val date = Date() |
| | | val time = DateFormatter.dateTimeFormat3.format(date) |
| | | val locationInfo = "ç»åº¦: ${it.longitude}" + |
| | | "\n纬度: ${it.latitude}" + |
| | | "\nå°å: ${it.address}" + |
| | | "\næ¶é´: $time" |
| | | runOnUiThread { |
| | | txt_location.text = locationInfo |
| | | txt_latitude.text = "ç»åº¦: ${round(it.longitude * 1000000) / 1000000}" |
| | | txt_longitude.text = "纬度: ${round(it.latitude * 1000000) / 1000000}" |
| | | txt_address.text = "å°å: ${it.address}" |
| | | txt_time.text = "æ¶é´: $time" |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onClick(v: View?) { |
| | | camera_view.capturePicture() |
| | | private fun merge(b: Bitmap) { |
| | | val d = Observable.create<Bitmap> { emitter -> |
| | | var newB: Bitmap |
| | | val width = camera_view.width |
| | | val height = camera_view.height |
| | | |
| | | var x = txt_latitude.x - camera_view.x |
| | | var y = txt_latitude.y - camera_view.y |
| | | var xScale = x / width |
| | | var yScale = y / height |
| | | newB = imageMergeUtil.mergeText(b, txt_latitude, Pair(x, y), xScale, yScale) |
| | | |
| | | x = txt_longitude.x - camera_view.x |
| | | y = txt_longitude.y - camera_view.y |
| | | xScale = x / width |
| | | yScale = y / height |
| | | newB = imageMergeUtil.mergeText(newB, txt_longitude, Pair(x, y), xScale, yScale) |
| | | |
| | | x = txt_address.x - camera_view.x |
| | | y = txt_address.y - camera_view.y |
| | | xScale = x / width |
| | | yScale = y / height |
| | | newB = imageMergeUtil.mergeText(newB, txt_address, Pair(x, y), xScale, yScale) |
| | | |
| | | x = txt_time.x - camera_view.x |
| | | y = txt_time.y - camera_view.y |
| | | xScale = x / width |
| | | yScale = y / height |
| | | newB = imageMergeUtil.mergeText(newB, txt_time, Pair(x, y), xScale, yScale) |
| | | |
| | | newB = imageMergeUtil.addLogo(newB, logo) |
| | | |
| | | // ç¼åå¾ç |
| | | val path = Environment.getExternalStorageDirectory().path + "/FlightFeather/Temp/" + UUIDGenerator.generateUUID(4) + ".jpg" |
| | | photoPath.add(path) |
| | | SystemServiceUtils.saveBitmap(path, newB) |
| | | |
| | | emitter.onNext(newB) |
| | | emitter.onComplete() |
| | | }.subscribeOn(Schedulers.io()) |
| | | .observeOn(AndroidSchedulers.mainThread()) |
| | | .subscribe { |
| | | // toggle(true) |
| | | |
| | | // ææloadingç»æ |
| | | onShootDone() |
| | | |
| | | // å¨ç¼©ç¥å¾ä¸æ¾ç¤ºææ°ä¸å¼ å¾ç, å¹¶æ´æ°ç¡®è®¤æé®æåæ¾ç¤º |
| | | img_thumbnail.setImageBitmap(it) |
| | | val t = "${getString(R.string.yes)}(${photoPath.size}/${maxPic})" |
| | | img_confirm.text = t |
| | | // 夿æ¯å¦è¾¾å°å
许æå¤§å¾çæ°é |
| | | if (photoPath.size == maxPic) { |
| | | // å¼¹åºæç¤ºæ¡ï¼ç¡®è®¤æè
éæ |
| | | DialogUtil2.showAlertDialog2(this, "æå¤æ${maxPic}å¼ ç
§ç", getString(R.string.yes), getString(R.string.reshoot), { d -> |
| | | d.dismiss() |
| | | onConfirm() |
| | | }, { d -> |
| | | d.dismiss() |
| | | onCancel() |
| | | camera_view.start() |
| | | }) |
| | | } else { |
| | | camera_view.start() |
| | | } |
| | | } |
| | | disposableList.add(d) |
| | | } |
| | | |
| | | private fun toBitmap(source: ByteArray): Bitmap? { |
| | |
| | | outputStream.write(source) |
| | | val exif = ExifInterface(file.absolutePath) |
| | | val exifOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, |
| | | ExifInterface.ORIENTATION_NORMAL) |
| | | ExifInterface.ORIENTATION_NORMAL) |
| | | orientation = ExifHelper.getOrientation(exifOrientation) |
| | | flip = exifOrientation == ExifInterface.ORIENTATION_FLIP_HORIZONTAL || |
| | | exifOrientation == ExifInterface.ORIENTATION_FLIP_VERTICAL || |
| | |
| | | matrix.setRotate(orientation.toFloat()) |
| | | val temp = bitmap |
| | | bitmap = Bitmap.createBitmap(bitmap!!, 0, 0, bitmap.width, |
| | | bitmap.height, matrix, true) |
| | | bitmap.height, matrix, true) |
| | | temp!!.recycle() |
| | | } |
| | | } catch (e: OutOfMemoryError) { |
| | |
| | | } |
| | | 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) |
| | | } |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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() |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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/dataanalysis/AnalysisOverViewFragment.kt ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.thirdappmodule.dataanalysis |
| | | package cn.flightfeather.thirdappmodule.module.dataanalysis |
| | | |
| | | import android.app.Dialog |
| | | import android.content.Context |
| | |
| | | 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/dataanalysis/AnalysisProblemFragment.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/AnalysisTabActivity.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/AnysisFragment.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/AnysisProgressFragment.java ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.thirdappmodule.dataanalysis; |
| | | package cn.flightfeather.thirdappmodule.module.dataanalysis; |
| | | |
| | | |
| | | import android.app.Dialog; |
| ÎļþÃû´Ó app/src/main/java/cn/flightfeather/thirdappmodule/dataanalysis/AnysisRankFragment.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/ProblemDetailFragment.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/ProgressDetailFragment.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/TaskProgressAdapter.java ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/rank/AnalysisRankActivity.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/rank/SceneRankContentFragment.kt ÐÞ¸Ä |
| | |
| | | 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/dataanalysis/rank/TownRankContentFragment.kt ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.thirdappmodule.dataanalysis.rank |
| | | package cn.flightfeather.thirdappmodule.module.dataanalysis.rank |
| | | |
| | | import android.os.Bundle |
| | | import android.support.v4.app.Fragment |
| | |
| | | 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 |
| | |
| | | |
| | | const val BUSINESS_TYPE_CAMERA = 5 |
| | | |
| | | /** |
| | | * @author riku |
| | | * Date: 2019/8/1 |
| | | * ä»»ææç
§ |
| | | */ |
| | | class MenuCameraActivity : BaseActivity() { |
| | | override fun getLayoutId(): Int = R.layout.dialog_camera_3 |
| | | |
| | |
| | | currentTypeName = title.text.toString() |
| | | //æç
§ |
| | | if (dataList[position].guid == null) { |
| | | PhotoUtil.pickPhoto2(this@MenuCameraActivity, TAKE_PHOTO, 9) |
| | | PhotoUtil.pickPhoto(this@MenuCameraActivity, TAKE_PHOTO, 9) |
| | | } |
| | | //æ¥çå¾ç |
| | | else { |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | } |
| | | |
| | | 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) { |
| | |
| | | } |
| | | } |
| | | |
| | | // å
·ä½é®é¢åå§å |
| | | 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) { |
| | |
| | | } |
| | | } |
| | | |
| | | // æäº¤é®é¢æé®åå§å |
| | | fab_take_evidence_ok.setOnClickListener { |
| | | val now = Date() |
| | | if (now.time - submitTime >= 1000) { |
| | |
| | | } |
| | | } |
| | | |
| | | // åæ¶æäº¤é®é¢æé®åå§å |
| | | 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() { |
| | |
| | | import java.util.* |
| | | import kotlin.collections.ArrayList |
| | | |
| | | /** |
| | | * @author riku |
| | | * Date: 2019/8/1 |
| | | * æé²æªæ½ |
| | | */ |
| | | class MenuNewGitActivity : BaseTakePicActivity() { |
| | | |
| | | override val picDeletable: Boolean = true |
| | |
| | | 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 |
| | | |
| | |
| | | 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("è¦å é¤çå¾çä¸åå¨") |
| | | } |
| | | } |
| | | } |
| | |
| | | viewModel.deleteMediaFile(deleteMediaFileList) |
| | | } |
| | | |
| | | /** |
| | | * 1. èªå¨å¹é
åå
éæ©çé®é¢ |
| | | * 2. éæ©é®é¢ç±»ååï¼æ´æ°å
·ä½é®é¢ä¸ææ¡é项 |
| | | * 3. åæ¥ä¿®æ¹å¤æ³¨å¤å¶æé®ç¶æ |
| | | * |
| | | */ |
| | | private fun onProblemTypeSelected(position: Int) { |
| | | val problemType = viewModel.problemFatherType.value?.get(position) |
| | | viewModel.refreshProblems(problemType) |
| | |
| | | for (i in problemNameList.indices) { |
| | | if (problemNameList[i].name == originProblemName) { |
| | | sp_take_evidence_select_problem.setSelection(i) |
| | | // å·æ°å¤å¶æé®ç¶æ |
| | | btn_copy_problem_des.isSelected = true |
| | | break |
| | | } |
| | | } |
| | |
| | | |
| | | 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) |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun getLayoutId(): Int = R.layout.activity_new_sub_task |
| | | |
| | | override fun getMapView(): MapView = map_view |
| | | |
| | | fun submitDialog() { |
| | | viewModel.generateTodayTask() |
| | |
| | | class NewTopTaskActivity : BaseMapActivity() { |
| | | override fun getMapView(): MapView = map_view |
| | | |
| | | override var translucent: Boolean = true |
| | | override var translucent: Boolean = false |
| | | |
| | | var topTask: Task? = null |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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() |
| | | } |
| | | |
| | | } |
| | |
| | | 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 |
| | | |
| | |
| | | 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>> { |
| | |
| | | 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 |
| | | } |
| | | } |
| | | |
| | |
| | | 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 |
| | |
| | | */ |
| | | 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) |
| | |
| | | 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() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | 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, |
| | |
| | | val mLocationOption = AMapLocationClientOption().apply { |
| | | isNeedAddress = true |
| | | locationMode = AMapLocationClientOption.AMapLocationMode.Hight_Accuracy |
| | | interval = 2000 |
| | | interval = 1000 |
| | | } |
| | | mLocationClient.setLocationOption(mLocationOption) |
| | | } |
| | |
| | | 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 |
| | | |
| | |
| | | private val bgWidth:Float |
| | | private val bgHeight: Float |
| | | private val textPaint:Paint |
| | | private val textPaint2:Paint |
| | | private val indexPaint:Paint |
| | | private val titlePaint:Paint |
| | | |
| | |
| | | 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 |
| | |
| | | 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? { |
| | |
| | | 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 { |
| | |
| | | }); |
| | | function1List.add(popupWindow -> { |
| | | Intent intent = new Intent(activity, CameraActivity.class); |
| | | intent.putExtra("maxPic", num); |
| | | activity.startActivityForResult(intent, requestCode); |
| | | popupWindow.dismiss(); |
| | | return null; |
| | |
| | | * 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 |
| | |
| | | private var tempRecyclerView: RecyclerView? = null |
| | | private var tempRefreshLayout: SwipeRefreshLayout? = null |
| | | |
| | | /** |
| | | * 卿¥å£[RecyclerViewSetInterface.initList]ä¸ä¼èªå¨åå§å |
| | | */ |
| | | override var adapter: BaseRecyclerAdapter<T>? = null |
| | | |
| | | private var mRecyclerView: RecyclerView? = null |
| | |
| | | } |
| | | } |
| | | |
| | | 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() |
| | |
| | | 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 |
| | | |
| | |
| | | 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) |
| | |
| | | |
| | | //******************************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 |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| | |
| | | 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" /> |
| | |
| | | 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" |
| | |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | tools:context=".module.common.CameraActivity"> |
| | | |
| | | <com.otaliastudios.cameraview.CameraView |
| | | android:id="@+id/camera_view" |
| | | <android.support.constraint.ConstraintLayout |
| | | android:id="@+id/cl_part1" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | app:cameraPictureSizeSmallest="false" |
| | | app:cameraPictureSizeBiggest="true" |
| | | app:cameraGestureTap="focus" |
| | | app:cameraGesturePinch="zoom" |
| | | app:cameraFacing="back" |
| | | app:cameraHdr="on" |
| | | app:cameraFlash="auto" |
| | | app:cameraWhiteBalance="auto" |
| | | app:cameraAudio="off" |
| | | app:cameraGrid="off" |
| | | app:cameraVideoCodec="deviceDefault"> |
| | | android:visibility="visible"> |
| | | |
| | | </com.otaliastudios.cameraview.CameraView> |
| | | <ImageView |
| | | android:id="@+id/img_cancel" |
| | | android:layout_width="30dp" |
| | | android:layout_height="30dp" |
| | | android:layout_margin="@dimen/dimen16" |
| | | android:elevation="@dimen/dimen2" |
| | | android:padding="@dimen/dimen8" |
| | | android:src="@drawable/icon_back_white" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | tools:ignore="UnusedAttribute" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/txt_location" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="@string/app_name" |
| | | android:textColor="@color/white" |
| | | android:layout_marginStart="@dimen/dimen16" |
| | | android:layout_marginBottom="@dimen/dimen16" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/btn_shot"/> |
| | | <Button |
| | | android:id="@+id/btn_shot" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="SHOT" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | android:layout_marginBottom="16dp"/> |
| | | <com.otaliastudios.cameraview.CameraView |
| | | android:id="@+id/camera_view" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="0dp" |
| | | app:cameraPictureSizeSmallest="false" |
| | | app:cameraPictureSizeBiggest="true" |
| | | app:cameraGestureTap="focus" |
| | | app:cameraGesturePinch="zoom" |
| | | app:cameraFacing="back" |
| | | app:cameraHdr="on" |
| | | app:cameraFlash="auto" |
| | | app:cameraWhiteBalance="auto" |
| | | app:cameraAudio="off" |
| | | app:cameraGrid="off" |
| | | app:cameraVideoCodec="deviceDefault" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/cl_part2"> |
| | | |
| | | </com.otaliastudios.cameraview.CameraView> |
| | | |
| | | <TextView |
| | | android:id="@+id/txt_latitude" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | tools:text="@string/app_name" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:layout_marginStart="@dimen/dimen16" |
| | | android:layout_marginEnd="@dimen/dimen16" |
| | | android:layout_marginBottom="@dimen/dimen2" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/txt_longitude"/> |
| | | <TextView |
| | | android:id="@+id/txt_longitude" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | tools:text="@string/app_name" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:layout_marginStart="@dimen/dimen16" |
| | | android:layout_marginEnd="@dimen/dimen16" |
| | | android:layout_marginBottom="@dimen/dimen2" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/txt_address"/> |
| | | <TextView |
| | | android:id="@+id/txt_address" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | tools:text="@string/app_name" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:layout_marginStart="@dimen/dimen16" |
| | | android:layout_marginEnd="@dimen/dimen16" |
| | | android:layout_marginBottom="@dimen/dimen2" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/txt_time"/> |
| | | <TextView |
| | | android:id="@+id/txt_time" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | tools:text="@string/app_name" |
| | | android:textColor="@color/white" |
| | | android:textSize="14sp" |
| | | android:layout_marginStart="@dimen/dimen16" |
| | | android:layout_marginEnd="@dimen/dimen16" |
| | | android:layout_marginBottom="@dimen/dimen16" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="@id/camera_view"/> |
| | | |
| | | <android.support.constraint.ConstraintLayout |
| | | android:id="@+id/cl_part2" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/transBlack" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/img_thumbnail" |
| | | android:layout_width="40dp" |
| | | android:layout_height="40dp" |
| | | android:layout_margin="@dimen/dimen16" |
| | | android:src="@drawable/bg_btngroup" |
| | | android:scaleType="centerCrop" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/btn_shoot" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | |
| | | <ProgressBar |
| | | android:id="@+id/pro_shooting" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:elevation="@dimen/dimen6" |
| | | android:indeterminateTint="@color/gray" |
| | | app:layout_constraintStart_toStartOf="@id/btn_shoot" |
| | | app:layout_constraintEnd_toEndOf="@id/btn_shoot" |
| | | app:layout_constraintTop_toTopOf="@id/btn_shoot" |
| | | app:layout_constraintBottom_toBottomOf="@id/btn_shoot"/> |
| | | |
| | | <android.support.design.widget.FloatingActionButton |
| | | android:id="@+id/btn_shoot" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | app:backgroundTint="@color/white" |
| | | android:layout_marginTop="@dimen/dimen16" |
| | | android:layout_marginBottom="@dimen/dimen16" |
| | | app:elevation="0dp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/img_confirm" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:paddingStart="@dimen/dimen8" |
| | | android:paddingEnd="@dimen/dimen8" |
| | | android:paddingTop="@dimen/dimen6" |
| | | android:paddingBottom="@dimen/dimen6" |
| | | android:layout_margin="@dimen/dimen16" |
| | | android:elevation="@dimen/dimen2" |
| | | android:text="@string/yes" |
| | | android:textColor="@color/primary_text" |
| | | android:background="@drawable/shape_button_green" |
| | | android:backgroundTint="@color/white" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintStart_toEndOf="@id/btn_shoot" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | tools:ignore="UnusedAttribute" /> |
| | | </android.support.constraint.ConstraintLayout> |
| | | </android.support.constraint.ConstraintLayout> |
| | | |
| | | </android.support.constraint.ConstraintLayout> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| | |
| | | android:layout_marginTop="@dimen/dimen8" |
| | | android:layout_marginBottom="@dimen/dimen8"> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical" |
| | | android:paddingBottom="30dp" |
| | | android:paddingLeft="18dp" |
| | | android:paddingRight="18dp" |
| | | android:paddingTop="12dp"> |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical" |
| | | android:paddingBottom="30dp" |
| | | android:paddingLeft="18dp" |
| | | android:paddingRight="18dp" |
| | | android:paddingTop="12dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_dialog_take_evidence_title" |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="é®é¢åè¯" |
| | | android:textColor="@color/primary_text" |
| | | android:textSize="18sp" /> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_type" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:text="é®é¢ç±»å" /> |
| | | android:orientation="horizontal"> |
| | | |
| | | <Spinner |
| | | android:id="@+id/sp_take_evidence_select_problem_type" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | | style="@style/SpinnerStyle.Black" |
| | | tools:listitem="@layout/item_spinner_drop_down" /> |
| | | <TextView |
| | | android:id="@+id/tv_dialog_take_evidence_title" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="é®é¢åè¯" |
| | | android:textColor="@color/primary_text" |
| | | android:textSize="18sp" /> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_chose" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:text="éæ©ä¸ä¸ªé®é¢" /> |
| | | |
| | | <Spinner |
| | | android:id="@+id/sp_take_evidence_select_problem" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | | style="@style/SpinnerStyle.Black" |
| | | tools:listitem="@layout/item_spinner_drop_down"/> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_take_evidence_problem_des" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:hint="é®é¢æè¿°(å¯é)" |
| | | android:textSize="@dimen/textSize_14" |
| | | android:visibility="visible" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_location" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="8dp" |
| | | android:text="ä½ç½®" /> |
| | | |
| | | <Spinner |
| | | android:id="@+id/sp_take_evidence_select_location" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | | style="@style/SpinnerStyle.Black" |
| | | tools:listitem="@layout/item_spinner_drop_down"/> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_take_evidence_location" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:hint="ä½ç½®å¤æ³¨(å¯é)" |
| | | android:textSize="@dimen/textSize_14"/> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_change_suggestion" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:visibility="visible"> |
| | | <TextView |
| | | android:id="@+id/tv_suggestion" |
| | | android:id="@+id/tv_type" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:text="é®é¢ç±»å" /> |
| | | |
| | | <Spinner |
| | | android:id="@+id/sp_take_evidence_select_problem_type" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | | style="@style/SpinnerStyle.Black" |
| | | tools:listitem="@layout/item_spinner_drop_down" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_chose" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="10dp" |
| | | android:text="éæ©ä¸ä¸ªé®é¢" /> |
| | | |
| | | <Spinner |
| | | android:id="@+id/sp_take_evidence_select_problem" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | | style="@style/SpinnerStyle.Black" |
| | | tools:listitem="@layout/item_spinner_drop_down"/> |
| | | |
| | | <android.support.constraint.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"> |
| | | <EditText |
| | | android:id="@+id/et_take_evidence_problem_des" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:hint="é®é¢æè¿°(å¯é)" |
| | | android:textSize="@dimen/textSize_14" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/btn_copy_problem_des"/> |
| | | <ImageView |
| | | android:id="@+id/btn_copy_problem_des" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:padding="@dimen/dimen8" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintTop_toTopOf="@id/et_take_evidence_problem_des" |
| | | app:layout_constraintBottom_toBottomOf="@id/et_take_evidence_problem_des" |
| | | android:src="@drawable/selector_btn_copy_delete" /> |
| | | </android.support.constraint.ConstraintLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_location" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="8dp" |
| | | android:text="@string/change_suggestion" /> |
| | | android:text="ä½ç½®" /> |
| | | |
| | | <Spinner |
| | | android:id="@+id/sp_take_evidence_select_suggestion" |
| | | android:id="@+id/sp_take_evidence_select_location" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | |
| | | tools:listitem="@layout/item_spinner_drop_down"/> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_take_evidence_suggestion" |
| | | android:id="@+id/et_take_evidence_location" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:hint="æ´æ¹å»ºè®®(å¯é)" |
| | | android:hint="ä½ç½®å¤æ³¨(å¯é)" |
| | | android:textSize="@dimen/textSize_14"/> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_change_suggestion" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:visibility="visible"> |
| | | <TextView |
| | | android:id="@+id/tv_suggestion" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="8dp" |
| | | android:text="@string/change_suggestion" /> |
| | | |
| | | <Spinner |
| | | android:id="@+id/sp_take_evidence_select_suggestion" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | | style="@style/SpinnerStyle.Black" |
| | | tools:listitem="@layout/item_spinner_drop_down"/> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_take_evidence_suggestion" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:hint="æ´æ¹å»ºè®®(å¯é)" |
| | | android:textSize="@dimen/textSize_14"/> |
| | | </LinearLayout> |
| | | |
| | | <android.support.constraint.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | |
| | | app:layout_constraintTop_toTopOf="parent"/> |
| | | </android.support.constraint.ConstraintLayout> |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </ScrollView> |
| | | </android.support.v7.widget.CardView> |
| | | |
| | |
| | | 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"/> |
| | |
| | | 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" |
| | |
| | | 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" |
| | |
| | | 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" |
| | |
| | | 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" |
| | |
| | | android:text="仿¥æ ä»»å¡" /> |
| | | </RelativeLayout> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_tody_task" |
| | | <LinearLayout |
| | | android:id="@+id/v_task_remind" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="46dp" |
| | | android:text="æ å¾
宿çä»»å¡" |
| | | android:visibility="gone" /> |
| | | android:layout_height="0dp" |
| | | android:visibility="visible" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toTopOf="@id/ll_buttons" |
| | | android:orientation="vertical"> |
| | | |
| | | <android.support.constraint.ConstraintLayout |
| | | android:id="@+id/cl_un_upload_pic" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/colorPrimary" |
| | | android:paddingTop="@dimen/dimen16" |
| | | android:paddingBottom="@dimen/dimen16" |
| | | android:paddingStart="@dimen/dimen8" |
| | | android:paddingEnd="@dimen/dimen8" |
| | | android:elevation="@dimen/dimen6" |
| | | tools:ignore="UnusedAttribute"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_un_upload_pic" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | tools:text="æ¬å°å¾çæªä¸ä¼ " |
| | | style="@style/TextStyle.Title" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/img_tip" |
| | | android:layout_width="@dimen/dimen8" |
| | | android:layout_height="@dimen/dimen8" |
| | | android:src="@drawable/icon_rank_1" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toStartOf="@id/img_arrow"/> |
| | | |
| | | <ImageView |
| | | android:id="@+id/img_arrow" |
| | | android:layout_width="26dp" |
| | | android:layout_height="26dp" |
| | | android:src="@drawable/ic_keyboard_arrow_right_light_blue_600_36dp" |
| | | android:tint="@color/white" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | </android.support.constraint.ConstraintLayout> |
| | | |
| | | <android.support.constraint.ConstraintLayout |
| | | android:id="@+id/cl_un_complete_task" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/colorPrimary" |
| | | android:paddingTop="@dimen/dimen16" |
| | | android:paddingBottom="@dimen/dimen16" |
| | | android:paddingStart="@dimen/dimen8" |
| | | android:paddingEnd="@dimen/dimen8" |
| | | android:layout_marginTop="@dimen/dimen4" |
| | | tools:ignore="UnusedAttribute"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_un_complete_task" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="仿¥æªå®æä»»å¡" |
| | | style="@style/TextStyle.Title" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_task_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | style="@style/TextStyle.Title" |
| | | android:textStyle="bold" |
| | | android:textSize="16sp" |
| | | tools:text="2个" |
| | | app:layout_constraintTop_toTopOf="parent" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent"/> |
| | | |
| | | </android.support.constraint.ConstraintLayout> |
| | | |
| | | <android.support.v7.widget.RecyclerView |
| | | android:id="@+id/rv_un_complete_task" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | tools:listitem="@layout/item_task_list_2" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_buttons" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:baselineAligned="false"> |
| | | android:baselineAligned="false" |
| | | app:layout_constraintBottom_toBottomOf="parent"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_container_todytask" |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:paddingTop="@dimen/dimen6" |
| | | android:paddingBottom="@dimen/dimen6" |
| | | android:background="@drawable/selector_bg_gray_or_white" |
| | | android:foreground="?android:attr/selectableItemBackground" |
| | | android:orientation="vertical"> |
| | | |
| | | <ImageView |
| | |
| | | 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 |
| | |
| | | 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" |
| | |
| | | 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 |
| | |
| | | android:textSize="11sp" /> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | </android.support.constraint.ConstraintLayout> |
| | | </android.support.v7.widget.CardView> |
| | | |
| | | <android.support.constraint.ConstraintLayout |
| | |
| | | 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"> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
| | |
| | | <string name="minus">- </string> |
| | | <string name="signed">å·²ç¾æ¶</string> |
| | | <string name="unsigned">æªç¾æ¶</string> |
| | | <string name="reshoot">éæ</string> |
| | | <string name="search">æç´¢</string> |
| | | |
| | | </resources> |
| | |
| | | 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 |
| | |
| | | /** |
| | | * @author riku |
| | | * Date: 2021/7/29 |
| | | * ç£å¯app主页 |
| | | */ |
| | | class DCMainActivity : MainActivity() { |
| | | override fun initModule() { |
| | |
| | | problemDetailAdapter.notifyDataSetChanged() |
| | | }) |
| | | |
| | | taskViewModel.subTaskList.observe(this, Observer { |
| | | taskViewModel.subTaskNameList.observe(this, Observer { |
| | | txt_subTask_content.setOnClickListener(this) |
| | | createSubTaskDialog() |
| | | }) |
| | |
| | | } |
| | | |
| | | 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() |
| | |
| | | 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 |
| | |
| | | |
| | | defaultConfig { |
| | | minSdkVersion 19 |
| | | targetSdkVersion 30 |
| | | targetSdkVersion 28 |
| | | versionCode 1 |
| | | versionName "1.0" |
| | | |