调整中控联动UI

This commit is contained in:
squallzhjch 2023-06-14 13:47:49 +08:00
parent 4884db93fc
commit e352a34ef9
45 changed files with 900 additions and 433 deletions

View File

@ -63,17 +63,6 @@
android:launchMode="singleTask"
android:screenOrientation="landscape"
android:theme="@style/Theme.OMQualityInspection" />
<activity
android:name=".ui.activity.console.ConsoleActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="landscape"
android:theme="@style/Theme.OMQualityInspection">
</activity>
<meta-data
android:name="ScopedStorage"
android:value="true" />

View File

@ -13,8 +13,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.navinfo.omqs.R
import com.navinfo.omqs.databinding.ActivityLoginBinding
import com.navinfo.omqs.ui.activity.CheckPermissionsActivity
import com.navinfo.omqs.ui.activity.PermissionsActivity
import com.navinfo.omqs.ui.activity.console.ConsoleActivity
import com.navinfo.omqs.ui.activity.map.MainActivity
import dagger.hilt.android.AndroidEntryPoint
@ -90,7 +88,7 @@ class LoginActivity : CheckPermissionsActivity() {
LoginStatus.LOGIN_STATUS_SUCCESS -> {
loginDialog?.dismiss()
loginDialog = null
val intent = Intent(this@LoginActivity, ConsoleActivity::class.java)
val intent = Intent(this@LoginActivity, MainActivity::class.java)
startActivity(intent)
finish()
}

View File

@ -12,12 +12,9 @@ import android.widget.EditText
import android.widget.Toast
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.annotation.RequiresApi
import androidx.core.view.WindowCompat
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavController
import androidx.navigation.NavDestination
import androidx.navigation.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@ -30,6 +27,10 @@ import com.navinfo.omqs.databinding.ActivityMainBinding
import com.navinfo.omqs.http.offlinemapdownload.OfflineMapDownloadManager
import com.navinfo.omqs.tools.LayerConfigUtils
import com.navinfo.omqs.ui.activity.BaseActivity
import com.navinfo.omqs.ui.fragment.console.ConsoleFragment
import com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapFragment
import com.navinfo.omqs.ui.fragment.qsrecordlist.QsRecordListFragment
import com.navinfo.omqs.ui.fragment.tasklist.TaskManagerFragment
import com.navinfo.omqs.ui.widget.RecyclerViewSpacesItemDecoration
import com.navinfo.omqs.util.FlowEventBus
import com.navinfo.omqs.util.SpeakMode
@ -49,6 +50,14 @@ class MainActivity : BaseActivity() {
private lateinit var binding: ActivityMainBinding
private val viewModel by viewModels<MainViewModel>()
/**
* 左侧fragment
*/
private var leftFragment: Fragment? = null
/**
* 是否开启右侧面板
*/
var switchFragment = false
/**
@ -79,7 +88,7 @@ class MainActivity : BaseActivity() {
* 提前显示要素看板
*/
private val signAdapter by lazy {
SignAdapter { position, autoSave,signBean ->
SignAdapter { _, autoSave, signBean ->
rightController.currentDestination?.let {
if (it.id == R.id.RightEmptyFragment) {
val bundle = Bundle()
@ -95,7 +104,7 @@ class MainActivity : BaseActivity() {
* 道路信息看板
*/
private val topSignAdapter by lazy {
TopSignAdapter { position, signBean ->
TopSignAdapter { _, signBean ->
rightController.currentDestination?.let {
if (it.id == R.id.RightEmptyFragment) {
val bundle = Bundle()
@ -108,7 +117,6 @@ class MainActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
val checkIntent = Intent()
@ -138,22 +146,19 @@ class MainActivity : BaseActivity() {
//给xml传递viewModel对象
binding.viewModel = viewModel
binding.mainActivityVoice.setOnTouchListener(object : View.OnTouchListener {
@RequiresApi(Build.VERSION_CODES.Q)
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
when (event?.action) {
MotionEvent.ACTION_DOWN -> {
voiceOnTouchStart()//Do Something
Log.e("qj", "voiceOnTouchStart")
}
MotionEvent.ACTION_UP -> {
voiceOnTouchStop()//Do Something
Log.e("qj", "voiceOnTouchStop")
}
binding.mainActivityVoice.setOnTouchListener { v, event ->
when (event?.action) {
MotionEvent.ACTION_DOWN -> {
voiceOnTouchStart()//Do Something
Log.e("qj", "voiceOnTouchStart")
}
MotionEvent.ACTION_UP -> {
voiceOnTouchStop()//Do Something
Log.e("qj", "voiceOnTouchStop")
}
return v?.onTouchEvent(event) ?: true
}
})
v?.onTouchEvent(event) ?: true
}
viewModel.liveDataQsRecordIdList.observe(this) {
//处理页面跳转
@ -217,7 +222,7 @@ class MainActivity : BaseActivity() {
}
}
findNavController(R.id.main_activity_right_fragment).addOnDestinationChangedListener { controller, destination, arguments ->
findNavController(R.id.main_activity_right_fragment).addOnDestinationChangedListener { _, destination, arguments ->
if (destination.id == R.id.RightEmptyFragment) {
binding.mainActivityRightVisibilityButtonsGroup.visibility = View.VISIBLE
} else {
@ -226,6 +231,9 @@ class MainActivity : BaseActivity() {
binding.mainActivitySelectLine.isSelected = false
}
}
supportFragmentManager.beginTransaction()
.add(R.id.console_fragment_layout, ConsoleFragment()).commit()
}
//根据输入的经纬度跳转坐标
@ -292,7 +300,15 @@ class MainActivity : BaseActivity() {
* 打开个人中菜单
*/
fun openMenu() {
binding.mainActivityDrawer.open()
supportFragmentManager.beginTransaction()
.replace(R.id.console_fragment_layout, ConsoleFragment()).commit()
if (leftFragment != null) {
supportFragmentManager.beginTransaction().remove(leftFragment!!).commit()
leftFragment = null
binding.mainActivityBottomSheetGroup.visibility = View.GONE
binding.mainActivityLeftFragment.visibility = View.GONE
}
// binding.mainActivityDrawer.open()
}
/**
@ -328,7 +344,7 @@ class MainActivity : BaseActivity() {
/**
* 点击搜索
*/
fun onClickSerach() {
fun onClickSearch() {
}
@ -389,18 +405,89 @@ class MainActivity : BaseActivity() {
binding.mainActivitySelectLine.isSelected = viewModel.isSelectRoad()
}
fun voiceOnTouchStart() {
viewModel.startSoundMetter(this, binding.mainActivityVoice)
}
@RequiresApi(Build.VERSION_CODES.Q)
fun voiceOnTouchStop() {
if (Constant.IS_VIDEO_SPEED) {
viewModel.stopSoundMeter()
/**
* 打开或关闭底部导航栏
*/
fun onSwitchSheet() {
if (binding.mainActivityBottomSheetGroup.visibility == View.VISIBLE) {
binding.mainActivityBottomSheetGroup.visibility = View.GONE
} else {
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
}
}
// override fun onBackPressed() {
// super.onBackPressed()
// }
private fun voiceOnTouchStart() {
viewModel.startSoundMetter(this, binding.mainActivityVoice)
}
private fun voiceOnTouchStop() {
if (Constant.IS_VIDEO_SPEED) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
viewModel.stopSoundMeter()
}
}
}
/**
* 打开测评任务面板
*/
fun onClickTaskFragment() {
if (leftFragment !is TaskManagerFragment) {
if (leftFragment == null) {
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
binding.mainActivityLeftFragment.visibility = View.VISIBLE
}
leftFragment = TaskManagerFragment {
binding.mainActivityLeftFragment.visibility = View.GONE
supportFragmentManager.beginTransaction()
.remove(leftFragment!!).commit()
leftFragment = null
null
}
supportFragmentManager.beginTransaction()
.replace(R.id.main_activity_left_fragment, leftFragment!!).commit()
}
}
/**
* 打开测评结果面板
*/
fun onClickResFragment() {
if (leftFragment !is QsRecordListFragment) {
if (leftFragment == null) {
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
binding.mainActivityLeftFragment.visibility = View.VISIBLE
}
leftFragment = QsRecordListFragment {
binding.mainActivityLeftFragment.visibility = View.GONE
supportFragmentManager.beginTransaction()
.remove(leftFragment!!).commit()
leftFragment = null
null
}
supportFragmentManager.beginTransaction()
.replace(R.id.main_activity_left_fragment, leftFragment!!).commit()
}
}
/**
* 打开离线地图
*/
fun onClickOfflineMapFragment(){
if (leftFragment !is OfflineMapFragment) {
if (leftFragment == null) {
binding.mainActivityBottomSheetGroup.visibility = View.VISIBLE
binding.mainActivityLeftFragment.visibility = View.VISIBLE
}
leftFragment = OfflineMapFragment {
binding.mainActivityLeftFragment.visibility = View.GONE
supportFragmentManager.beginTransaction()
.remove(leftFragment!!).commit()
leftFragment = null
null
}
supportFragmentManager.beginTransaction()
.replace(R.id.main_activity_left_fragment, leftFragment!!).commit()
}
}
}

View File

@ -1,27 +1,30 @@
package com.navinfo.omqs.ui.activity.console
package com.navinfo.omqs.ui.fragment.console
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.View.OnClickListener
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.transition.AutoTransition
import androidx.transition.Scene
import androidx.transition.TransitionManager
import com.navinfo.omqs.R
import com.navinfo.omqs.databinding.ActivityConsoleBinding
import com.navinfo.omqs.ui.activity.BaseActivity
import com.navinfo.omqs.databinding.FragmentConsoleBinding
import com.navinfo.omqs.ui.activity.map.MainActivity
import com.navinfo.omqs.ui.fragment.layermanager.LayermanagerFragment
import com.navinfo.omqs.ui.fragment.BaseFragment
import com.navinfo.omqs.ui.fragment.evaluationresult.EvaluationResultFragment
import com.navinfo.omqs.ui.fragment.layermanager.LayerManagerFragment
import com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapFragment
import com.navinfo.omqs.ui.fragment.personalcenter.PersonalCenterFragment
import com.navinfo.omqs.ui.fragment.qsrecordlist.QsRecordListFragment
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
class ConsoleActivity : BaseActivity(), OnClickListener {
class ConsoleFragment : BaseFragment(), OnClickListener {
private var _binding: ActivityConsoleBinding? = null
private var _binding: FragmentConsoleBinding? = null
private val binding get() = _binding!!
private var sceneFlag = true
private val aTransition = AutoTransition()
@ -32,14 +35,14 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
// 创建a场景
private val aScene by lazy {
Scene.getSceneForLayout(
binding.consoleRoot, R.layout.console_on, this
binding.consoleRoot, R.layout.console_on, requireContext()
)
}
// 创建b场景
private val bScene by lazy {
Scene.getSceneForLayout(
binding.consoleRoot, R.layout.console_off, this
binding.consoleRoot, R.layout.console_off, requireContext()
)
}
@ -48,18 +51,21 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
// .inflateTransitionManager(R.transition.transitionmanager_console, binding.consoleRoot)
// }
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View {
_binding = FragmentConsoleBinding.inflate(inflater, container, false)
return binding.root
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
_binding = ActivityConsoleBinding.inflate(layoutInflater)
setContentView(_binding!!.root)
// mTransitionAManager.setTransition(bScene, transition)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
aTransition.addListener(object : androidx.transition.Transition.TransitionListener {
override fun onTransitionStart(transition: androidx.transition.Transition) {
sceneFlag = true
if (mFragment != null) {
Log.e("jingo", "动画开始B mFragment 不为null")
supportFragmentManager.beginTransaction().remove(mFragment!!).commit()
childFragmentManager.beginTransaction().remove(mFragment!!).commit()
mFragment = null
}
}
@ -81,9 +87,10 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
})
bTransition.addListener(object : androidx.transition.Transition.TransitionListener {
override fun onTransitionStart(transition: androidx.transition.Transition) {
sceneFlag = false
if (mFragment != null) {
Log.e("jingo", "动画开始A mFragment 不为null")
supportFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
childFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
.commit()
}
}
@ -105,6 +112,7 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
initOnClickListener()
}
/**
* 设置点击事件
*/
@ -142,8 +150,12 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
*/
binding.consoleRoot.findViewById<View>(R.id.console_evaluation_icon_bg)
?.setOnClickListener(this)
binding.consoleRoot.findViewById<View>(R.id.console_evaluation_bg)
?.setOnClickListener(this)
binding.consoleRoot.findViewById<View>(R.id.console_evaluation_bg)?.setOnClickListener(this)
/**
* 评测任务
*/
binding.consoleRoot.findViewById<View>(R.id.console_task_bg)?.setOnClickListener(this)
binding.consoleRoot.findViewById<View>(R.id.console_task_icon_bg)?.setOnClickListener(this)
}
override fun onDestroy() {
@ -158,39 +170,37 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
* 地图点击事件
*/
R.id.console_map_bg, R.id.console_map_icon_bg -> {
val intent = Intent(this, MainActivity::class.java)
startActivity(intent)
activity?.let { a ->
a.supportFragmentManager.beginTransaction().remove(this).commit()
}
}
/**
* 离线地图点击
*/
R.id.console_offline_map_icon_bg, R.id.console_offline_map_bg -> {
if (sceneFlag) {
mFragment = OfflineMapFragment()
sceneFlag = false
TransitionManager.go(bScene, bTransition)
} else {
if (mFragment !is OfflineMapFragment) {
mFragment = OfflineMapFragment()
supportFragmentManager.beginTransaction()
.replace(fragmentId, mFragment!!).commit()
}
return
activity?.let { a ->
a.supportFragmentManager.beginTransaction().remove(this).commit()
(a as MainActivity).onClickOfflineMapFragment()
}
}
/**
* 个人中心点击
*/
R.id.console_personal_center_bg, R.id.console_personal_center_icon_bg -> {
if (sceneFlag) {
mFragment = PersonalCenterFragment()
mFragment = PersonalCenterFragment {
TransitionManager.go(aScene, aTransition)
}
sceneFlag = false
TransitionManager.go(bScene, bTransition)
} else {
if (mFragment !is PersonalCenterFragment) {
mFragment = PersonalCenterFragment()
supportFragmentManager.beginTransaction()
.replace(fragmentId, mFragment!!).commit()
mFragment = PersonalCenterFragment {
TransitionManager.go(aScene, aTransition)
}
childFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
.commit()
}
return
}
@ -199,36 +209,38 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
* 图层设置
*/
R.id.console_layer_setting_bg, R.id.console_layer_setting_icon_bg -> {
/* if (sceneFlag) {
mFragment = LayermanagerFragment()
if (sceneFlag) {
mFragment = LayerManagerFragment {
TransitionManager.go(aScene, aTransition)
}
sceneFlag = false
TransitionManager.go(bScene, bTransition)
} else {
if (mFragment !is LayermanagerFragment) {
mFragment = LayermanagerFragment()
supportFragmentManager.beginTransaction()
.replace(fragmentId, mFragment!!).commit()
if (mFragment !is LayerManagerFragment) {
mFragment = LayerManagerFragment {
TransitionManager.go(aScene, aTransition)
}
childFragmentManager.beginTransaction().replace(fragmentId, mFragment!!)
.commit()
}
return
}*/
}
}
/**
* 测评结果列表
*/
R.id.console_evaluation_icon_bg,
R.id.console_evaluation_bg -> {
// if (sceneFlag) {
// mFragment = LayermanagerFragment()
// sceneFlag = false
// TransitionManager.go(bScene, bTransition)
// } else {
// if (mFragment !is LayermanagerFragment) {
// mFragment = LayermanagerFragment()
// supportFragmentManager.beginTransaction()
// .replace(fragmentId, mFragment!!).commit()
// }
// return
// }
R.id.console_evaluation_icon_bg, R.id.console_evaluation_bg -> {
activity?.let { a ->
a.supportFragmentManager.beginTransaction().remove(this).commit()
(a as MainActivity).onClickResFragment()
}
}
R.id.console_task_icon_bg, R.id.console_task_bg -> {
activity?.let { a ->
a.supportFragmentManager.beginTransaction().remove(this).commit()
(a as MainActivity).onClickTaskFragment()
}
}
else -> {}
}

View File

@ -93,29 +93,26 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
}
binding.evaluationVoice.setOnTouchListener(object : View.OnTouchListener {
@RequiresApi(Build.VERSION_CODES.Q)
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
Log.e("qj", event?.action.toString())
when (event?.action) {
MotionEvent.ACTION_DOWN -> {
voiceOnTouchStart()//Do Something
Log.e("qj", "voiceOnTouchStart")
}
MotionEvent.ACTION_UP -> {
voiceOnTouchStop()//Do Something
Log.e("qj", "ACTION_UP")
}
MotionEvent.ACTION_CANCEL -> {
voiceOnTouchStop()//Do Something
Log.e("qj", "ACTION_CANCEL")
}
binding.evaluationVoice.setOnTouchListener { _, event ->
Log.e("qj", event?.action.toString())
when (event?.action) {
MotionEvent.ACTION_DOWN -> {
voiceOnTouchStart()//Do Something
Log.e("qj", "voiceOnTouchStart")
}
MotionEvent.ACTION_UP -> {
voiceOnTouchStop()//Do Something
Log.e("qj", "ACTION_UP")
}
MotionEvent.ACTION_CANCEL -> {
voiceOnTouchStop()//Do Something
Log.e("qj", "ACTION_CANCEL")
}
return true
}
})
true
}
/**
* 读取元数据
@ -308,15 +305,16 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
}
}
fun voiceOnTouchStart() {
private fun voiceOnTouchStart() {
viewModel.startSoundMetter(requireActivity(), binding.evaluationVoice)
}
@RequiresApi(Build.VERSION_CODES.Q)
fun voiceOnTouchStop() {
private fun voiceOnTouchStop() {
Log.e("qj", "voiceOnTouchStop====${Constant.IS_VIDEO_SPEED}")
if (Constant.IS_VIDEO_SPEED) {
viewModel.stopSoundMeter()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
viewModel.stopSoundMeter()
}
}
}

View File

@ -4,17 +4,12 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import com.blankj.utilcode.util.SPStaticUtils
import com.navinfo.omqs.Constant
import com.navinfo.omqs.databinding.FragmentEmptyBinding
import com.navinfo.omqs.databinding.FragmentLayerManagerBinding
import com.navinfo.omqs.ui.fragment.BaseFragment
import com.navinfo.omqs.ui.fragment.offlinemap.OfflineMapCityListViewModel
class LayermanagerFragment : BaseFragment(){
class LayerManagerFragment(private var backListener: (() -> Unit?)? = null) : BaseFragment(){
private var _binding: FragmentLayerManagerBinding? = null
private val binding get() = _binding!!
@ -44,13 +39,14 @@ class LayermanagerFragment : BaseFragment(){
}
binding.imgBack.setOnClickListener {
findNavController().navigateUp()
backListener?.invoke()
}
binding.tvTitle.text = findNavController().currentDestination?.label
binding.tvTitle.text = "图层设置"//findNavController().currentDestination?.label
binding.imgConfirm.setOnClickListener { // 用户点击确认,重新设置当前的图层显隐控制
viewModel.saveLayerConfigList(adapter.parentItems)
backListener?.invoke()
}
}

View File

@ -13,7 +13,8 @@ import com.navinfo.omqs.ui.fragment.BaseFragment
/**
* 离线地图总页面
*/
class OfflineMapFragment : BaseFragment() {
class OfflineMapFragment(private var backListener: (() -> Unit?)? = null) :
BaseFragment() {
private var _binding: FragmentOfflineMapBinding? = null
@ -48,7 +49,7 @@ class OfflineMapFragment : BaseFragment() {
//处理返回按钮
binding.offlineMapBack.setOnClickListener {
findNavController().popBackStack()
backListener?.invoke()
}
}

View File

@ -29,7 +29,8 @@ import javax.inject.Inject
* 个人中心
*/
@AndroidEntryPoint
class PersonalCenterFragment : BaseFragment(), FSAFActivityCallbacks {
class PersonalCenterFragment(private var backListener: (() -> Unit?)? = null) : BaseFragment(),
FSAFActivityCallbacks {
private var _binding: FragmentPersonalCenterBinding? = null
private val binding get() = _binding!!
@ -111,7 +112,7 @@ class PersonalCenterFragment : BaseFragment(), FSAFActivityCallbacks {
viewModel.readRealmData()
// 定位到指定位置
niMapController.mMapView.vtmMap.animator()
.animateTo(GeoPoint(40.031657799200346, 116.32207834810715 ))
.animateTo(GeoPoint(40.031657799200346, 116.32207834810715))
}
R.id.personal_center_menu_task_list -> {
findNavController().navigate(R.id.TaskManagerFragment)

View File

@ -16,7 +16,7 @@ import com.navinfo.omqs.ui.fragment.tasklist.QsRecordListAdapter
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
class QsRecordListFragment : BaseFragment(){
class QsRecordListFragment(private var backListener: (() -> Unit?)? = null) : BaseFragment() {
private var _binding: FragmentQsRecordListBinding? = null
private val viewModel by viewModels<QsRecordListViewModel>()
private val binding get() = _binding!!
@ -44,7 +44,7 @@ class QsRecordListFragment : BaseFragment(){
binding.qsRecyclerview.adapter = adapter
viewModel.liveDataQSList.observe(viewLifecycleOwner) {
adapter.refreshData(it)
binding.tvTitleCount.text = ""+adapter.data.size+""
binding.tvTitleCount.text = "" + adapter.data.size + ""
}
val itemDecoration = DividerItemDecoration(context, DividerItemDecoration.VERTICAL)
itemDecoration.setDrawable(resources.getDrawable(R.drawable.separator))
@ -53,13 +53,13 @@ class QsRecordListFragment : BaseFragment(){
// itemClick
adapter.setOnKotlinItemClickListener(object : QsRecordListAdapter.IKotlinItemClickListener {
override fun onItemClickListener(position: Int) {
viewModel.onItemClickListener(activity as MainActivity,position)
findNavController().popBackStack()
viewModel.onItemClickListener(activity as MainActivity, position)
backListener?.invoke()
}
})
binding.imgBack.setOnClickListener{
findNavController().navigateUp()
binding.imgBack.setOnClickListener {
backListener?.invoke()
}
}

View File

@ -15,7 +15,7 @@ import dagger.hilt.android.AndroidEntryPoint
* 评测任务viewpager管理页面
*/
@AndroidEntryPoint
class TaskManagerFragment : BaseFragment() {
class TaskManagerFragment(private var backListener: ((TaskManagerFragment) -> Unit?)? = null) : BaseFragment() {
private var _binding: FragmentTaskManagerBinding? = null
private val binding get() = _binding!!
@ -53,7 +53,7 @@ class TaskManagerFragment : BaseFragment() {
}.attach()
viewModel.getTaskList(requireContext())
binding.taskBack.setOnClickListener {
findNavController().navigateUp()
backListener?.invoke(this)
}
}

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50dp"
android:height="24dp"
android:tint="@color/blue"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/blue"
android:pathData="M6,19h12v2H6z" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 完整的矩形 -->
<item>
<shape android:shape="rectangle">
<solid android:color="@color/blue" />
</shape>
</item>
<!-- 部分矩形,只有一侧有颜色 -->
<item android:top="2dp">
<shape android:shape="rectangle">
<solid android:color="@color/white" />
</shape>
</item>
</layer-list>

View File

@ -17,265 +17,397 @@
type="com.navinfo.omqs.ui.activity.map.MainViewModel" />
</data>
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/main_activity_drawer"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activity.map.MainActivity">
<com.navinfo.collect.library.map.NIMapView
android:id="@+id/main_activity_map"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.navinfo.collect.library.map.NIMapView
android:id="@+id/main_activity_map"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/main_activity_camera2"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:background="@null"
android:onClick="@{()->mainActivity.openCamera()}"
android:src="@drawable/baseline_person_24"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/main_activity_top_sign_recyclerview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/main_activity_camera2"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:background="@null"
android:onClick="@{()->mainActivity.openCamera()}"
android:src="@drawable/baseline_person_24"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/main_activity_sign_recyclerview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:maxHeight="350dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/main_activity_top_sign_recyclerview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.helper.widget.Flow
android:id="@+id/main_activity_flow"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/top_right_drawer_btns_mr"
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance,main_activity_menu"
app:flow_horizontalGap="6dp"
app:flow_wrapMode="aligned"
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/main_activity_person_center"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:background="@null"
android:onClick="@{()->mainActivity.openMenu()}"
android:src="@drawable/baseline_person_24"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_menu_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/main_activity_sign_recyclerview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:maxHeight="350dp"
app:layout_constraintLeft_toLeftOf="@id/main_activity_person_center"
app:layout_constraintTop_toBottomOf="@id/main_activity_person_center" />
<ImageButton
android:id="@+id/main_activity_serach"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClickSearch()}"
android:src="@drawable/icon_serach" />
<androidx.constraintlayout.helper.widget.Flow
android:id="@+id/main_activity_flow"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/top_right_drawer_btns_mr"
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance,main_activity_menu"
app:flow_horizontalGap="6dp"
app:flow_wrapMode="aligned"
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/main_activity_2d_3d"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClick2DOr3D()}"
android:src="@drawable/icon_2d_3d" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_menu_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
app:constraint_referenced_ids="main_activity_serach,main_activity_2d_3d,main_activity_camera,main_activity_trace,main_activity_calc_disance" />
<ImageButton
android:id="@+id/main_activity_camera"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.openCamera()}"
android:src="@drawable/icon_page_video_a1" />
<ImageButton
android:id="@+id/main_activity_serach"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClickSerach()}"
android:src="@drawable/icon_serach" />
<ImageButton
android:id="@+id/main_activity_trace"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClickTrace()}"
android:src="@drawable/icon_trace" />
<ImageButton
android:id="@+id/main_activity_2d_3d"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClick2DOr3D()}"
android:src="@drawable/icon_2d_3d" />
<ImageButton
android:id="@+id/main_activity_calc_disance"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClickCalcDisance()}"
android:src="@drawable/icon_calc_disance" />
<ImageButton
android:id="@+id/main_activity_camera"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.openCamera()}"
android:src="@drawable/icon_page_video_a1" />
<ImageButton
android:id="@+id/main_activity_menu"
android:layout_width="@dimen/top_right_drawer_wh"
android:layout_height="@dimen/top_right_drawer_wh"
android:background="@drawable/chk_icon_menu_open_close_xml"
android:elevation="2dp"
android:onClick="@{()->mainActivity.onClickMenu()}" />
<ImageButton
android:id="@+id/main_activity_trace"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClickTrace()}"
android:src="@drawable/icon_trace" />
<androidx.constraintlayout.widget.Barrier
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="end"
app:constraint_referenced_ids="main_activity_fragment_switch" />
<ImageButton
android:id="@+id/main_activity_calc_disance"
style="@style/top_right_drawer_btns_style"
android:onClick="@{()->mainActivity.onClickCalcDisance()}"
android:src="@drawable/icon_calc_disance" />
<ImageButton
android:id="@+id/main_activity_fragment_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/selector_fragment_switch"
android:elevation="2dp"
android:onClick="@{()->mainActivity.onSwitchFragment()}"
app:layout_constraintBottom_toBottomOf="@id/main_activity_flow"
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
app:layout_constraintTop_toTopOf="@id/main_activity_flow" />
<ImageButton
android:id="@+id/main_activity_menu"
android:layout_width="@dimen/top_right_drawer_wh"
android:layout_height="@dimen/top_right_drawer_wh"
android:background="@drawable/chk_icon_menu_open_close_xml"
android:elevation="2dp"
android:onClick="@{()->mainActivity.onClickMenu()}" />
<androidx.constraintlayout.widget.Barrier
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="end"
app:constraint_referenced_ids="main_activity_fragment_switch" />
<ImageButton
android:id="@+id/main_activity_fragment_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/selector_fragment_switch"
android:elevation="2dp"
android:onClick="@{()->mainActivity.onSwitchFragment()}"
app:layout_constraintBottom_toBottomOf="@id/main_activity_flow"
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
app:layout_constraintTop_toTopOf="@id/main_activity_flow" />
<fragment
android:id="@+id/main_activity_right_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:elevation="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/right_fragment_nav_graph" />
<TextView
android:id="@+id/main_activity_geometry"
android:layout_width="@dimen/main_activity_geometry_w"
android:layout_height="@dimen/main_activity_geometry_h"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/shape_rect_white_8dp_bg"
android:drawableLeft="@drawable/icon_main_geometry"
android:elevation="2dp"
android:gravity="center"
android:onClick="@{()->mainActivity.jumpPosition()}"
android:paddingLeft="9dp"
android:text="经纬度:116.99388424,38.8403844"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/main_activity_middle_fragment" />
<ImageButton
android:id="@+id/main_activity_zoom_out"
android:layout_width="@dimen/zoom_btns_w"
android:layout_height="@dimen/zoom_btns_h"
android:layout_marginBottom="12dp"
android:background="@drawable/selector_zoom_out_bg"
android:elevation="2dp"
android:onClick="@{(view)->mainActivity.zoomOutOnclick(view)}"
android:padding="8dp"
android:src="@drawable/icon_zoom_out"
app:layout_constraintBottom_toTopOf="@id/main_activity_geometry"
app:layout_constraintRight_toRightOf="@id/main_activity_geometry" />
<ImageButton
android:id="@+id/main_activity_zoom_in"
android:layout_width="@dimen/zoom_btns_w"
android:layout_height="@dimen/zoom_btns_h"
android:background="@drawable/selector_zoom_in_bg"
android:elevation="2dp"
android:onClick="@{(view)->mainActivity.zoomInOnclick(view)}"
android:src="@drawable/icon_zoom_in"
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_out"
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_out" />
<ImageButton
android:id="@+id/main_activity_location"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:onClick="@{()->viewModel.onClickLocationButton()}"
android:src="@drawable/icon_location"
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_in"
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_in" />
<ImageButton
android:id="@+id/main_activity_add_new"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:onClick="@{()->mainActivity.voiceOnclick()}"
android:src="@drawable/icon_add_data"
app:layout_constraintBottom_toTopOf="@id/main_activity_location"
app:layout_constraintRight_toRightOf="@id/main_activity_location" />
<ImageButton
android:id="@+id/main_activity_voice"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:onClick="@{()->mainActivity.voiceOnclick()}"
android:src="@drawable/icon_add_voice"
app:layout_constraintBottom_toTopOf="@id/main_activity_add_new"
app:layout_constraintRight_toRightOf="@id/main_activity_add_new" />
<ImageButton
android:id="@+id/main_activity_select_line"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:background="@drawable/selector_road_line_bg"
android:onClick="@{()->mainActivity.selectLineOnclick()}"
android:src="@drawable/selector_road_line_src"
app:layout_constraintBottom_toTopOf="@id/main_activity_voice"
app:layout_constraintRight_toRightOf="@id/main_activity_voice" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_right_visibility_buttons_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="main_activity_select_line,main_activity_voice,main_activity_add_new" />
<fragment
android:id="@+id/main_activity_middle_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="6dp"
android:layout_marginRight="-1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
app:layout_constraintTop_toBottomOf="@id/main_activity_flow"
app:navGraph="@navigation/middle_fragment_nav_graph" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_fragment_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="main_activity_right_fragment,main_activity_middle_fragment" />
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/main_activity_left_fragment"
android:layout_width="@dimen/right_fragment_w"
android:layout_height="0dp"
android:background="@drawable/shape_left_fragment_bg"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@id/main_activity_sign_recyclerview" />
<fragment
android:id="@+id/main_activity_drawer_fragment"
android:id="@+id/main_activity_right_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="323dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:layout_marginTop="30dp"
app:navGraph="@navigation/left_drawer_nav_graph" />
android:layout_width="wrap_content"
android:layout_height="0dp"
android:elevation="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/right_fragment_nav_graph" />
<TextView
android:id="@+id/main_activity_geometry"
android:layout_width="@dimen/main_activity_geometry_w"
android:layout_height="@dimen/main_activity_geometry_h"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/shape_rect_white_8dp_bg"
android:drawableLeft="@drawable/icon_main_geometry"
android:elevation="2dp"
android:gravity="center"
android:onClick="@{()->mainActivity.jumpPosition()}"
android:paddingLeft="9dp"
android:text="经纬度:116.99388424,38.8403844"
android:textSize="10sp"
app:layout_constraintBottom_toTopOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintRight_toLeftOf="@id/main_activity_middle_fragment" />
<ImageButton
android:id="@+id/main_activity_zoom_out"
android:layout_width="@dimen/zoom_btns_w"
android:layout_height="@dimen/zoom_btns_h"
android:layout_marginBottom="12dp"
android:background="@drawable/selector_zoom_out_bg"
android:elevation="2dp"
android:onClick="@{(view)->mainActivity.zoomOutOnclick(view)}"
android:padding="8dp"
android:src="@drawable/icon_zoom_out"
app:layout_constraintBottom_toTopOf="@id/main_activity_geometry"
app:layout_constraintRight_toRightOf="@id/main_activity_geometry" />
<ImageButton
android:id="@+id/main_activity_zoom_in"
android:layout_width="@dimen/zoom_btns_w"
android:layout_height="@dimen/zoom_btns_h"
android:background="@drawable/selector_zoom_in_bg"
android:elevation="2dp"
android:onClick="@{(view)->mainActivity.zoomInOnclick(view)}"
android:src="@drawable/icon_zoom_in"
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_out"
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_out" />
<ImageButton
android:id="@+id/main_activity_location"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:onClick="@{()->viewModel.onClickLocationButton()}"
android:src="@drawable/icon_location"
app:layout_constraintBottom_toTopOf="@id/main_activity_zoom_in"
app:layout_constraintRight_toRightOf="@id/main_activity_zoom_in" />
<ImageButton
android:id="@+id/main_activity_add_new"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:onClick="@{()->mainActivity.voiceOnclick()}"
android:src="@drawable/icon_add_data"
app:layout_constraintBottom_toTopOf="@id/main_activity_location"
app:layout_constraintRight_toRightOf="@id/main_activity_location" />
<ImageButton
android:id="@+id/main_activity_voice"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:onClick="@{()->mainActivity.voiceOnclick()}"
android:src="@drawable/icon_add_voice"
app:layout_constraintBottom_toTopOf="@id/main_activity_add_new"
app:layout_constraintRight_toRightOf="@id/main_activity_add_new" />
<ImageButton
android:id="@+id/main_activity_select_line"
style="@style/zoom_btns_style"
android:layout_marginBottom="12dp"
android:background="@drawable/selector_road_line_bg"
android:onClick="@{()->mainActivity.selectLineOnclick()}"
android:src="@drawable/selector_road_line_src"
app:layout_constraintBottom_toTopOf="@id/main_activity_voice"
app:layout_constraintRight_toRightOf="@id/main_activity_voice" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_right_visibility_buttons_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="main_activity_select_line,main_activity_voice,main_activity_add_new" />
<fragment
android:id="@+id/main_activity_middle_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="6dp"
android:layout_marginRight="-1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/main_activity_right_fragment"
app:layout_constraintTop_toBottomOf="@id/main_activity_flow"
app:navGraph="@navigation/middle_fragment_nav_graph" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_fragment_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="main_activity_right_fragment,main_activity_middle_fragment" />
<View
android:id="@+id/main_activity_bottom_sheet"
android:layout_width="60dp"
android:layout_height="48dp"
android:background="@drawable/baseline_minimize_24"
android:onClick="@{()->mainActivity.onSwitchSheet()}"
android:paddingBottom="10dp"
app:layout_constraintBottom_toTopOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<View
android:id="@+id/main_activity_bottom_sheet_bg"
android:layout_width="0dp"
android:layout_height="56dp"
android:background="@drawable/shape_bottom_sheet"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<ImageView
android:id="@+id/main_bottom_task"
style="@style/main_activity_bottom_sheet_icon"
android:background="@drawable/icon_main_bottom_task"
android:onClick="@{()->mainActivity.onClickTaskFragment()}"
app:layout_constraintBottom_toTopOf="@id/main_bottom_task_text"
app:layout_constraintLeft_toLeftOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintRight_toLeftOf="@id/main_bottom_res"
app:layout_constraintTop_toTopOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/main_bottom_task_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="@{()->mainActivity.onClickTaskFragment()}"
android:text="测评任务"
android:textColor="@color/blue"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintLeft_toLeftOf="@id/main_bottom_task"
app:layout_constraintRight_toRightOf="@id/main_bottom_task"
app:layout_constraintTop_toBottomOf="@id/main_bottom_task" />
<ImageView
android:id="@+id/main_bottom_res"
style="@style/main_activity_bottom_sheet_icon"
android:background="@drawable/icon_main_bottom_res"
android:onClick="@{()->mainActivity.onClickResFragment()}"
app:layout_constraintBottom_toTopOf="@id/main_bottom_res_text"
app:layout_constraintLeft_toRightOf="@id/main_bottom_task"
app:layout_constraintRight_toLeftOf="@id/main_bottom_home"
app:layout_constraintTop_toTopOf="@id/main_bottom_task"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/main_bottom_res_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="@{()->mainActivity.onClickResFragment()}"
android:text="测评结果"
android:textColor="@color/blue"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintLeft_toLeftOf="@id/main_bottom_res"
app:layout_constraintRight_toRightOf="@id/main_bottom_res"
app:layout_constraintTop_toBottomOf="@id/main_bottom_res" />
<ImageView
android:id="@+id/main_bottom_home"
android:layout_width="45dp"
android:layout_height="45dp"
android:background="@drawable/icon_main_bottom_home"
android:onClick="@{()->mainActivity.openMenu()}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/main_bottom_res"
app:layout_constraintRight_toLeftOf="@id/main_bottom_offline_map"
app:layout_constraintTop_toTopOf="@id/main_activity_bottom_sheet_bg" />
<ImageView
android:id="@+id/main_bottom_offline_map"
style="@style/main_activity_bottom_sheet_icon"
android:onClick="@{()->mainActivity.onClickOfflineMapFragment()}"
android:background="@drawable/icon_main_bottom_offline_map"
app:layout_constraintBottom_toTopOf="@id/main_bottom_offline_map_text"
app:layout_constraintLeft_toRightOf="@id/main_bottom_home"
app:layout_constraintRight_toLeftOf="@id/main_bottom_route"
app:layout_constraintTop_toTopOf="@id/main_bottom_task"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/main_bottom_offline_map_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="离线地图"
android:textColor="@color/blue"
android:textSize="10sp"
android:onClick="@{()->mainActivity.onClickOfflineMapFragment()}"
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintLeft_toLeftOf="@id/main_bottom_offline_map"
app:layout_constraintRight_toRightOf="@id/main_bottom_offline_map"
app:layout_constraintTop_toBottomOf="@id/main_bottom_offline_map" />
<ImageView
android:id="@+id/main_bottom_route"
style="@style/main_activity_bottom_sheet_icon"
android:background="@drawable/icon_main_bottom_route"
app:layout_constraintBottom_toTopOf="@id/main_bottom_route_text"
app:layout_constraintLeft_toRightOf="@id/main_bottom_offline_map"
app:layout_constraintRight_toRightOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintTop_toTopOf="@id/main_bottom_task"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/main_bottom_route_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="路径规划"
android:textColor="@color/blue"
android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="@id/main_activity_bottom_sheet_bg"
app:layout_constraintLeft_toLeftOf="@id/main_bottom_route"
app:layout_constraintRight_toRightOf="@id/main_bottom_route"
app:layout_constraintTop_toBottomOf="@id/main_bottom_route" />
<androidx.constraintlayout.widget.Group
android:id="@+id/main_activity_bottom_sheet_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
app:constraint_referenced_ids="
main_bottom_route_text,
main_bottom_offline_map_text,
main_bottom_res_text,
main_bottom_task_text,main_bottom_route,
main_bottom_offline_map,
main_bottom_res,
main_activity_bottom_sheet_bg,
main_bottom_task,main_bottom_home" />
<FrameLayout
android:id="@+id/console_fragment_layout"
android:layout_width="0dp"
android:layout_height="0dp"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.drawerlayout.widget.DrawerLayout>
</layout>

View File

@ -27,7 +27,7 @@
android:gravity="center"
android:text="80"
android:textColor="#2F2F2F"
android:textSize="14sp" />
android:textSize="16sp" />
<TextView
android:id="@+id/sign_bottom_text"

View File

@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/console_bg"
tools:context=".ui.activity.console.ConsoleActivity">
tools:context=".ui.fragment.console.ConsoleFragment">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/console_left_guideline"

View File

@ -5,7 +5,7 @@
android:id="@+id/console_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activity.console.ConsoleActivity">
tools:context=".ui.fragment.console.ConsoleFragment">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/console_left_guideline"

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:clickable="true"
android:id="@+id/console_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/console_bg"
tools:context=".ui.activity.console.ConsoleActivity">
tools:context=".ui.fragment.console.ConsoleFragment">
<include layout="@layout/console_on" />
</FrameLayout>

View File

@ -39,7 +39,7 @@
<fragment
android:id="@+id/QsLayerManagerFragment"
android:name="com.navinfo.omqs.ui.fragment.layermanager.LayermanagerFragment"
android:name="com.navinfo.omqs.ui.fragment.layermanager.LayerManagerFragment"
android:label="图层管理"
tools:layout="@layout/fragment_qs_record_list">

View File

@ -1,5 +1,10 @@
<resources>
<style name="main_activity_bottom_sheet_icon" comment="主控页面下方按钮样式">
<item name="android:layout_width">36dp</item>
<item name="android:layout_height">36dp</item>
</style>
<style name="console_on_left_bottom_icon" comment="主控页面左侧右下角按钮样式">
<item name="android:layout_width">24dp</item>
<item name="android:layout_height">24dp</item>

View File

@ -1651,16 +1651,16 @@
<m k="speedFlag">
<m v="0">
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption k="maxSpeed" fill="#000000" priority="0" size="16" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4002_0.png" symbol-width="46" symbol-height="46"></symbol>
<symbol src="assets:omdb/icon_4002_0.svg" symbol-width="46" symbol-height="46"></symbol>
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
stroke-width="1.0"></caption>
</m>
<m v="1">
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4002_1.png" symbol-width="46" symbol-height="46"></symbol>
<symbol src="assets:omdb/icon_4002_1.svg" symbol-width="46" symbol-height="46"></symbol>
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
stroke-width="1.0"></caption>
</m>
@ -1671,16 +1671,16 @@
<m k="speedFlag">
<m v="0">
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4003_0.png" symbol-width="46" symbol-height="46"></symbol>
<symbol src="assets:omdb/icon_4003_0.svg" symbol-width="46" symbol-height="46"></symbol>
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
stroke-width="1.0"></caption>
</m>
<m v="1">
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4003_1.png" symbol-width="46" symbol-height="46"></symbol>
<symbol src="assets:omdb/icon_4003_1.svg" symbol-width="46" symbol-height="46"></symbol>
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
stroke-width="1.0"></caption>
</m>
@ -1690,14 +1690,14 @@
<m v="OMDB_SPEEDLIMIT_VAR">
<m v="0">
<!-- <symbol src="assets:omdb/round_speedlimit.svg" symbol-width="30" symbol-height="30"></symbol>-->
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4004_0.png" symbol-width="46" symbol-height="46"></symbol>
<symbol src="assets:omdb/icon_4004_0.svg" symbol-width="46" symbol-height="46"></symbol>
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
stroke-width="1.0"></caption>
</m>
<m v="1">
<caption k="maxSpeed" fill="#000000" priority="0" size="14" stroke="#ffffff"
<caption k="maxSpeed" fill="#000000" priority="0" size="12" stroke="#ffffff"
stroke-width="1.0"></caption>
<symbol src="assets:omdb/icon_4004_1.png" symbol-width="46" symbol-height="46"></symbol>
<caption k="minSpeed" dy="-28" fill="#000000" priority="0" size="14" stroke="#ffffff"
@ -1787,15 +1787,15 @@
</m>
<!--交通灯-->
<m v="OMDB_TRAFFICLIGHT">
<symbol src="assets:omdb/icon_4022_0.png" repeat="false" symbol-width="14" symbol-height="40" rotate="false"></symbol>
<symbol src="assets:omdb/icon_4022_0.svg" repeat="false" symbol-width="46" symbol-height="46" rotate="false"></symbol>
</m>
<!--普通交限-->
<m v="OMDB_RESTRICTION">
<m k="angle">
<symbol src="assets:omdb/icon_4006_0.png" repeat="false" symbol-width="35" symbol-height="35" rotate="false" repeat-start="0" ></symbol>
<symbol src="assets:omdb/icon_4006_0.svg" repeat="false" symbol-width="46" symbol-height="46" rotate="false" repeat-start="0" ></symbol>
</m>
<m k="type" v="angle">
<symbol src="assets:omdb/icon_arrow_right.png" repeat-start="0" repeat-gap="2000" symbol-percent="45" repeat="false" rotate="true"></symbol>
<symbol src="assets:omdb/icon_arrow_right.svg" repeat-start="0" repeat-gap="2000" symbol-percent="45" repeat="false" rotate="true"></symbol>
</m>
<m k="type" v="s_2_e">
<line stroke="#14582c" width="0.1" dasharray="1,1" repeat-gap="3" repeat-start="0"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="136" viewBox="0 0 136 136"><defs><style>.a,.f{fill:#fff;}.a{opacity:0;}.b{fill:#ff5f4c;opacity:0.304;}.c{fill:#a74d4b;opacity:0.708;}.d{fill:url(#a);}.e{fill:url(#b);}.f{stroke:#db4646;stroke-width:3px;}.g{stroke:none;}.h{fill:none;}</style><radialGradient id="a" cx="0.21" cy="0.134" r="1.274" gradientTransform="matrix(0.849, 0.529, -0.307, 0.493, 0.073, -0.043)" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#ff9287"/><stop offset="0.786" stop-color="#ff5f4c"/><stop offset="1" stop-color="#ff5f4c"/></radialGradient><radialGradient id="b" cx="0.5" cy="0.5" r="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#e75545"/><stop offset="0.793" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g transform="translate(-956 -396)"><rect class="a" width="136" height="136" transform="translate(956 396)"/><g transform="translate(989.164 429.346)"><g transform="translate(10.653 81.66)"><ellipse class="b" cx="24.183" cy="8.497" rx="24.183" ry="8.497"/><ellipse class="c" cx="8.497" cy="3.268" rx="8.497" ry="3.268" transform="translate(15.687 5.229)"/></g><g transform="translate(0 0)"><path class="d" d="M22.956,71.538q-.792-.8-1.543-1.533A36.466,36.466,0,0,1,0,36.4C0,16.3,15.6,0,34.837,0S69.673,16.3,69.673,36.4c0,15.235-8.954,28.283-21.664,33.711q-.588.673-1.219,1.424A73.582,73.582,0,0,0,35.337,90.157S30.335,78.981,22.956,71.538Z" transform="translate(0 0)"/><circle class="e" cx="27.451" cy="27.451" r="27.451" transform="translate(7.029 7.568)"/></g></g><g transform="translate(10174 7640)"><g class="f" transform="translate(-9178 -7204)"><circle class="g" cx="28" cy="28" r="28"/><circle class="h" cx="28" cy="28" r="26.5"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="136" viewBox="0 0 136 136"><defs><style>.a,.h,.j{fill:none;}.a{opacity:0;}.b{fill:#4d4d4d;opacity:0.304;}.c{fill:#363333;opacity:0.708;}.d{fill:url(#a);}.e{fill:url(#b);}.f,.g{fill:#fff;stroke-width:3px;}.f{stroke:#db4646;}.g,.h{stroke:#2f2f2f;}.h{stroke-linecap:round;stroke-width:2px;}.i{stroke:none;}</style><radialGradient id="a" cx="0.21" cy="0.134" r="1.274" gradientTransform="matrix(0.849, 0.529, -0.307, 0.493, 0.073, -0.043)" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#b5b4b4"/><stop offset="0.697" stop-color="#6e6c6c"/><stop offset="1" stop-color="#2f2f2f"/></radialGradient><radialGradient id="b" cx="0.5" cy="0.5" r="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#e75545"/><stop offset="0.793" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g transform="translate(-832 -256)"><g transform="translate(-124 -140)"><rect class="a" width="136" height="136" transform="translate(956 396)"/><g transform="translate(989.164 429.346)"><g transform="translate(10.653 81.66)"><ellipse class="b" cx="24.183" cy="8.497" rx="24.183" ry="8.497"/><ellipse class="c" cx="8.497" cy="3.268" rx="8.497" ry="3.268" transform="translate(15.687 5.229)"/></g><g transform="translate(0 0)"><path class="d" d="M22.956,71.538q-.792-.8-1.543-1.533A36.466,36.466,0,0,1,0,36.4C0,16.3,15.6,0,34.837,0S69.673,16.3,69.673,36.4c0,15.235-8.954,28.283-21.664,33.711q-.588.673-1.219,1.424A73.582,73.582,0,0,0,35.337,90.157S30.335,78.981,22.956,71.538Z" transform="translate(0 0)"/><circle class="e" cx="27.451" cy="27.451" r="27.451" transform="translate(7.029 7.568)"/></g></g><g transform="translate(10174 7640)"><g class="f" transform="translate(-9178 -7204)"><circle class="i" cx="28" cy="28" r="28"/><circle class="j" cx="28" cy="28" r="26.5"/></g></g><g transform="translate(573 -37)"><g transform="translate(423 473)"><g class="g"><circle class="i" cx="28" cy="28" r="28"/><circle class="j" cx="28" cy="28" r="26.5"/></g></g><g transform="translate(427.138 478.332)"><line class="h" y1="34.047" x2="33.845" transform="translate(0 0)"/><line class="h" y1="36.376" x2="36.552" transform="translate(4.81 4.168)"/><path class="h" d="M0,35.11,18.688,16.458,35.178,0" transform="translate(11.84 11.226)"/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="136" viewBox="0 0 136 136"><defs><style>.a,.f{fill:#fff;}.a{opacity:0;}.b{fill:#ff5f4c;opacity:0.304;}.c{fill:#a74d4b;opacity:0.708;}.d{fill:url(#a);}.e{fill:url(#b);}.g{fill:#2a23f5;stroke:#db4646;stroke-linecap:square;stroke-width:3px;stroke-dasharray:9 10;}.h{stroke:none;}.i{fill:none;}</style><radialGradient id="a" cx="0.21" cy="0.134" r="1.274" gradientTransform="matrix(0.849, 0.529, -0.307, 0.493, 0.073, -0.043)" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#ff9287"/><stop offset="0.786" stop-color="#ff5f4c"/><stop offset="1" stop-color="#ff5f4c"/></radialGradient><radialGradient id="b" cx="0.5" cy="0.5" r="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#e75545"/><stop offset="0.793" stop-color="#c4483b"/><stop offset="1" stop-color="#983b31"/></radialGradient></defs><g transform="translate(-956 -396)"><rect class="a" width="136" height="136" transform="translate(956 396)"/><g transform="translate(989.164 429.346)"><g transform="translate(10.653 81.66)"><ellipse class="b" cx="24.183" cy="8.497" rx="24.183" ry="8.497"/><ellipse class="c" cx="8.497" cy="3.268" rx="8.497" ry="3.268" transform="translate(15.687 5.229)"/></g><g transform="translate(0 0)"><path class="d" d="M22.956,71.538q-.792-.8-1.543-1.533A36.466,36.466,0,0,1,0,36.4C0,16.3,15.6,0,34.837,0S69.673,16.3,69.673,36.4c0,15.235-8.954,28.283-21.664,33.711q-.588.673-1.219,1.424A73.582,73.582,0,0,0,35.337,90.157S30.335,78.981,22.956,71.538Z" transform="translate(0 0)"/><circle class="e" cx="27.451" cy="27.451" r="27.451" transform="translate(7.029 7.568)"/></g></g><g transform="translate(10096 7643)"><circle class="f" cx="28" cy="28" r="28" transform="translate(-9100 -7207)"/><g class="g" transform="translate(-9096 -7203)"><circle class="h" cx="24" cy="24" r="24"/><circle class="i" cx="24" cy="24" r="25.5"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="_图层_2" data-name="图层 2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 29.88 85.54">
<defs>
<style>
.cls-1 {
fill: url(#_未命名的渐变_457);
}
.cls-2 {
fill: url(#_未命名的渐变_322);
}
.cls-3 {
fill: url(#_未命名的渐变_150);
}
.cls-4 {
fill: url(#_未命名的渐变_264);
}
.cls-5 {
fill: #fff;
}
.cls-6 {
fill: #3d444c;
}
.cls-7 {
fill: url(#_未命名的渐变_178);
stroke: #161b20;
}
.cls-7, .cls-8, .cls-9, .cls-10, .cls-11 {
stroke-miterlimit: 10;
}
.cls-8 {
fill: url(#_未命名的渐变_507);
stroke: #8ba0ae;
}
.cls-12 {
fill: #272d35;
isolation: isolate;
opacity: .2;
}
.cls-9 {
fill: url(#_未命名的渐变_4);
stroke: #d15f6a;
}
.cls-10 {
stroke: #18873b;
}
.cls-10, .cls-11 {
fill: none;
}
.cls-11 {
stroke: #d5b725;
}
</style>
<linearGradient id="_未命名的渐变_150" data-name="未命名的渐变 150" x1="12.68" y1="70.45" x2="17.45" y2="70.45" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#999899"/>
<stop offset=".17" stop-color="#7e7e80"/>
<stop offset=".43" stop-color="#5b5d60"/>
<stop offset=".64" stop-color="#46494d"/>
<stop offset=".78" stop-color="#3f4246"/>
<stop offset=".96" stop-color="#404247"/>
<stop offset=".99" stop-color="#43434a"/>
</linearGradient>
<linearGradient id="_未命名的渐变_507" data-name="未命名的渐变 507" x1=".5" y1="34.3" x2="29.38" y2="34.3" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#b1bbcb"/>
<stop offset=".15" stop-color="#c2cddb"/>
<stop offset=".38" stop-color="#dbe7f0"/>
<stop offset=".53" stop-color="#e4f1f9"/>
<stop offset=".64" stop-color="#deeaf3"/>
<stop offset=".8" stop-color="#cdd9e5"/>
<stop offset=".98" stop-color="#b1bccd"/>
<stop offset="1" stop-color="#aeb9ca"/>
</linearGradient>
<linearGradient id="_未命名的渐变_178" data-name="未命名的渐变 178" x1=".81" y1="35.42" x2="29.06" y2="35.42" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#403c42"/>
<stop offset=".14" stop-color="#3c4353"/>
<stop offset=".27" stop-color="#3a475d"/>
<stop offset=".46" stop-color="#344256"/>
<stop offset=".73" stop-color="#233445"/>
<stop offset="1" stop-color="#0d212d"/>
</linearGradient>
<radialGradient id="_未命名的渐变_4" data-name="未命名的渐变 4" cx="15.03" cy="21.36" fx="15.03" fy="21.36" r="9.07" gradientTransform="translate(.15 -2.95) scale(.98 .95)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset=".34" stop-color="#ed7474"/>
<stop offset=".52" stop-color="#ea5a59"/>
<stop offset=".7" stop-color="#ea514f"/>
<stop offset=".77" stop-color="#e5312c"/>
<stop offset=".78" stop-color="#e12e2a"/>
<stop offset="1" stop-color="#ce2320"/>
</radialGradient>
<radialGradient id="_未命名的渐变_264" data-name="未命名的渐变 264" cx="15.03" cy="21.36" fx="15.03" fy="21.36" r="8.62" gradientTransform="translate(.15 -2.95) scale(.98 .95)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset=".38" stop-color="#ea514f"/>
<stop offset=".75" stop-color="#e12e2a"/>
<stop offset=".91" stop-color="#c62f2d"/>
<stop offset="1" stop-color="#a11715"/>
</radialGradient>
<radialGradient id="_未命名的渐变_322" data-name="未命名的渐变 322" cx="15.03" cy="41.14" fx="15.03" fy="41.14" r="8.37" gradientTransform="translate(.15 -2.95) scale(.98 .95)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#f5d12a"/>
<stop offset="0" stop-color="#f5d430"/>
<stop offset=".02" stop-color="#f6de46"/>
<stop offset=".04" stop-color="#f7e757"/>
<stop offset=".07" stop-color="#f8ec63"/>
<stop offset=".11" stop-color="#f8f06a"/>
<stop offset=".21" stop-color="#f9f16c"/>
<stop offset=".9" stop-color="#f8cf00"/>
<stop offset="1" stop-color="#ffe200"/>
</radialGradient>
<radialGradient id="_未命名的渐变_457" data-name="未命名的渐变 457" cx="14.94" cy="60.92" fx="14.94" fy="60.92" r="8.48" gradientTransform="translate(0 -2.95) scale(1 .95)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#ed7474"/>
<stop offset="0" stop-color="#8fc31f"/>
<stop offset=".38" stop-color="#8fc31f"/>
<stop offset=".7" stop-color="#58b431"/>
<stop offset=".83" stop-color="#24a239"/>
<stop offset="1" stop-color="#0c6735"/>
</radialGradient>
</defs>
<g id="_图层_1-2" data-name="图层 1">
<g>
<ellipse id="_椭圆形" data-name="椭圆形" class="cls-12" cx="14.94" cy="81.84" rx="14.37" ry="3.7"/>
<ellipse id="_椭圆形-2" data-name="椭圆形" class="cls-6" cx="14.94" cy="81.84" rx="7.55" ry="2.96"/>
<path class="cls-3" d="M14.94,58.28h0c1.45,0,2.63,1.18,2.63,2.63v19.21c0,1.38-1.12,2.5-2.5,2.5h-.29c-1.36,0-2.46-1.1-2.46-2.46v-19.25c0-1.45,1.18-2.63,2.63-2.63Z"/>
<rect class="cls-8" x=".5" y=".5" width="28.88" height="67.6" rx="14.44" ry="14.44"/>
<rect class="cls-7" x=".81" y="3.51" width="28.25" height="63.82" rx="14.13" ry="14.13"/>
<g>
<path class="cls-9" d="M6.01,17.23c0,4.73,4,8.58,8.93,8.58s8.93-3.84,8.93-8.58-4-8.58-8.93-8.58-8.93,3.84-8.93,8.58Z"/>
<path class="cls-4" d="M6.46,17.23c0,4.5,3.8,8.15,8.48,8.15s8.48-3.65,8.48-8.15-3.8-8.15-8.48-8.15-8.48,3.65-8.48,8.15Z"/>
</g>
<path id="_形状" data-name="形状" class="cls-5" d="M5.94,11.25c-.31,0-.59-.16-.72-.43s-.09-.59,.11-.81c1.31-1.55,2.91-2.85,4.71-3.85,.19-.09,.41-.11,.61-.04,.2,.06,.37,.2,.46,.39,.19,.38,.04,.83-.34,1.04-1.62,.86-3.05,2.02-4.22,3.4-.15,.17-.38,.27-.61,.27v.04Zm-1.74,2.47c-.15,0-.29-.04-.41-.12-.18-.1-.31-.27-.36-.47-.05-.2-.01-.41,.1-.58l.26-.41c.11-.17,.28-.3,.49-.35,.2-.05,.42-.01,.6,.1,.18,.11,.31,.28,.36,.48s.01,.41-.1,.59l-.26,.4c-.14,.23-.4,.37-.67,.37h0Z"/>
<g>
<path class="cls-11" d="M6.28,35.93c0,4.59,3.88,8.32,8.66,8.32s8.66-3.73,8.66-8.32-3.88-8.32-8.66-8.32-8.66,3.73-8.66,8.32Z"/>
<path class="cls-2" d="M6.71,35.93c0,4.36,3.69,7.91,8.23,7.91s8.23-3.54,8.23-7.91-3.69-7.91-8.23-7.91-8.23,3.54-8.23,7.91Z"/>
</g>
<g>
<path class="cls-10" d="M6.01,54.63c0,4.66,4,8.44,8.93,8.44s8.93-3.78,8.93-8.44-4-8.44-8.93-8.44-8.93,3.78-8.93,8.44Z"/>
<path class="cls-1" d="M6.46,54.63c0,4.42,3.8,8.01,8.48,8.01s8.48-3.59,8.48-8.01-3.8-8.01-8.48-8.01-8.48,3.59-8.48,8.01Z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,40 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="140"
height="140" viewBox="0 0 140 140">
<defs>
<style>
.a{fill:none;}.b{fill:#898989;opacity:0;}.c{opacity:0.14;mix-blend-mode:multiply;isolation:isolate;}.d{clip-path:url(#a);}.e{fill:#b2250a;}.f{fill:#ea7626;}.g{fill:#fae8c8;}
</style>
<clipPath id="a">
<rect class="a" width="54.796" height="40.392" />
</clipPath>
</defs>
<g transform="translate(-1333 -1090)">
<g transform="translate(251 665)">
<rect class="b" width="140" height="140" transform="translate(1082 425)" />
<g transform="translate(229.467 -611)">
<g transform="translate(937.713 1086)">
<g transform="translate(0 0)">
<g class="c" transform="translate(0)">
<g transform="translate(0)">
<g class="d">
<path
d="M38.035,31.807l-16.7-13a3.818,3.818,0,0,0-6.163,3.014v3.908h-26.39A4.066,4.066,0,0,0-15.287,29.8V39.844a4.066,4.066,0,0,0,4.066,4.066h26.39v3.908a3.818,3.818,0,0,0,6.163,3.014l16.7-13a3.819,3.819,0,0,0,0-6.027"
transform="translate(15.287 -18)" />
</g>
</g>
</g>
<path class="e"
d="M39.533,29.22H37.54L21.332,41.831a3.819,3.819,0,0,1-6.163-3.014V34.909h-26.39a4.066,4.066,0,0,1-4.066-4.066V20.8a4.066,4.066,0,0,1,4.066-4.066h26.39V12.825a3.818,3.818,0,0,1,6.163-3.014l16.7,13a3.791,3.791,0,0,1,1.448,2.581l.049.005Z"
transform="translate(15.287 -5.889)" />
<path class="f"
d="M38.028,13.807l-16.7-13a3.818,3.818,0,0,0-6.163,3.014V7.733H-11.253A4.066,4.066,0,0,0-15.318,11.8V21.844a4.066,4.066,0,0,0,4.066,4.066H15.162v3.908a3.818,3.818,0,0,0,6.163,3.014l16.7-13a3.819,3.819,0,0,0,0-6.027"
transform="translate(15.318 6.457)" />
</g>
<path class="g"
d="M75.8,20.234a2.381,2.381,0,0,1-1.511-.539L71.346,17.29a2.392,2.392,0,1,1,3.025-3.706l2.948,2.406A2.392,2.392,0,0,1,75.8,20.234"
transform="translate(-35.64 -1.875)" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -596,7 +596,8 @@ public final class NIMapView extends RelativeLayout {
VECTOR(2)/*高亮组*/,
OPERATE_LINE(3)/*操作图层组*/,
OPERATE_MARKER(4)/*操作图层组*/,
NAVIGATION(5)/*定位导航组*/;
NAVIGATION(5)/*定位导航组*/,
LABEL(6)/*图标,文字图层*/;
int groupIndex;

View File

@ -22,10 +22,11 @@ import java.io.File
/**
* Layer 操作
*/
class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePath: String) : BaseHandler(context, mapView) {
class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView, tracePath: String) :
BaseHandler(context, mapView) {
private var baseGroupLayer // 用于盛放所有基础底图的图层组,便于统一管理
: GroupLayer? = null
private val mTracePath:String = tracePath
private val mTracePath: String = tracePath
/**
* 轨迹渲染图层
@ -70,12 +71,13 @@ class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePa
vectorNiLocationTileLayer = VectorTileLayer(mMapView.vtmMap, mapLifeNiLocationTileSource)
labelNiLocationLayer = LabelLayer(mMapView.vtmMap, vectorNiLocationTileLayer, LabelTileLoaderHook(), 15)
labelNiLocationLayer =
LabelLayer(mMapView.vtmMap, vectorNiLocationTileLayer, LabelTileLoaderHook(), 15)
if(vectorNiLocationTileLayer!=null){
addLayer(vectorNiLocationTileLayer,NIMapView.LAYER_GROUPS.BASE)
if (vectorNiLocationTileLayer != null) {
addLayer(vectorNiLocationTileLayer, NIMapView.LAYER_GROUPS.BASE)
}
if(labelNiLocationLayer!=null){
if (labelNiLocationLayer != null) {
addLayer(labelNiLocationLayer, NIMapView.LAYER_GROUPS.BASE)
}
@ -92,7 +94,7 @@ class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePa
mMapView.vtmMap.events.bind(UpdateListener { e, mapPosition ->
if (e == org.oscim.map.Map.SCALE_EVENT) {
// 测评数据图层在指定Zoom后开始显示
val isOmdbZoom = mapPosition.zoomLevel>=Constant.OMDB_MIN_ZOOM
val isOmdbZoom = mapPosition.zoomLevel >= Constant.OMDB_MIN_ZOOM
baseGroupLayer?.layers?.forEach {
it.isEnabled = !isOmdbZoom
}
@ -103,25 +105,36 @@ class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView,tracePa
}
private fun initOMDBVectorTileLayer() {
// 初始化OMDB相关图层
omdbVectorTileLayer = VectorTileLayer(mMapView.vtmMap, omdbTileSource)
omdbLabelLayer = LabelLayer(mMapView.vtmMap, omdbVectorTileLayer, LabelTileLoaderHook(), Constant.OMDB_MIN_ZOOM)
if(omdbVectorTileLayer!=null){
addLayer(omdbVectorTileLayer,NIMapView.LAYER_GROUPS.VECTOR_TILE)
}
if(omdbLabelLayer!=null){
addLayer(omdbLabelLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
}
// 初始化OMDB参考相关图层
omdbReferenceTileLayer = VectorTileLayer(mMapView.vtmMap, omdbReferenceTileSource)
omdbReferenceLabelLayer = LabelLayer(mMapView.vtmMap, omdbReferenceTileLayer, LabelTileLoaderHook(), Constant.OMDB_MIN_ZOOM)
if(omdbReferenceTileLayer!=null){
addLayer(omdbReferenceTileLayer,NIMapView.LAYER_GROUPS.VECTOR_TILE)
omdbReferenceLabelLayer = LabelLayer(
mMapView.vtmMap,
omdbReferenceTileLayer,
LabelTileLoaderHook(),
Constant.OMDB_MIN_ZOOM
)
if (omdbReferenceTileLayer != null) {
addLayer(omdbReferenceTileLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
}
if(omdbReferenceLabelLayer!=null){
addLayer(omdbReferenceLabelLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
if (omdbReferenceLabelLayer != null) {
addLayer(omdbReferenceLabelLayer, NIMapView.LAYER_GROUPS.LABEL)
}
// 初始化OMDB相关图层
omdbVectorTileLayer = VectorTileLayer(mMapView.vtmMap, omdbTileSource)
omdbLabelLayer = LabelLayer(
mMapView.vtmMap,
omdbVectorTileLayer,
LabelTileLoaderHook(),
Constant.OMDB_MIN_ZOOM
)
if (omdbVectorTileLayer != null) {
addLayer(omdbVectorTileLayer, NIMapView.LAYER_GROUPS.VECTOR_TILE)
}
if (omdbLabelLayer != null) {
addLayer(omdbLabelLayer, NIMapView.LAYER_GROUPS.LABEL)
}
}
/**

2
vtm

@ -1 +1 @@
Subproject commit dd13e533c38b5738ab404c2737d7ccadeff01323
Subproject commit 1ee201a41f78f169873848209a3f3bdac36f185a