merge code

This commit is contained in:
qiji4215 2023-05-05 16:58:03 +08:00
parent af79ae4146
commit 6b1ac4df9b
19 changed files with 184 additions and 40 deletions

View File

@ -60,22 +60,20 @@ class EvaluationResultFragment : BaseFragment(), View.OnClickListener {
onBackPressed()
}
//返回按钮点击
binding.evaluationBar.setNavigationOnClickListener {
binding.evaluationBar.setOnClickListener() {
onBackPressed()
}
//标题栏按钮
binding.evaluationBar.setOnMenuItemClickListener {
when (it.itemId) {
R.id.save -> {
viewModel.saveData()
true
}
R.id.delete -> {
viewModel.deleteData()
true
}
else -> true
}
//保存事件
binding.evaluationBarSave.setOnClickListener() {
viewModel.saveData()
}
//删除事件
binding.evaluationBarDelete.setOnClickListener() {
viewModel.deleteData()
}

View File

@ -326,6 +326,7 @@ class EvaluationResultViewModel @Inject constructor(
}
// realm.close()
mapController.markerHandle.removeQsRecordMark(liveDataQsRecordBean.value!!)
mapController.mMapView.vtmMap.updateMap(true)
liveDataFinish.postValue(true)
}
}

View File

@ -1,6 +1,53 @@
<vector android:height="24dp" android:tint="#1717E0"
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,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path android:fillColor="@android:color/white" android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0">
<aapt:attr name="android:fillColor">
<gradient
android:angle="0"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#FF6D0BBD"
android:startColor="#FF445FF5"
android:type="linear"
android:useLevel="false"
/>
</aapt:attr>
</path>
<path android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z">
<aapt:attr name="android:fillColor">
<gradient
android:angle="0"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#FF6D0BBD"
android:startColor="#FF445FF5"
android:type="linear"
android:useLevel="false"
/>
</aapt:attr>
</path>
</vector>

View File

@ -1,5 +1,34 @@
<vector android:height="24dp" android:tint="#1717E0"
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,15c1.66,0 2.99,-1.34 2.99,-3L15,6c0,-1.66 -1.34,-3 -3,-3S9,4.34 9,6v6c0,1.66 1.34,3 3,3zM17.3,12c0,3 -2.54,5.1 -5.3,5.1S6.7,15 6.7,12L5,12c0,3.42 2.72,6.23 6,6.72L11,22h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,15c1.66,0 2.99,-1.34 2.99,-3L15,6c0,-1.66 -1.34,-3 -3,-3S9,4.34 9,6v6c0,1.66 1.34,3 3,3zM17.3,12c0,3 -2.54,5.1 -5.3,5.1S6.7,15 6.7,12L5,12c0,3.42 2.72,6.23 6,6.72L11,22h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z">
<aapt:attr name="android:fillColor">
<gradient
android:angle="90"
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#FF6D0BBD"
android:startColor="#00000000"
android:gradientRadius="10"
android:type="radial"
android:useLevel="false"
/>
</aapt:attr>
</path>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple_color">
<item android:drawable="@drawable/shape_btn_video_normal"/>
</ripple>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/ripple_btn_video_normal"></item>
<item android:state_checked="true" android:drawable="@drawable/ripple_btn_video_normal"/>
<item android:state_pressed="true" android:drawable="@drawable/ripple_btn_video_normal"/>
<item android:state_selected="true" android:drawable="@drawable/ripple_btn_video_normal"></item>
<item android:drawable="@drawable/ripple_btn_video_normal"/>
</selector>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp"
android:radius="20dp"
android:topLeftRadius="8dp"
android:topRightRadius="0dp" />
<gradient
android:centerX="0.5"
android:centerY="0.5"
android:endColor="#ff6d0bbd"
android:startColor="#ff445ff5"
android:type="linear" />
</shape>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorPrimarySurface"></solid>
<stroke android:color="@color/colorSecondary"></stroke>
<corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp"
android:radius="20dp"
android:topLeftRadius="8dp"
android:topRightRadius="0dp" />
</shape>

View File

@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/ivory"
android:background="@color/white"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:paddingRight="10dp"
android:paddingBottom="5dp"
tools:context="com.navinfo.omqs.ui.fragment.evaluationresult.SoundListAdapter">
<LinearLayout
<RelativeLayout
android:id="@+id/rl_sound_content"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_select_sound_xml"
android:background="@drawable/selector_bg_video_button"
android:gravity="center_vertical"
android:minWidth="50dp"
android:orientation="horizontal"
@ -26,20 +27,22 @@
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="6dp"
android:gravity="left|center"
android:layout_alignParentLeft="true"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:lineSpacingExtra="2dp"
android:text=""
android:textColor="@color/font_blue_reg"
android:textColor="@color/white"
android:textSize="15sp" />
<ImageView
android:id="@+id/iv_sound_anim"
android:paddingLeft="10dp"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sound_anim" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -26,14 +26,38 @@
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/evaluation_bar"
style="@style/card_title_font_default"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white"
app:menu="@menu/evaluation_bar_mean"
app:title="Mark" />
android:layout_height="match_parent">
<TextView
android:padding="10dp"
android:id="@+id/evaluation_bar"
style="@style/card_title_font_default"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Mark" />
<ImageButton
android:id="@+id/evaluation_bar_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_alignParentRight="true"
android:background="@drawable/icon_save" />
<ImageButton
android:id="@+id/evaluation_bar_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:layout_centerInParent="true"
android:layout_toLeftOf="@+id/evaluation_bar_save"
android:background="@drawable/btn_delete_xml" />
</RelativeLayout>
</com.google.android.material.appbar.AppBarLayout>