[6.6.0]调整上报类型弹窗位置和原因选择窗口录音动画
This commit is contained in:
@@ -205,7 +205,9 @@ internal object BadCaseManager : LifecycleEventObserver, IMoGoAutopilotRecordLis
|
||||
reportTypeWindow = null
|
||||
}
|
||||
})
|
||||
reportTypeWindow?.showFloatWindow()
|
||||
val xPosition: Int = (view.left+view.right)/2 - 228
|
||||
val yPosition: Int = view.top - 250
|
||||
reportTypeWindow?.showFloatWindow(xPosition,yPosition)
|
||||
}
|
||||
}else{
|
||||
//展示工单上报弹窗
|
||||
|
||||
@@ -353,7 +353,9 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
}
|
||||
//开始录音,展示放大缩小动效
|
||||
val scaleAnimation = ScaleAnimation(
|
||||
1.0f, 0.8f, 1.0f, 0.8f)
|
||||
1.0f, 0.8f, 1.0f, 0.8f,
|
||||
Animation.RELATIVE_TO_SELF, 0.5f,
|
||||
Animation.RELATIVE_TO_SELF, 0.5f)
|
||||
scaleAnimation.duration = 1000
|
||||
scaleAnimation.repeatCount = -1
|
||||
ivNoteAudio.startAnimation(scaleAnimation)
|
||||
@@ -509,10 +511,8 @@ class FaultReasonWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
super.problemPadAddSuccess()
|
||||
//显示上报成功页面,短暂停留关闭弹窗
|
||||
ThreadUtils.runOnUiThread {
|
||||
if(ivNoteAudio.hasTransientState()){
|
||||
//结束动画
|
||||
ivNoteAudio.clearAnimation()
|
||||
}
|
||||
//结束动画
|
||||
ivNoteAudio.clearAnimation()
|
||||
rvFaultList.visibility = View.GONE
|
||||
tvUploadSuccess.visibility = View.VISIBLE
|
||||
faultReasonGroup.visibility = View.GONE
|
||||
|
||||
@@ -19,7 +19,6 @@ import androidx.constraintlayout.widget.Group
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
@@ -118,7 +117,6 @@ class ReportTypeWindow constructor(activity: Activity): IMoGoDevaToolsListener {
|
||||
hasReportOperate = true
|
||||
//TODO
|
||||
|
||||
CallerDevaToolsListenerManager.invokeProblemPadAddSuccess()
|
||||
}
|
||||
//故障类
|
||||
tvReportTypeFault.setOnClickListener {
|
||||
@@ -149,13 +147,18 @@ class ReportTypeWindow constructor(activity: Activity): IMoGoDevaToolsListener {
|
||||
|
||||
}
|
||||
|
||||
fun showFloatWindow() {
|
||||
/**
|
||||
* 展示弹窗
|
||||
* @param xPosition X轴坐标
|
||||
* @param yPosition Y轴坐标
|
||||
*/
|
||||
fun showFloatWindow(xPosition: Int,yPosition: Int) {
|
||||
if (mFloatLayout.parent == null) {
|
||||
val metrics = DisplayMetrics()
|
||||
// 默认固定位置,靠屏幕右边缘的中间
|
||||
mWindowManager!!.defaultDisplay.getMetrics(metrics)
|
||||
mWindowParams!!.x = metrics.widthPixels-2258
|
||||
mWindowParams!!.y = metrics.heightPixels - BarUtils.getStatusBarHeight()-420
|
||||
mWindowParams!!.x = xPosition
|
||||
mWindowParams!!.y = yPosition
|
||||
mWindowManager!!.addView(mFloatLayout, mWindowParams)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +291,8 @@ class TakeOverReasonWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
//开始录音,展示放大缩小动效
|
||||
val scaleAnimation = ScaleAnimation(
|
||||
1.0f, 0.8f, 1.0f, 0.8f,
|
||||
Animation.RELATIVE_TO_SELF, 0.8f, Animation.RELATIVE_TO_SELF, 0.8f
|
||||
Animation.RELATIVE_TO_SELF, 0.5f,
|
||||
Animation.RELATIVE_TO_SELF, 0.5f
|
||||
)
|
||||
scaleAnimation.duration = 1000
|
||||
scaleAnimation.repeatCount = -1
|
||||
|
||||
@@ -260,7 +260,7 @@ class WorkOrderWindow constructor(activity: Activity) : View.OnTouchListener,
|
||||
//开始录音,展示放大缩小动效
|
||||
val scaleAnimation = ScaleAnimation(
|
||||
1.0f, 0.8f, 1.0f, 0.8f,
|
||||
Animation.RELATIVE_TO_SELF, 0.8f, Animation.RELATIVE_TO_SELF, 0.8f
|
||||
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f
|
||||
)
|
||||
scaleAnimation.duration = 1000
|
||||
scaleAnimation.repeatCount = -1
|
||||
|
||||
Reference in New Issue
Block a user