[6.7.0]UI调整
This commit is contained in:
@@ -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)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
android:angle="270"
|
||||
/>
|
||||
<corners
|
||||
android:radius="@dimen/dp_0"/>
|
||||
android:radius="@dimen/dp_10"/>
|
||||
</shape>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user