[6.7.0]UI调整

This commit is contained in:
xuxinchao
2024-09-26 15:54:29 +08:00
parent aaa63597ba
commit 04c1930199
14 changed files with 798 additions and 66 deletions

View File

@@ -610,25 +610,25 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
override fun onAutopilotStatistics(statistics: AutopilotStatistics?) {
statistics?.let {
Log.i(TAG,"onAutopilotStatistics status = "+ it.status)
if(it.status == AutopilotStatistics.AUTOPILOT_START_STATUS.FAILED){
// if(it.status == AutopilotStatistics.AUTOPILOT_START_STATUS.FAILED){
//触发一键上报
ThreadUtils.runOnUiThread{
val activity = AppStateManager.currentActivity()
if (activity !is AppCompatActivity) {
return@runOnUiThread
}
if(reportTypeWindow == null){
reportTypeWindow = ReportTypeWindow(activity)
reportTypeWindow?.setClickListener(object: ReportTypeWindow.ClickListener{
override fun closeWindow() {
reportTypeWindow?.hideFloatWindow()
reportTypeWindow = null
}
})
}
reportTypeWindow?.showOneClickReportWindow(xPosition,yPosition)
}
}
// ThreadUtils.runOnUiThread{
// val activity = AppStateManager.currentActivity()
// if (activity !is AppCompatActivity) {
// return@runOnUiThread
// }
// if(reportTypeWindow == null){
// reportTypeWindow = ReportTypeWindow(activity)
// reportTypeWindow?.setClickListener(object: ReportTypeWindow.ClickListener{
// override fun closeWindow() {
// reportTypeWindow?.hideFloatWindow()
// reportTypeWindow = null
// }
// })
// }
// reportTypeWindow?.showOneClickReportWindow(xPosition,yPosition)
// }
// }
}
}

View File

@@ -417,25 +417,25 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
@SuppressLint("ClickableViewAccessibility")
override fun onTouch(v: View?, motionEvent: MotionEvent?): Boolean {
when (motionEvent?.action) {
MotionEvent.ACTION_DOWN -> {
// 获取相对View的坐标即以此View左上角为原点
mInViewX = motionEvent.x
mInViewY = motionEvent.y
// 获取相对屏幕的坐标,即以屏幕左上角为原点
mInScreenX = motionEvent.rawX
mInScreenY = motionEvent.rawY
}
MotionEvent.ACTION_MOVE -> {
// 更新浮动窗口位置参数
mInScreenX = motionEvent.rawX
mInScreenY = motionEvent.rawY
mWindowParams!!.x = (mInScreenX - mInViewX).toInt()
mWindowParams!!.y = (mInScreenY - mInViewY).toInt()
// 手指移动的时候更新小悬浮窗的位置
mWindowManager!!.updateViewLayout(mFloatLayout, mWindowParams)
}
}
// when (motionEvent?.action) {
// MotionEvent.ACTION_DOWN -> {
// // 获取相对View的坐标即以此View左上角为原点
// mInViewX = motionEvent.x
// mInViewY = motionEvent.y
// // 获取相对屏幕的坐标,即以屏幕左上角为原点
// mInScreenX = motionEvent.rawX
// mInScreenY = motionEvent.rawY
// }
// MotionEvent.ACTION_MOVE -> {
// // 更新浮动窗口位置参数
// mInScreenX = motionEvent.rawX
// mInScreenY = motionEvent.rawY
// mWindowParams!!.x = (mInScreenX - mInViewX).toInt()
// mWindowParams!!.y = (mInScreenY - mInViewY).toInt()
// // 手指移动的时候更新小悬浮窗的位置
// mWindowManager!!.updateViewLayout(mFloatLayout, mWindowParams)
// }
// }
return true
}

View File

@@ -3,7 +3,7 @@
<item>
<shape>
<!-- 边框颜色 -->
<solid android:color="#8996C7"/>
<solid android:color="#A3A3A3"/>
<corners
android:bottomLeftRadius="@dimen/dp_8"
android:bottomRightRadius="@dimen/dp_8"
@@ -20,7 +20,7 @@
android:right="@dimen/dp_1" >
<shape>
<!-- View填充颜色 -->
<solid android:color="#F2161927" />
<solid android:color="#2E323A" />
<corners
android:bottomLeftRadius="@dimen/dp_8"
android:bottomRightRadius="@dimen/dp_8"

View File

@@ -6,5 +6,5 @@
android:angle="270"
/>
<corners
android:radius="@dimen/dp_0"/>
android:radius="@dimen/dp_10"/>
</shape>

View File

@@ -191,6 +191,8 @@
android:visibility="gone"
android:layout_marginTop="@dimen/dp_m_5"
android:paddingTop="@dimen/dp_5"
android:layout_marginStart="@dimen/dp_m_1"
android:layout_marginEnd="@dimen/dp_m_1"
/>
</androidx.constraintlayout.widget.ConstraintLayout>