fix: 合并代码
@ -19,6 +19,8 @@ data class SignBean(
|
|||||||
val geometry: String,
|
val geometry: String,
|
||||||
//底部文字
|
//底部文字
|
||||||
val bottomText: String,
|
val bottomText: String,
|
||||||
|
//底部右侧文字
|
||||||
|
val bottomRightText: String,
|
||||||
//要素code类型
|
//要素code类型
|
||||||
val elementCode: Int
|
val elementCode: Int
|
||||||
) : Parcelable
|
) : Parcelable
|
@ -1,6 +1,5 @@
|
|||||||
package com.navinfo.omqs.hilt
|
package com.navinfo.omqs.hilt
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import com.navinfo.collect.library.map.NIMapController
|
import com.navinfo.collect.library.map.NIMapController
|
||||||
import com.navinfo.omqs.db.RealmOperateHelper
|
import com.navinfo.omqs.db.RealmOperateHelper
|
||||||
import com.navinfo.omqs.db.RoomAppDatabase
|
import com.navinfo.omqs.db.RoomAppDatabase
|
||||||
@ -12,7 +11,6 @@ import dagger.Module
|
|||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import dagger.hilt.InstallIn
|
import dagger.hilt.InstallIn
|
||||||
import dagger.hilt.android.components.ActivityRetainedComponent
|
import dagger.hilt.android.components.ActivityRetainedComponent
|
||||||
import dagger.hilt.android.qualifiers.ActivityContext
|
|
||||||
import dagger.hilt.android.scopes.ActivityRetainedScoped
|
import dagger.hilt.android.scopes.ActivityRetainedScoped
|
||||||
|
|
||||||
@InstallIn(ActivityRetainedComponent::class)
|
@InstallIn(ActivityRetainedComponent::class)
|
||||||
|
@ -50,13 +50,13 @@ interface RetrofitNetworkServiceAPI {
|
|||||||
@Url url: String
|
@Url url: String
|
||||||
): Response<ResponseBody>
|
): Response<ResponseBody>
|
||||||
|
|
||||||
@GET("/devcp/task?evaluatType=2")
|
@GET("/devcp/getEvaluationTask?evaluatType=2")
|
||||||
suspend fun retrofitGetTaskList(
|
suspend fun retrofitGetTaskList(
|
||||||
@Query("evaluatorNo") evaluatorNo: String,
|
@Query("evaluatorNo") evaluatorNo: String,
|
||||||
): Response<DefaultTaskResponse<List<TaskBean>>>
|
): Response<DefaultTaskResponse<List<TaskBean>>>
|
||||||
|
|
||||||
@Headers("Content-Type: application/json")
|
@Headers("Content-Type: application/json")
|
||||||
@POST("/devcp/upload")
|
@POST("/devcp/uploadSceneProblem")
|
||||||
suspend fun postRequest(@Body listEvaluationInfo: List<EvaluationInfo>?): Response<ResponseBody>
|
suspend fun postRequest(@Body listEvaluationInfo: List<EvaluationInfo>?): Response<ResponseBody>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +39,8 @@ class MainActivity : BaseActivity() {
|
|||||||
private lateinit var binding: ActivityMainBinding
|
private lateinit var binding: ActivityMainBinding
|
||||||
private val viewModel by viewModels<MainViewModel>()
|
private val viewModel by viewModels<MainViewModel>()
|
||||||
|
|
||||||
|
var switchFragment = false
|
||||||
|
|
||||||
//注入地图控制器
|
//注入地图控制器
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var mapController: NIMapController
|
lateinit var mapController: NIMapController
|
||||||
@ -116,9 +118,9 @@ class MainActivity : BaseActivity() {
|
|||||||
viewModel.liveDataMenuState.observe(this) {
|
viewModel.liveDataMenuState.observe(this) {
|
||||||
binding.mainActivityMenu.isSelected = it
|
binding.mainActivityMenu.isSelected = it
|
||||||
if (it == true) {
|
if (it == true) {
|
||||||
binding.mainActivityMenuLayout.visibility = View.VISIBLE
|
binding.mainActivityMenuGroup.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
binding.mainActivityMenuLayout.visibility = View.GONE
|
binding.mainActivityMenuGroup.visibility = View.INVISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -226,6 +228,32 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* zoomin
|
||||||
|
*/
|
||||||
|
fun zoomInOnclick(view: View) {
|
||||||
|
mapController.animationHandler.zoomIn()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* zoomOut
|
||||||
|
*/
|
||||||
|
fun zoomOutOnclick(view: View) {
|
||||||
|
mapController.animationHandler.zoomOut()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
fun onSwitchFragment() {
|
||||||
|
switchFragment = !switchFragment
|
||||||
|
binding.mainActivityFragmentSwitch.isSelected = switchFragment
|
||||||
|
if (switchFragment) {
|
||||||
|
binding.mainActivityFragmentGroup.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
binding.mainActivityFragmentGroup.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击录音按钮
|
* 点击录音按钮
|
||||||
|
@ -216,6 +216,7 @@ class MainViewModel @Inject constructor(
|
|||||||
linkId = linkId,
|
linkId = linkId,
|
||||||
geometry = element.geometry,
|
geometry = element.geometry,
|
||||||
bottomText = SignUtil.getSignBottomText(element),
|
bottomText = SignUtil.getSignBottomText(element),
|
||||||
|
bottomRightText = SignUtil.getSignBottomRightText(element),
|
||||||
elementCode = element.code
|
elementCode = element.code
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -26,6 +26,7 @@ class SignAdapter(private var itemListener: ((Int, SignBean) -> Unit?)? = null)
|
|||||||
bd.signMainIcon.background = holder.viewBinding.root.context.getDrawable(item.iconId)
|
bd.signMainIcon.background = holder.viewBinding.root.context.getDrawable(item.iconId)
|
||||||
bd.signMainIcon.text = item.iconText
|
bd.signMainIcon.text = item.iconText
|
||||||
bd.signBottomText.text = item.bottomText
|
bd.signBottomText.text = item.bottomText
|
||||||
|
bd.signBottomRightText.text = item.bottomRightText
|
||||||
bd.root.setOnClickListener {
|
bd.root.setOnClickListener {
|
||||||
itemListener?.invoke(position, item)
|
itemListener?.invoke(position, item)
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@ import com.navinfo.collect.library.sensor.ISensor.enmConnectionStatus;
|
|||||||
import com.navinfo.collect.library.sensor.ISensor.SensorWorkingMode;
|
import com.navinfo.collect.library.sensor.ISensor.SensorWorkingMode;
|
||||||
import com.navinfo.collect.library.garminvirbxe.SensorParams;
|
import com.navinfo.collect.library.garminvirbxe.SensorParams;
|
||||||
import com.navinfo.collect.library.garminvirbxe.HostBean;
|
import com.navinfo.collect.library.garminvirbxe.HostBean;
|
||||||
import com.navinfo.collect.library.system.VLCApplication;
|
|
||||||
import com.navinfo.omqs.Constant;
|
import com.navinfo.omqs.Constant;
|
||||||
import com.navinfo.omqs.R;
|
import com.navinfo.omqs.R;
|
||||||
import com.navinfo.omqs.ui.activity.map.MainActivity;
|
import com.navinfo.omqs.ui.activity.map.MainActivity;
|
||||||
@ -295,7 +294,7 @@ public class CommonDialog extends Dialog implements SurfaceHolder.Callback, IVid
|
|||||||
mOneBtConnect.setPressed(false);
|
mOneBtConnect.setPressed(false);
|
||||||
mOneBtConnect.setText("一键连接");
|
mOneBtConnect.setText("一键连接");
|
||||||
mStartOrEndTakePicture.setEnabled(false);
|
mStartOrEndTakePicture.setEnabled(false);
|
||||||
mOneBtConnect.setBackgroundResource(R.drawable.btn_connect_bg_enabled);
|
mOneBtConnect.setBackgroundResource(R.drawable.shape_btn_connect_bg_enabled);
|
||||||
updateCameraResources(1, getmDeviceNum());
|
updateCameraResources(1, getmDeviceNum());
|
||||||
|
|
||||||
Log.e("AAA", "未知返回");
|
Log.e("AAA", "未知返回");
|
||||||
@ -485,7 +484,7 @@ public class CommonDialog extends Dialog implements SurfaceHolder.Callback, IVid
|
|||||||
mShareUtil.setConnectstate(Constant.USER_ID, connectstate);
|
mShareUtil.setConnectstate(Constant.USER_ID, connectstate);
|
||||||
stopVideo();
|
stopVideo();
|
||||||
mOneBtConnect.setPressed(true);
|
mOneBtConnect.setPressed(true);
|
||||||
mOneBtConnect.setBackgroundResource(R.drawable.btn_red_disconnect_bg);
|
mOneBtConnect.setBackgroundResource(R.drawable.shape_btn_red_disconnect_bg);
|
||||||
mOneBtConnect.setText("断开连接!");
|
mOneBtConnect.setText("断开连接!");
|
||||||
//停止获取GPS状态
|
//停止获取GPS状态
|
||||||
if (getmDeviceNum() == 1)
|
if (getmDeviceNum() == 1)
|
||||||
@ -679,7 +678,7 @@ public class CommonDialog extends Dialog implements SurfaceHolder.Callback, IVid
|
|||||||
if (connectstate) {
|
if (connectstate) {
|
||||||
mOneBtConnect.setPressed(true);
|
mOneBtConnect.setPressed(true);
|
||||||
|
|
||||||
mOneBtConnect.setBackgroundResource(R.drawable.btn_red_disconnect_bg);
|
mOneBtConnect.setBackgroundResource(R.drawable.shape_btn_red_disconnect_bg);
|
||||||
|
|
||||||
mOneBtConnect.setText("断开连接!");
|
mOneBtConnect.setText("断开连接!");
|
||||||
|
|
||||||
@ -857,7 +856,7 @@ public class CommonDialog extends Dialog implements SurfaceHolder.Callback, IVid
|
|||||||
//停止当前活动
|
//停止当前活动
|
||||||
takephotoManager.StopContinuousTakePhoto(mHostBean, getmDeviceNum());
|
takephotoManager.StopContinuousTakePhoto(mHostBean, getmDeviceNum());
|
||||||
|
|
||||||
mOneBtConnect.setBackgroundResource(R.drawable.btn_connect_bg_enabled);
|
mOneBtConnect.setBackgroundResource(R.drawable.shape_btn_connect_bg_enabled);
|
||||||
|
|
||||||
mOneBtConnect.setText("一键连接!");
|
mOneBtConnect.setText("一键连接!");
|
||||||
|
|
||||||
@ -1076,7 +1075,7 @@ public class CommonDialog extends Dialog implements SurfaceHolder.Callback, IVid
|
|||||||
connectstate = false;
|
connectstate = false;
|
||||||
mShareUtil.setConnectstate(Constant.USER_ID, connectstate);
|
mShareUtil.setConnectstate(Constant.USER_ID, connectstate);
|
||||||
mOneBtConnect.setPressed(false);
|
mOneBtConnect.setPressed(false);
|
||||||
mOneBtConnect.setBackgroundResource(R.drawable.btn_connect_bg_enabled);
|
mOneBtConnect.setBackgroundResource(R.drawable.shape_btn_connect_bg_enabled);
|
||||||
mOneBtConnect.setText("一键连接");
|
mOneBtConnect.setText("一键连接");
|
||||||
//增加按钮状态控制
|
//增加按钮状态控制
|
||||||
mStartOrEndTakePicture.setEnabled(false);
|
mStartOrEndTakePicture.setEnabled(false);
|
||||||
|
@ -23,6 +23,10 @@ import androidx.navigation.findNavController
|
|||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
|
||||||
private lateinit var binding: FragmentEvaluationResultBinding
|
private lateinit var binding: FragmentEvaluationResultBinding
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 和[PhenomenonFragment],[ProblemLinkFragment],[EvaluationResultFragment]共用同一个viewModel
|
||||||
|
*/
|
||||||
private val viewModel by shareViewModels<EvaluationResultViewModel>("QsRecode")
|
private val viewModel by shareViewModels<EvaluationResultViewModel>("QsRecode")
|
||||||
|
|
||||||
// private val args:EmptyFragmentArgs by navArgs()
|
// private val args:EmptyFragmentArgs by navArgs()
|
||||||
|
@ -29,10 +29,10 @@ class LeftAdapter(private var itemListener: ((Int, String) -> Unit?)? = null) :
|
|||||||
val title = data[position]
|
val title = data[position]
|
||||||
bd.itemId.text = title
|
bd.itemId.text = title
|
||||||
if (selectTitle == title) {
|
if (selectTitle == title) {
|
||||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_tittle_blue_bg_4_radius)
|
bd.itemId.setBackgroundResource(R.drawable.shape_rect_white_2dp_bg)
|
||||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.highFontColor))
|
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.highFontColor))
|
||||||
} else {
|
} else {
|
||||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_white_bg_4_radius)
|
bd.itemId.setBackgroundResource(R.drawable.shape_rect_white_2dp_bg)
|
||||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
|
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
|
||||||
}
|
}
|
||||||
bd.root.setOnClickListener {
|
bd.root.setOnClickListener {
|
||||||
|
@ -32,10 +32,10 @@ class MiddleAdapter(private var itemListener: ((Int, String) -> Unit?)? = null)
|
|||||||
layoutParams.width = 115
|
layoutParams.width = 115
|
||||||
bd.itemLayout.layoutParams = layoutParams
|
bd.itemLayout.layoutParams = layoutParams
|
||||||
if (selectTitle == title) {
|
if (selectTitle == title) {
|
||||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_blue_bg_4_radius)
|
bd.itemId.setBackgroundResource(R.drawable.shape_bg_blue_bg_4_radius)
|
||||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.white))
|
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.white))
|
||||||
} else {
|
} else {
|
||||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_white_bg_4_radius)
|
bd.itemId.setBackgroundResource(R.drawable.shape_rect_white_2dp_bg)
|
||||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
|
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
|
||||||
}
|
}
|
||||||
bd.root.setOnClickListener {
|
bd.root.setOnClickListener {
|
||||||
|
@ -19,6 +19,9 @@ class PhenomenonFragment :
|
|||||||
BaseFragment() {
|
BaseFragment() {
|
||||||
private var _binding: FragmentPhenomenonBinding? = null
|
private var _binding: FragmentPhenomenonBinding? = null
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
/**
|
||||||
|
* 和[PhenomenonFragment],[ProblemLinkFragment],[EvaluationResultFragment]共用同一个viewModel
|
||||||
|
*/
|
||||||
private val viewModel: EvaluationResultViewModel by shareViewModels("QsRecode")
|
private val viewModel: EvaluationResultViewModel by shareViewModels("QsRecode")
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
@ -112,14 +115,14 @@ class PhenomenonFragment :
|
|||||||
viewModel.liveDataMiddleTypeList.observe(viewLifecycleOwner) {
|
viewModel.liveDataMiddleTypeList.observe(viewLifecycleOwner) {
|
||||||
middleAdapter.refreshData(it)
|
middleAdapter.refreshData(it)
|
||||||
}
|
}
|
||||||
binding.phenomenonDrawer.setOnClickListener {
|
// binding.phenomenonDrawer.setOnClickListener {
|
||||||
when (binding.group.visibility) {
|
// when (binding.group.visibility) {
|
||||||
View.INVISIBLE, View.GONE ->
|
// View.INVISIBLE, View.GONE ->
|
||||||
binding.group.visibility = View.VISIBLE
|
// binding.group.visibility = View.VISIBLE
|
||||||
else ->
|
// else ->
|
||||||
binding.group.visibility = View.GONE
|
// binding.group.visibility = View.GONE
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
viewModel.getClassTypeList()
|
viewModel.getClassTypeList()
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.navinfo.omqs.ui.fragment.evaluationresult
|
package com.navinfo.omqs.ui.fragment.evaluationresult
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
@ -14,6 +15,11 @@ import com.navinfo.omqs.ui.other.shareViewModels
|
|||||||
class ProblemLinkFragment : BaseFragment() {
|
class ProblemLinkFragment : BaseFragment() {
|
||||||
private var _binding: FragmentProblemLinkBinding? = null
|
private var _binding: FragmentProblemLinkBinding? = null
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 和[PhenomenonFragment],[ProblemLinkFragment],[EvaluationResultFragment]共用同一个viewModel
|
||||||
|
*/
|
||||||
|
|
||||||
private val viewModel: EvaluationResultViewModel by shareViewModels("QsRecode")
|
private val viewModel: EvaluationResultViewModel by shareViewModels("QsRecode")
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
@ -40,11 +46,13 @@ class ProblemLinkFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
binding.linkRightRecyclerview.adapter = rightAdapter
|
binding.linkRightRecyclerview.adapter = rightAdapter
|
||||||
//右侧菜单增加组标题
|
//右侧菜单增加组标题
|
||||||
binding.linkRightRecyclerview.addItemDecoration(
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
RightGroupHeaderDecoration(
|
binding.linkRightRecyclerview.addItemDecoration(
|
||||||
requireContext()
|
RightGroupHeaderDecoration(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
//右侧菜单查询数据监听
|
//右侧菜单查询数据监听
|
||||||
viewModel.liveDataRightTypeList.observe(viewLifecycleOwner) {
|
viewModel.liveDataRightTypeList.observe(viewLifecycleOwner) {
|
||||||
rightAdapter.refreshData(it)
|
rightAdapter.refreshData(it)
|
||||||
|
@ -114,7 +114,7 @@ class PersonalCenterFragment : BaseFragment(), FSAFActivityCallbacks {
|
|||||||
.animateTo(GeoPoint(40.1012346774074730, 116.25571303257621))
|
.animateTo(GeoPoint(40.1012346774074730, 116.25571303257621))
|
||||||
}
|
}
|
||||||
R.id.personal_center_menu_task_list -> {
|
R.id.personal_center_menu_task_list -> {
|
||||||
findNavController().navigate(R.id.TaskListFragment)
|
findNavController().navigate(R.id.TaskManagerFragment)
|
||||||
}
|
}
|
||||||
R.id.personal_center_menu_qs_record_list -> {
|
R.id.personal_center_menu_qs_record_list -> {
|
||||||
findNavController().navigate(R.id.QsRecordListFragment)
|
findNavController().navigate(R.id.QsRecordListFragment)
|
||||||
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.navinfo.omqs.ui.fragment.tasklist
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.navinfo.collect.library.data.entity.HadLinkDvoBean
|
||||||
|
import com.navinfo.omqs.R
|
||||||
|
import com.navinfo.omqs.databinding.AdapterTaskBinding
|
||||||
|
import com.navinfo.omqs.ui.other.BaseRecyclerViewAdapter
|
||||||
|
import com.navinfo.omqs.ui.other.BaseViewHolder
|
||||||
|
|
||||||
|
|
||||||
|
interface TaskAdapterCallback {
|
||||||
|
fun itemOnClick(bean: HadLinkDvoBean)
|
||||||
|
fun editOnclick(position: Int, bean: HadLinkDvoBean)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前任务适配器
|
||||||
|
*/
|
||||||
|
class TaskAdapter(
|
||||||
|
private val callback: TaskAdapterCallback
|
||||||
|
) : BaseRecyclerViewAdapter<HadLinkDvoBean>() {
|
||||||
|
private var selectPosition = -1
|
||||||
|
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||||
|
val viewBinding =
|
||||||
|
AdapterTaskBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||||
|
return BaseViewHolder(viewBinding)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewRecycled(holder: BaseViewHolder) {
|
||||||
|
super.onViewRecycled(holder)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
|
||||||
|
val binding: AdapterTaskBinding =
|
||||||
|
holder.viewBinding as AdapterTaskBinding
|
||||||
|
val bean = data[position]
|
||||||
|
binding.taskLinkPid.text = "PID:${bean.linkPid}"
|
||||||
|
binding.taskMesh.text = "mesh:${bean.mesh}"
|
||||||
|
binding.root.isSelected = selectPosition == position
|
||||||
|
binding.root.setOnClickListener {
|
||||||
|
val pos = holder.adapterPosition
|
||||||
|
if (selectPosition != pos) {
|
||||||
|
val lastPos = selectPosition
|
||||||
|
selectPosition = pos
|
||||||
|
if (lastPos > -1 && lastPos < itemCount) {
|
||||||
|
notifyItemChanged(lastPos)
|
||||||
|
}
|
||||||
|
binding.root.isSelected = true
|
||||||
|
callback.itemOnClick(bean)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.taskEdit.isSelected = bean.reason != ""
|
||||||
|
binding.taskEdit.setOnClickListener {
|
||||||
|
callback.editOnclick(position, bean)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemViewRes(position: Int): Int {
|
||||||
|
return R.layout.adapter_task
|
||||||
|
}
|
||||||
|
|
||||||
|
fun resetSelect() {
|
||||||
|
selectPosition = -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.navinfo.omqs.ui.fragment.tasklist
|
||||||
|
|
||||||
|
import android.app.AlertDialog
|
||||||
|
import android.content.DialogInterface
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.EditText
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.navinfo.collect.library.data.entity.HadLinkDvoBean
|
||||||
|
import com.navinfo.omqs.R
|
||||||
|
import com.navinfo.omqs.databinding.FragmentTaskBinding
|
||||||
|
import com.navinfo.omqs.databinding.FragmentTaskListBinding
|
||||||
|
import com.navinfo.omqs.http.taskdownload.TaskDownloadManager
|
||||||
|
import com.navinfo.omqs.http.taskupload.TaskUploadManager
|
||||||
|
import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||||
|
import com.navinfo.omqs.ui.other.shareViewModels
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前任务的道路列表
|
||||||
|
*/
|
||||||
|
@AndroidEntryPoint
|
||||||
|
class TaskFragment : BaseFragment() {
|
||||||
|
|
||||||
|
private var _binding: FragmentTaskBinding? = null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 和[TaskManagerFragment],[TaskListFragment],[TaskFragment]共用同一个viewModel
|
||||||
|
*/
|
||||||
|
private val viewModel by shareViewModels<TaskViewModel>("Task")
|
||||||
|
private val binding get() = _binding!!
|
||||||
|
private val adapter: TaskAdapter by lazy {
|
||||||
|
TaskAdapter(object : TaskAdapterCallback {
|
||||||
|
override fun itemOnClick(bean: HadLinkDvoBean) {
|
||||||
|
viewModel.showCurrentLink(bean)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun editOnclick(position: Int, bean: HadLinkDvoBean) {
|
||||||
|
showLinkEditDialog(position, bean)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
_binding = FragmentTaskBinding.inflate(inflater, container, false)
|
||||||
|
return binding.root
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
val layoutManager = LinearLayoutManager(context)
|
||||||
|
//// 设置 RecyclerView 的固定大小,避免在滚动时重新计算视图大小和布局,提高性能
|
||||||
|
binding.taskRecyclerview.setHasFixedSize(true)
|
||||||
|
binding.taskRecyclerview.layoutManager = layoutManager
|
||||||
|
binding.taskRecyclerview.adapter = adapter
|
||||||
|
viewModel.liveDataTaskLinks.observe(viewLifecycleOwner) {
|
||||||
|
adapter.resetSelect()
|
||||||
|
adapter.refreshData(it)
|
||||||
|
}
|
||||||
|
viewModel.getTaskList(requireContext())
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
super.onDestroyView()
|
||||||
|
_binding = null
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示link编辑dialog
|
||||||
|
*/
|
||||||
|
private fun showLinkEditDialog(position: Int, bean: HadLinkDvoBean) {
|
||||||
|
val view = this.layoutInflater.inflate(R.layout.dialog_view_edittext, null)
|
||||||
|
val inputDialog = MaterialAlertDialogBuilder(
|
||||||
|
requireContext()
|
||||||
|
).setTitle("标记原因").setView(view)
|
||||||
|
var editText = view.findViewById<EditText>(R.id.dialog_edittext)
|
||||||
|
editText.setText(bean.reason)
|
||||||
|
inputDialog.setNegativeButton("取消") { dialog, _ ->
|
||||||
|
dialog.dismiss()
|
||||||
|
}
|
||||||
|
inputDialog.setPositiveButton("确定") { dialog, _ ->
|
||||||
|
lifecycleScope.launch {
|
||||||
|
val text = editText.text.toString()
|
||||||
|
viewModel.saveLinkReason(bean, text)
|
||||||
|
adapter.notifyItemChanged(position)
|
||||||
|
dialog.dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
inputDialog.show()
|
||||||
|
}
|
||||||
|
}
|
@ -5,8 +5,8 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import com.navinfo.omqs.R
|
|
||||||
import com.navinfo.collect.library.data.entity.TaskBean
|
import com.navinfo.collect.library.data.entity.TaskBean
|
||||||
|
import com.navinfo.omqs.R
|
||||||
import com.navinfo.omqs.databinding.AdapterTaskListBinding
|
import com.navinfo.omqs.databinding.AdapterTaskListBinding
|
||||||
import com.navinfo.omqs.http.taskdownload.TaskDownloadManager
|
import com.navinfo.omqs.http.taskdownload.TaskDownloadManager
|
||||||
import com.navinfo.omqs.http.taskupload.TaskUploadManager
|
import com.navinfo.omqs.http.taskupload.TaskUploadManager
|
||||||
@ -25,11 +25,13 @@ import com.navinfo.omqs.ui.other.BaseViewHolder
|
|||||||
*/
|
*/
|
||||||
class TaskListAdapter(
|
class TaskListAdapter(
|
||||||
private val downloadManager: TaskDownloadManager,
|
private val downloadManager: TaskDownloadManager,
|
||||||
private val uploadManager: TaskUploadManager
|
private val uploadManager: TaskUploadManager,
|
||||||
|
private var itemListener: ((Int, TaskBean) -> Unit?)? = null
|
||||||
) : BaseRecyclerViewAdapter<TaskBean>() {
|
) : BaseRecyclerViewAdapter<TaskBean>() {
|
||||||
|
private var selectPosition = -1
|
||||||
|
|
||||||
|
private
|
||||||
private val downloadBtnClick = View.OnClickListener() {
|
val downloadBtnClick = View.OnClickListener() {
|
||||||
if (it.tag != null) {
|
if (it.tag != null) {
|
||||||
val taskBean = data[it.tag as Int]
|
val taskBean = data[it.tag as Int]
|
||||||
when (taskBean.status) {
|
when (taskBean.status) {
|
||||||
@ -53,7 +55,7 @@ class TaskListAdapter(
|
|||||||
val taskBean = data[it.tag as Int]
|
val taskBean = data[it.tag as Int]
|
||||||
Log.e("jingo", "开始上传 ${taskBean.syncStatus}")
|
Log.e("jingo", "开始上传 ${taskBean.syncStatus}")
|
||||||
when (taskBean.syncStatus) {
|
when (taskBean.syncStatus) {
|
||||||
FileUploadStatus.NONE, FileUploadStatus.ERROR,FileUploadStatus.WAITING -> {
|
FileUploadStatus.NONE, FileUploadStatus.ERROR, FileUploadStatus.WAITING -> {
|
||||||
uploadManager.start(taskBean.id)
|
uploadManager.start(taskBean.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -80,7 +82,7 @@ class TaskListAdapter(
|
|||||||
holder.tag = taskBean.id.toString()
|
holder.tag = taskBean.id.toString()
|
||||||
changeViews(binding, taskBean)
|
changeViews(binding, taskBean)
|
||||||
downloadManager.addTask(taskBean)
|
downloadManager.addTask(taskBean)
|
||||||
downloadManager.observer(taskBean.id, holder, DownloadObserver(taskBean.id, binding))
|
downloadManager.observer(taskBean.id, holder, DownloadObserver(taskBean.id, holder))
|
||||||
uploadManager.addTask(taskBean)
|
uploadManager.addTask(taskBean)
|
||||||
uploadManager.observer(taskBean.id, holder, UploadObserver(taskBean.id, binding))
|
uploadManager.observer(taskBean.id, holder, UploadObserver(taskBean.id, binding))
|
||||||
binding.taskDownloadBtn.tag = position
|
binding.taskDownloadBtn.tag = position
|
||||||
@ -91,14 +93,32 @@ class TaskListAdapter(
|
|||||||
binding.taskCityName.text = taskBean.cityName
|
binding.taskCityName.text = taskBean.cityName
|
||||||
binding.taskDataVersion.text = "版本号:${taskBean.dataVersion}"
|
binding.taskDataVersion.text = "版本号:${taskBean.dataVersion}"
|
||||||
binding.taskColor.setTextColor(taskBean.color)
|
binding.taskColor.setTextColor(taskBean.color)
|
||||||
// binding.offlineMapCitySize.text = cityBean.getFileSizeText()
|
binding.root.isSelected = selectPosition == position
|
||||||
|
binding.root.setOnClickListener {
|
||||||
|
val pos = holder.adapterPosition
|
||||||
|
if (selectPosition != pos) {
|
||||||
|
val lastPos = selectPosition
|
||||||
|
selectPosition = pos
|
||||||
|
if (lastPos > -1) {
|
||||||
|
notifyItemChanged(lastPos)
|
||||||
|
}
|
||||||
|
binding.root.isSelected = true
|
||||||
|
itemListener?.invoke(position, taskBean)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class DownloadObserver(val id: Int, val binding: AdapterTaskListBinding) :
|
inner class DownloadObserver(val id: Int, val holder: BaseViewHolder) :
|
||||||
Observer<TaskBean> {
|
Observer<TaskBean> {
|
||||||
override fun onChanged(t: TaskBean?) {
|
override fun onChanged(taskBean: TaskBean?) {
|
||||||
if (id == t?.id)
|
taskBean?.let { bean ->
|
||||||
changeViews(binding, t)
|
if (id.toString() == holder.tag) {
|
||||||
|
val binding: AdapterTaskListBinding =
|
||||||
|
holder.viewBinding as AdapterTaskListBinding
|
||||||
|
changeViews(binding, bean)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,22 +11,31 @@ import com.navinfo.omqs.databinding.FragmentTaskListBinding
|
|||||||
import com.navinfo.omqs.http.taskdownload.TaskDownloadManager
|
import com.navinfo.omqs.http.taskdownload.TaskDownloadManager
|
||||||
import com.navinfo.omqs.http.taskupload.TaskUploadManager
|
import com.navinfo.omqs.http.taskupload.TaskUploadManager
|
||||||
import com.navinfo.omqs.ui.fragment.BaseFragment
|
import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||||
|
import com.navinfo.omqs.ui.other.shareViewModels
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class TaskListFragment : BaseFragment(){
|
class TaskListFragment : BaseFragment() {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var downloadManager: TaskDownloadManager
|
lateinit var downloadManager: TaskDownloadManager
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var uploadManager: TaskUploadManager
|
lateinit var uploadManager: TaskUploadManager
|
||||||
private var _binding: FragmentTaskListBinding? = null
|
private var _binding: FragmentTaskListBinding? = null
|
||||||
private val viewModel by viewModels<TaskListViewModel>()
|
|
||||||
|
/**
|
||||||
|
* 和[TaskManagerFragment],[TaskListFragment],[TaskFragment]共用同一个viewModel
|
||||||
|
*/
|
||||||
|
private val viewModel by shareViewModels<TaskViewModel>("Task")
|
||||||
private val binding get() = _binding!!
|
private val binding get() = _binding!!
|
||||||
private val adapter: TaskListAdapter by lazy {
|
private val adapter: TaskListAdapter by lazy {
|
||||||
TaskListAdapter(
|
TaskListAdapter(
|
||||||
downloadManager,uploadManager
|
downloadManager, uploadManager
|
||||||
)
|
) { position, taskBean ->
|
||||||
|
viewModel.setSelectTaskBean(taskBean)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
@ -44,16 +53,13 @@ class TaskListFragment : BaseFragment(){
|
|||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
val layoutManager = LinearLayoutManager(context)
|
val layoutManager = LinearLayoutManager(context)
|
||||||
//// 设置 RecyclerView 的固定大小,避免在滚动时重新计算视图大小和布局,提高性能
|
//// 设置 RecyclerView 的固定大小,避免在滚动时重新计算视图大小和布局,提高性能
|
||||||
binding.taskRecyclerview.setHasFixedSize(true)
|
binding.taskListRecyclerview.setHasFixedSize(true)
|
||||||
binding.taskRecyclerview.layoutManager = layoutManager
|
binding.taskListRecyclerview.layoutManager = layoutManager
|
||||||
binding.taskRecyclerview.adapter = adapter
|
binding.taskListRecyclerview.adapter = adapter
|
||||||
viewModel.liveDataTaskList.observe(viewLifecycleOwner) {
|
viewModel.liveDataTaskList.observe(viewLifecycleOwner) {
|
||||||
adapter.refreshData(it)
|
adapter.refreshData(it)
|
||||||
}
|
}
|
||||||
viewModel.getTaskList(requireContext())
|
|
||||||
binding.taskBack.setOnClickListener{
|
|
||||||
findNavController().navigateUp()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.navinfo.omqs.ui.fragment.tasklist
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.fragment.app.FragmentActivity
|
||||||
|
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 离线地图主页面,viewpage适配器
|
||||||
|
*/
|
||||||
|
class TaskManagerAdapter(activity: FragmentActivity) :
|
||||||
|
FragmentStateAdapter(activity) {
|
||||||
|
private val taskListFragment = TaskListFragment()
|
||||||
|
private val taskFragment = TaskFragment()
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun createFragment(position: Int): Fragment {
|
||||||
|
return when (position) {
|
||||||
|
0 -> taskFragment
|
||||||
|
else ->
|
||||||
|
taskListFragment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.navinfo.omqs.ui.fragment.tasklist
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.navigation.fragment.findNavController
|
||||||
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
import com.navinfo.omqs.databinding.FragmentTaskManagerBinding
|
||||||
|
import com.navinfo.omqs.ui.fragment.BaseFragment
|
||||||
|
import com.navinfo.omqs.ui.other.shareViewModels
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评测任务viewpager管理页面
|
||||||
|
*/
|
||||||
|
@AndroidEntryPoint
|
||||||
|
class TaskManagerFragment : BaseFragment() {
|
||||||
|
private var _binding: FragmentTaskManagerBinding? = null
|
||||||
|
|
||||||
|
private val binding get() = _binding!!
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 和[TaskManagerFragment],[TaskListFragment],[TaskFragment]共用同一个viewModel
|
||||||
|
*/
|
||||||
|
private val viewModel by shareViewModels<TaskViewModel>("Task")
|
||||||
|
|
||||||
|
override fun onCreateView(
|
||||||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||||||
|
savedInstanceState: Bundle?
|
||||||
|
): View {
|
||||||
|
_binding = FragmentTaskManagerBinding.inflate(inflater, container, false)
|
||||||
|
return binding.root
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
//禁止滑动,因为页面在抽屉里,和抽屉的滑动有冲突
|
||||||
|
binding.taskManagerViewpager.isUserInputEnabled = false
|
||||||
|
//创建viewpager2的适配器
|
||||||
|
binding.taskManagerViewpager.adapter = activity?.let { TaskManagerAdapter(it) }
|
||||||
|
//绑定viewpager2与tabLayout
|
||||||
|
TabLayoutMediator(
|
||||||
|
binding.taskManagerTabLayout,
|
||||||
|
binding.taskManagerViewpager
|
||||||
|
) { tab, position ->
|
||||||
|
when (position) {
|
||||||
|
0 -> tab.text = "当前任务"
|
||||||
|
1 -> tab.text = "任务列表"
|
||||||
|
}
|
||||||
|
}.attach()
|
||||||
|
viewModel.getTaskList(requireContext())
|
||||||
|
binding.taskBack.setOnClickListener {
|
||||||
|
findNavController().navigateUp()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
super.onDestroyView()
|
||||||
|
_binding = null
|
||||||
|
}
|
||||||
|
}
|
@ -3,14 +3,15 @@ package com.navinfo.omqs.ui.fragment.tasklist
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.util.Log
|
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.navinfo.collect.library.map.NIMapController
|
import com.navinfo.collect.library.data.entity.HadLinkDvoBean
|
||||||
import com.navinfo.omqs.Constant
|
|
||||||
import com.navinfo.collect.library.data.entity.TaskBean
|
import com.navinfo.collect.library.data.entity.TaskBean
|
||||||
|
import com.navinfo.collect.library.map.NIMapController
|
||||||
|
import com.navinfo.collect.library.utils.GeometryTools
|
||||||
|
import com.navinfo.omqs.Constant
|
||||||
import com.navinfo.omqs.http.NetResult
|
import com.navinfo.omqs.http.NetResult
|
||||||
import com.navinfo.omqs.http.NetworkService
|
import com.navinfo.omqs.http.NetworkService
|
||||||
import com.navinfo.omqs.tools.FileManager
|
import com.navinfo.omqs.tools.FileManager
|
||||||
@ -24,16 +25,29 @@ import javax.inject.Inject
|
|||||||
|
|
||||||
|
|
||||||
@HiltViewModel
|
@HiltViewModel
|
||||||
class TaskListViewModel @Inject constructor(
|
class TaskViewModel @Inject constructor(
|
||||||
private val networkService: NetworkService,
|
private val networkService: NetworkService,
|
||||||
private val mapController: NIMapController
|
private val mapController: NIMapController
|
||||||
) : ViewModel() {
|
) : ViewModel() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用来更新任务列表
|
||||||
|
*/
|
||||||
val liveDataTaskList = MutableLiveData<List<TaskBean>>()
|
val liveDataTaskList = MutableLiveData<List<TaskBean>>()
|
||||||
|
|
||||||
val colors =
|
/**
|
||||||
|
* 用来更新当前任务
|
||||||
|
*/
|
||||||
|
val liveDataTaskLinks = MutableLiveData<List<HadLinkDvoBean>>()
|
||||||
|
private val colors =
|
||||||
arrayOf(Color.RED, Color.YELLOW, Color.BLUE, Color.MAGENTA, Color.GREEN, Color.CYAN)
|
arrayOf(Color.RED, Color.YELLOW, Color.BLUE, Color.MAGENTA, Color.GREEN, Color.CYAN)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前选中的任务
|
||||||
|
*/
|
||||||
|
private var currentSelectTaskBean: TaskBean? = null
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下载任务列表
|
* 下载任务列表
|
||||||
*/
|
*/
|
||||||
@ -54,7 +68,6 @@ class TaskListViewModel @Inject constructor(
|
|||||||
).findFirst()
|
).findFirst()
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
task.fileSize = item.fileSize
|
task.fileSize = item.fileSize
|
||||||
Log.e("jingo", "当前文件大小 ${task.fileSize}")
|
|
||||||
task.status = item.status
|
task.status = item.status
|
||||||
task.currentSize = item.currentSize
|
task.currentSize = item.currentSize
|
||||||
task.color = item.color
|
task.color = item.color
|
||||||
@ -106,12 +119,94 @@ class TaskListViewModel @Inject constructor(
|
|||||||
// }
|
// }
|
||||||
// niMapController.lineHandler.omdbTaskLinkLayer.update()
|
// niMapController.lineHandler.omdbTaskLinkLayer.update()
|
||||||
liveDataTaskList.postValue(taskList)
|
liveDataTaskList.postValue(taskList)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
mapController.lineHandler.omdbTaskLinkLayer.removeAll()
|
// mapController.lineHandler.omdbTaskLinkLayer.removeAll()
|
||||||
for (item in taskList) {
|
// if(taskList.isNotEmpty()){
|
||||||
mapController.lineHandler.omdbTaskLinkLayer.setLineColor(Color.valueOf(item.color))
|
// mapController.lineHandler.omdbTaskLinkLayer.addLineList(item.hadLinkDvoList)
|
||||||
mapController.lineHandler.omdbTaskLinkLayer.addLineList(item.hadLinkDvoList)
|
// }
|
||||||
|
// for (item in taskList) {
|
||||||
|
// mapController.lineHandler.omdbTaskLinkLayer.setLineColor(Color.valueOf(item.color))
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置当前选择的任务,并高亮当前任务的所有link
|
||||||
|
*/
|
||||||
|
fun setSelectTaskBean(taskBean: TaskBean) {
|
||||||
|
currentSelectTaskBean = taskBean
|
||||||
|
liveDataTaskLinks.value = taskBean.hadLinkDvoList
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
mapController.lineHandler.omdbTaskLinkLayer.removeAll()
|
||||||
|
mapController.lineHandler.omdbTaskLinkLayer.addLineList(taskBean.hadLinkDvoList)
|
||||||
|
var maxX = 0.0
|
||||||
|
var maxY = 0.0
|
||||||
|
var minX = 0.0
|
||||||
|
var minY = 0.0
|
||||||
|
for (item in taskBean.hadLinkDvoList) {
|
||||||
|
val geometry = GeometryTools.createGeometry(item.geometry)
|
||||||
|
val envelope = geometry.envelopeInternal
|
||||||
|
if (envelope.maxX > maxX) {
|
||||||
|
maxX = envelope.maxX
|
||||||
}
|
}
|
||||||
|
if (envelope.maxY > maxY) {
|
||||||
|
maxY = envelope.maxY
|
||||||
|
}
|
||||||
|
if (envelope.minX < minX || minX == 0.0) {
|
||||||
|
minX = envelope.minX
|
||||||
|
}
|
||||||
|
if (envelope.minY < minY || minY == 0.0) {
|
||||||
|
minY = envelope.minY
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mapController.animationHandler.animateToBox(
|
||||||
|
maxX = maxX,
|
||||||
|
maxY = maxY,
|
||||||
|
minX = minX,
|
||||||
|
minY = minY
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高亮当前选中的link
|
||||||
|
*/
|
||||||
|
fun showCurrentLink(link: HadLinkDvoBean) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
mapController.lineHandler.omdbTaskLinkLayer.showSelectLine(link)
|
||||||
|
val geometry = GeometryTools.createGeometry(link.geometry)
|
||||||
|
val envelope = geometry.envelopeInternal
|
||||||
|
mapController.animationHandler.animateToBox(
|
||||||
|
maxX = envelope.maxX,
|
||||||
|
maxY = envelope.maxY,
|
||||||
|
minX = envelope.minX,
|
||||||
|
minY = envelope.minY
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCleared() {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
mapController.lineHandler.omdbTaskLinkLayer.clearSelectLine()
|
||||||
|
}
|
||||||
|
super.onCleared()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
suspend fun saveLinkReason(bean: HadLinkDvoBean, text: String) {
|
||||||
|
withContext(Dispatchers.IO) {
|
||||||
|
currentSelectTaskBean?.let {
|
||||||
|
for (item in it.hadLinkDvoList) {
|
||||||
|
if (item.linkPid == bean.linkPid) {
|
||||||
|
item.reason = text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val realm = Realm.getDefaultInstance()
|
||||||
|
realm.executeTransaction {
|
||||||
|
realm.copyToRealmOrUpdate(currentSelectTaskBean)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,8 +12,8 @@ class SignUtil {
|
|||||||
*/
|
*/
|
||||||
fun getSignIconText(data: RenderEntity): String {
|
fun getSignIconText(data: RenderEntity): String {
|
||||||
return when (data.code) {
|
return when (data.code) {
|
||||||
//常规点限速
|
//常规点限速,条件点限速
|
||||||
4002 -> getSpeedLimitText(data)
|
4002, 4003 -> getSpeedLimitText(data)
|
||||||
// //道路种别
|
// //道路种别
|
||||||
// 2008 -> getKindCodeIcon(data)
|
// 2008 -> getKindCodeIcon(data)
|
||||||
// //道路方向
|
// //道路方向
|
||||||
@ -26,8 +26,12 @@ class SignUtil {
|
|||||||
|
|
||||||
fun getSignBottomText(data: RenderEntity): String {
|
fun getSignBottomText(data: RenderEntity): String {
|
||||||
return when (data.code) {
|
return when (data.code) {
|
||||||
|
//可变点限速
|
||||||
|
4004 -> "可变点限速"
|
||||||
//常规点限速
|
//常规点限速
|
||||||
4002 -> "常规点限速"
|
4002 -> "常规点限速"
|
||||||
|
//常点限速
|
||||||
|
4003 -> "条件点限速"
|
||||||
//道路种别
|
//道路种别
|
||||||
2008 -> "道路种别"
|
2008 -> "道路种别"
|
||||||
//道路方向
|
//道路方向
|
||||||
@ -38,6 +42,64 @@ class SignUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 右下角文字
|
||||||
|
*/
|
||||||
|
fun getSignBottomRightText(data: RenderEntity): String {
|
||||||
|
return when (data.code) {
|
||||||
|
//常点限速
|
||||||
|
4003 -> getConditionLimitText(data)
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件点限速文字
|
||||||
|
*/
|
||||||
|
|
||||||
|
fun getConditionLimitText(data: RenderEntity): String {
|
||||||
|
var stringBuffer = StringBuffer()
|
||||||
|
try {
|
||||||
|
val dependent = data.properties["speedDependent"]
|
||||||
|
dependent?.let {
|
||||||
|
val dependentInt = it.toInt()
|
||||||
|
for (i in 31 downTo 0) {
|
||||||
|
val bit = (dependentInt shr i) and 1
|
||||||
|
if (bit == 1) {
|
||||||
|
when (i) {
|
||||||
|
0 -> stringBuffer.append("学校 ")
|
||||||
|
1 -> stringBuffer.append("雾 ")
|
||||||
|
2 -> stringBuffer.append("雨 ")
|
||||||
|
3 -> stringBuffer.append("结冰 ")
|
||||||
|
4 -> stringBuffer.append("其他天气 ")
|
||||||
|
5 -> stringBuffer.append("减速带 ")
|
||||||
|
6 -> stringBuffer.append("时间 ")
|
||||||
|
7 -> stringBuffer.append("车辆 ")
|
||||||
|
8 -> stringBuffer.append("建议 ")
|
||||||
|
9 -> stringBuffer.append("雪 ")
|
||||||
|
10 -> stringBuffer.append("其他 ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (e: Exception) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return stringBuffer.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isBitSet(number: Int, n: Int): Boolean {
|
||||||
|
// 创建一个二进制数,只有第 n 个 bit 位是 1,其他 bit 位是 0
|
||||||
|
val mask = 1 shl (n - 1)
|
||||||
|
|
||||||
|
// 将原始二进制数与上面创建的二进制数进行位运算
|
||||||
|
val result = number and mask
|
||||||
|
|
||||||
|
// 判断运算结果是否为 0
|
||||||
|
return result != 0
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取限速值文字
|
* 获取限速值文字
|
||||||
*/
|
*/
|
||||||
@ -85,7 +147,9 @@ class SignUtil {
|
|||||||
//车道数
|
//车道数
|
||||||
2041 -> getLaneNumIcon(data)
|
2041 -> getLaneNumIcon(data)
|
||||||
//限速
|
//限速
|
||||||
4002 -> getSpeedLimitIcon(data)
|
4002, 4003 -> getSpeedLimitIcon(data)
|
||||||
|
//可变点限速
|
||||||
|
4004 -> R.drawable.icon_change_limit
|
||||||
else -> R.drawable.icon_speed_limit
|
else -> R.drawable.icon_speed_limit
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,24 +163,24 @@ class SignUtil {
|
|||||||
try {
|
try {
|
||||||
val kind = data.properties["kind"]
|
val kind = data.properties["kind"]
|
||||||
return when (kind!!.toInt()) {
|
return when (kind!!.toInt()) {
|
||||||
1 -> R.mipmap.icon_kind_code_k1
|
1 -> R.drawable.icon_kind_code_k1
|
||||||
2 -> R.mipmap.icon_kind_code_k2
|
2 -> R.drawable.icon_kind_code_k2
|
||||||
3 -> R.mipmap.icon_kind_code_k3
|
3 -> R.drawable.icon_kind_code_k3
|
||||||
4 -> R.mipmap.icon_kind_code_k4
|
4 -> R.drawable.icon_kind_code_k4
|
||||||
6 -> R.mipmap.icon_kind_code_k6
|
6 -> R.drawable.icon_kind_code_k6
|
||||||
7 -> R.mipmap.icon_kind_code_k7
|
7 -> R.drawable.icon_kind_code_k7
|
||||||
8 -> R.mipmap.icon_kind_code_k8
|
8 -> R.drawable.icon_kind_code_k8
|
||||||
9 -> R.mipmap.icon_kind_code_k9
|
9 -> R.drawable.icon_kind_code_k9
|
||||||
10 -> R.mipmap.icon_kind_code_k10
|
10 -> R.drawable.icon_kind_code_k10
|
||||||
11 -> R.mipmap.icon_kind_code_k11
|
11 -> R.drawable.icon_kind_code_k11
|
||||||
13 -> R.mipmap.icon_kind_code_k13
|
13 -> R.drawable.icon_kind_code_k13
|
||||||
15 -> R.mipmap.icon_kind_code_k15
|
15 -> R.drawable.icon_kind_code_k15
|
||||||
else -> R.mipmap.icon_kind_code
|
else -> R.drawable.icon_kind_code
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e("jingo", "获取种别面板ICON出错 $e")
|
Log.e("jingo", "获取种别面板ICON出错 $e")
|
||||||
}
|
}
|
||||||
return R.mipmap.icon_kind_code
|
return R.drawable.icon_kind_code
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,41 +190,41 @@ class SignUtil {
|
|||||||
try {
|
try {
|
||||||
val lineNum = data.properties["laneNum"]
|
val lineNum = data.properties["laneNum"]
|
||||||
return when (lineNum!!.toInt()) {
|
return when (lineNum!!.toInt()) {
|
||||||
1 -> R.mipmap.icon_lane_num1
|
1 -> R.drawable.icon_lane_num1
|
||||||
2 -> R.mipmap.icon_lane_num2
|
2 -> R.drawable.icon_lane_num2
|
||||||
3 -> R.mipmap.icon_lane_num3
|
3 -> R.drawable.icon_lane_num3
|
||||||
4 -> R.mipmap.icon_lane_num4
|
4 -> R.drawable.icon_lane_num4
|
||||||
5 -> R.mipmap.icon_lane_num5
|
5 -> R.drawable.icon_lane_num5
|
||||||
6 -> R.mipmap.icon_lane_num6
|
6 -> R.drawable.icon_lane_num6
|
||||||
7 -> R.mipmap.icon_lane_num7
|
7 -> R.drawable.icon_lane_num7
|
||||||
8 -> R.mipmap.icon_lane_num8
|
8 -> R.drawable.icon_lane_num8
|
||||||
9 -> R.mipmap.icon_lane_num9
|
9 -> R.drawable.icon_lane_num9
|
||||||
10 -> R.mipmap.icon_lane_num10
|
10 -> R.drawable.icon_lane_num10
|
||||||
11 -> R.mipmap.icon_lane_num11
|
11 -> R.drawable.icon_lane_num11
|
||||||
12 -> R.mipmap.icon_lane_num12
|
12 -> R.drawable.icon_lane_num12
|
||||||
else -> R.mipmap.icon_lane_num1
|
else -> R.drawable.icon_lane_num1
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e("jingo", "获取车道数面板ICON出错 $e")
|
Log.e("jingo", "获取车道数面板ICON出错 $e")
|
||||||
}
|
}
|
||||||
return R.mipmap.icon_road_direction
|
return R.drawable.icon_road_direction
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getRoadDirection(data: RenderEntity): Int {
|
fun getRoadDirection(data: RenderEntity): Int {
|
||||||
try {
|
try {
|
||||||
val direct = data.properties["direct"]
|
val direct = data.properties["direct"]
|
||||||
return when (direct!!.toInt()) {
|
return when (direct!!.toInt()) {
|
||||||
0 -> R.mipmap.icon_road_direction
|
0 -> R.drawable.icon_road_direction
|
||||||
1 -> R.mipmap.icon_road_direction
|
1 -> R.drawable.icon_road_direction
|
||||||
2 -> R.mipmap.icon_road_direction
|
2 -> R.drawable.icon_road_direction
|
||||||
3 -> R.mipmap.icon_road_direction
|
3 -> R.drawable.icon_road_direction
|
||||||
-99 -> R.mipmap.icon_road_direction
|
-99 -> R.drawable.icon_road_direction
|
||||||
else -> R.mipmap.icon_road_direction
|
else -> R.drawable.icon_road_direction
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e("jingo", "获取道路方向面板ICON出错 $e")
|
Log.e("jingo", "获取道路方向面板ICON出错 $e")
|
||||||
}
|
}
|
||||||
return R.mipmap.icon_road_direction
|
return R.drawable.icon_road_direction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:state_enabled="false" android:color="#8cc1ff"/>
|
|
||||||
<item android:state_checked="true" android:color="@color/white"></item>
|
|
||||||
<item android:state_selected="true" android:color="@color/white"></item>
|
|
||||||
<item android:state_pressed="true" android:color="@color/white"></item>
|
|
||||||
<item android:color="#108ee9"></item>
|
|
||||||
</selector>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:state_checked="true" android:color="#FF3030"></item>
|
|
||||||
<item android:state_selected="true" android:color="#FF3030"></item>
|
|
||||||
<item android:color="#1ABBFE"></item>
|
|
||||||
</selector>
|
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:state_enabled="false" android:color="@color/white" />
|
|
||||||
<item android:state_pressed="true" android:color="@color/white" />
|
|
||||||
<item android:state_selected="true" android:color="@color/white" />
|
|
||||||
<item android:state_checked="true" android:color="@color/white" />
|
|
||||||
<item android:color="@color/black" />
|
|
||||||
</selector>
|
|
@ -1,5 +1,10 @@
|
|||||||
<vector android:height="24dp" android:tint="#100F0F"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:viewportHeight="24" android:viewportWidth="24"
|
android:width="24dp"
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:height="24dp"
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
|
android:tint="#100F0F"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z" />
|
||||||
</vector>
|
</vector>
|
||||||
|
5
app/src/main/res/drawable-v24/baseline_edit_note_48.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#91909A"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M3,10h11v2H3V10zM3,8h11V6H3V8zM3,16h7v-2H3V16zM18.01,12.87l0.71,-0.71c0.39,-0.39 1.02,-0.39 1.41,0l0.71,0.71c0.39,0.39 0.39,1.02 0,1.41l-0.71,0.71L18.01,12.87zM17.3,13.58l-5.3,5.3V21h2.12l5.3,-5.3L17.3,13.58z"/>
|
||||||
|
</vector>
|
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#4953ED"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M3,10h11v2H3V10zM3,8h11V6H3V8zM3,16h7v-2H3V16zM18.01,12.87l0.71,-0.71c0.39,-0.39 1.02,-0.39 1.41,0l0.71,0.71c0.39,0.39 0.39,1.02 0,1.41l-0.71,0.71L18.01,12.87zM17.3,13.58l-5.3,5.3V21h2.12l5.3,-5.3L17.3,13.58z"/>
|
||||||
|
</vector>
|
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="12dp" android:tint="#4953FD"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="12dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z"/>
|
||||||
|
</vector>
|
@ -1,5 +0,0 @@
|
|||||||
<vector android:height="24dp" android:tint="#18FD00"
|
|
||||||
android:viewportHeight="24" android:viewportWidth="24"
|
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
|
|
||||||
</vector>
|
|
@ -1,5 +0,0 @@
|
|||||||
<vector android:height="24dp" android:tint="#100F0F"
|
|
||||||
android:viewportHeight="24" android:viewportWidth="24"
|
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
|
|
||||||
</vector>
|
|
5
app/src/main/res/drawable-v24/ic_baseline_search_24.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="@color/input_edit_hint_color"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@color/input_edit_hint_color" android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||||
|
</vector>
|
@ -1,5 +1,19 @@
|
|||||||
<vector android:height="24dp" android:tint="#2C2C2C"
|
<vector android:height="24dp" android:tint="#2C2C2C"
|
||||||
android:viewportHeight="24" android:viewportWidth="24"
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M18,2h-8L4,8v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4C20,2.9 19.1,2 18,2zM12,17l-4,-4h3V9.02L13,9v4h3L12,17z"/>
|
<path android:fillColor="@android:color/white" android:pathData="M18,
|
||||||
|
2h-8L4,
|
||||||
|
8v12c0,
|
||||||
|
1.1 0.9,
|
||||||
|
2 2,
|
||||||
|
2h12c1.1,
|
||||||
|
0 2,
|
||||||
|
-0.9 2,
|
||||||
|
-2V4C20,
|
||||||
|
2.9 19.1,
|
||||||
|
2 18,
|
||||||
|
2zM12,
|
||||||
|
17l-4,
|
||||||
|
-4h3V9.02L13,
|
||||||
|
9v4h3L12,17z"/>
|
||||||
</vector>
|
</vector>
|
@ -1,30 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
|
||||||
<aapt:attr name="android:fillColor">
|
|
||||||
<gradient
|
|
||||||
android:endX="85.84757"
|
|
||||||
android:endY="92.4963"
|
|
||||||
android:startX="42.9492"
|
|
||||||
android:startY="49.59793"
|
|
||||||
android:type="linear">
|
|
||||||
<item
|
|
||||||
android:color="#44000000"
|
|
||||||
android:offset="0.0" />
|
|
||||||
<item
|
|
||||||
android:color="#00000000"
|
|
||||||
android:offset="1.0" />
|
|
||||||
</gradient>
|
|
||||||
</aapt:attr>
|
|
||||||
</path>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:strokeColor="#00000000" />
|
|
||||||
</vector>
|
|
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 511 B |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 638 B |
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 123 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_change_limit.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_clear.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 511 B |
BIN
app/src/main/res/drawable-xxhdpi/icon_fragment_close.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_fragment_switch_off.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_fragment_switch_on.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-xxhdpi/icon_main_geometry.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 2.3 KiB |