app/src/main/AndroidManifest.xml
@@ -42,7 +42,7 @@ android:networkSecurityConfig="@xml/network_config" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme" android:theme="@style/AppTheme.NoActionBar" tools:ignore="GoogleAppIndexingWarning, LockedOrientationActivity" tools:targetApi="n"> <!-- 调试版高德地图Key,根据开发电脑不同可能有所改变 --> @@ -101,10 +101,12 @@ android:theme="@style/AppFullScreenTheme" /> <activity android:name=".activity.ProblemDetailActivity" android:screenOrientation="portrait" /> android:screenOrientation="portrait" android:theme="@style/AppTheme"/> <activity android:name=".activity.UploadMediaFilesActivity" android:screenOrientation="portrait" /> android:screenOrientation="portrait" android:theme="@style/AppTheme"/> <activity android:name=".activity.ScenseMapActivity" android:screenOrientation="portrait" @@ -123,10 +125,12 @@ android:theme="@style/AppTheme.NoActionBar" /> <activity android:name=".activity.GitDetailActivity" android:screenOrientation="portrait" /> android:screenOrientation="portrait" android:theme="@style/AppTheme"/> <activity android:name=".activity.GradeActivity" android:screenOrientation="portrait" /> android:screenOrientation="portrait" android:theme="@style/AppTheme"/> <activity android:name=".activity.TaskDetailActivity" android:screenOrientation="portrait" @@ -141,14 +145,16 @@ android:theme="@style/AppTheme.NoActionBar" /> <activity android:name=".activity.SubTaskMapActivity" android:screenOrientation="portrait" /> android:screenOrientation="portrait" android:theme="@style/AppTheme"/> <activity android:name=".activity.MapActivity" android:screenOrientation="portrait" android:theme="@style/AppTheme.NoActionBar" /> <activity android:name=".activity.DebugTransSiteLatlngActivity" android:screenOrientation="portrait" /> android:screenOrientation="portrait" android:theme="@style/AppTheme"/> <activity android:name=".activity.MOVMapActivity" android:screenOrientation="portrait" @@ -186,7 +192,8 @@ android:theme="@style/AppTheme.NoActionBar" /> <activity android:name=".module.inspection.MenuGradeActivity" android:screenOrientation="portrait" /> android:screenOrientation="portrait" android:theme="@style/AppTheme"/> <activity android:name=".module.inspection.InspectionDetailActivity" android:theme="@style/AppTheme.NoActionBar" /> app/src/main/java/cn/flightfeather/thirdapp/adapter/PhotoListAdapter.java
@@ -9,13 +9,14 @@ import android.view.ViewGroup; import android.widget.ImageView; import com.bumptech.glide.Glide; import java.io.File; import java.util.List; import cn.flightfeather.thirdapp.R; import cn.flightfeather.thirdapp.bean.Mediafile; import cn.flightfeather.thirdapp.task.DownloadAndSetImageTask; import cn.flightfeather.thirdapp.task.SetImageTask; /** * Created by note_ff_1602 on 2018/1/30. @@ -46,8 +47,14 @@ File file = new File(Environment.getExternalStorageDirectory(),mediafile.getPath()+mediafile.getDescription()); if (file.exists()){ SetImageTask task = new SetImageTask(file,holder.iv_photo); task.execute(); // SetImageTask task = new SetImageTask(file,holder.iv_photo); // task.execute(); // String url = CommonApplication.getInstance().ROOT_URL_RELEASE_IMAGE + mediafile.getExtension1() + mediafile.getGuid() + ".jpg"; Glide.with(context) .load(file) .placeholder(R.drawable.icon_add_photo_waite) .override(100,100) .into(holder.iv_photo); }else { DownloadAndSetImageTask task = new DownloadAndSetImageTask(mediafile,holder.iv_photo,context); task.execute(); app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionDetailActivity.kt
@@ -13,6 +13,7 @@ import android.view.View import android.view.animation.AnimationUtils import android.widget.LinearLayout import cn.flightfeather.thirdapp.CommonApplication import cn.flightfeather.thirdapp.R import cn.flightfeather.thirdapp.activity.GradeActivity import cn.flightfeather.thirdapp.activity.MapActivity @@ -140,25 +141,6 @@ viewModel.inspection.observe(this, Observer { it?.apply { if (extension1 != null) { val list = extension1.split(";").map{str -> str.split(",").map {str2 -> str2.toDoubleOrNull() ?: 0.0 }.takeIf { l-> l.size == 2 }.let {latLng-> LatLng(latLng?.get(1) ?: 0.0, latLng?.get(0) ?: 0.0) } } drawPolyline(list) list.firstOrNull()?.let {p-> myLatLngList.add( MyLatLng( p, drawableId = R.drawable.icon_mark_start_blue, selected = true ) ) } } onDataLoaded(0) } }) @@ -331,6 +313,34 @@ if (result) { showMenu() refreshMenuStatus(taskStatus) viewModel.inspection.value?.extension1?.let{ val list = it.split(";").map{str -> str.split(",").map {str2 -> str2.toDoubleOrNull() ?: 0.0 }.takeIf { l-> l.size == 2 }.let {latLng-> LatLng(latLng?.get(1) ?: 0.0, latLng?.get(0) ?: 0.0) } } //道路监测点和道路类型的场景,直接展示轨迹;其余场景只有管理员和政府部门可以查看 if ( (viewModel.scene.value?.typeid?.toString() == Constant.SCENE_TYPE9 || viewModel.scene.value?.typeid?.toString() == Constant.SCENE_TYPE10) || (CommonApplication.getInstance().currentUser.usertypeid == 0.toByte() || CommonApplication.getInstance().currentUser.usertypeid == 2.toByte()) ) { drawPolyline(list) } list.firstOrNull()?.let {p-> myLatLngList.add( MyLatLng( p, drawableId = R.drawable.icon_mark_start_blue, selected = true ) ) } } } else { toast("请等待数据加载完成") } @@ -573,14 +583,12 @@ private fun startTracking() { if ( // viewModel.scene.value?.typeid?.toString() != Constant.SCENE_TYPE9 || viewModel.subTask.value == null || viewModel.subTask.value?.status != Domain.TASK_STATUS_RUNNING ) return //当继续执行正在进行中的任务时,根据是否有历史轨迹记录来判断是否开启 if (viewModel.inspection.value?.extension1 != null) { needTracking = true } needTracking = true if (!needTracking || timerTaskRunning) return @@ -618,7 +626,13 @@ val distance = AMapUtils.calculateLineDistance(l1, l2) if (distance >= 5) { extension1 = "${extension1};${lng},${lat}" drawPolyline(LatLng(lat, lng)) //道路监测点和道路类型的场景,直接展示轨迹;其余场景只有管理员和政府部门可以查看 if ( (viewModel.scene.value?.typeid?.toString() == Constant.SCENE_TYPE9 || viewModel.scene.value?.typeid?.toString() == Constant.SCENE_TYPE10) || (CommonApplication.getInstance().currentUser.usertypeid == 0.toByte() || CommonApplication.getInstance().currentUser.usertypeid == 2.toByte()) ) { drawPolyline(LatLng(lat, lng)) } } } } @@ -628,7 +642,7 @@ } private fun trackingDone() { if (!needTracking || !timerTaskRunning) return if (!timerTaskRunning) return aMap.moveCamera(CameraUpdateFactory.zoomTo(zoomLevel)) app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuCameraActivity.kt
@@ -37,6 +37,7 @@ class MenuCameraActivity : BaseActivity() { override fun getLayoutId(): Int = R.layout.dialog_camera lateinit var viewModel: MenuCameraViewModel var subTask: Subtask? = null