[8.0.0]
[fix] [删除动画]
This commit is contained in:
@@ -18,6 +18,7 @@ import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.mgintelligent.speech.iflytek.WakeUpManager
|
||||
import com.mogo.och.common.module.biz.provider.CommonService
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.manager.xiaozhi.ZhiStateManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
@@ -266,7 +267,7 @@ class TaxiPassengerBaseFragment :
|
||||
|
||||
|
||||
override fun showOrHideCheckAndStartAutopilotView(status:Int){
|
||||
UiThreadHandler.post {
|
||||
BizLoopManager.runInMainThread{
|
||||
arrivedView.visibility = View.GONE
|
||||
when (status) {
|
||||
0 -> {
|
||||
@@ -364,9 +365,6 @@ class TaxiPassengerBaseFragment :
|
||||
val allAnimator = mutableListOf<Animator>()
|
||||
allAnimator.addAll(aniStatusBar(isShow))
|
||||
allAnimator.addAll(aniBottomBar(isShow))
|
||||
|
||||
//allAnimator.addAll(aniSpeedSettingRow(isShow,speedView))
|
||||
|
||||
allAnimator.addAll(aniOrderInfo(isShow))
|
||||
animatorSet.playTogether(allAnimator)
|
||||
animatorSet.start()
|
||||
@@ -375,108 +373,88 @@ class TaxiPassengerBaseFragment :
|
||||
@SuppressLint("ObjectAnimatorBinding")
|
||||
fun aniStatusBar(show:Boolean):List<Animator>{
|
||||
val statusBar = mutableListOf<Animator>()
|
||||
val translationYStart: Float
|
||||
val translationYEnd: Float
|
||||
val alphaStart: Float
|
||||
val alphaEnd: Float
|
||||
// val translationYStart: Float
|
||||
// val translationYEnd: Float
|
||||
// val alphaStart: Float
|
||||
// val alphaEnd: Float
|
||||
// if(show){
|
||||
// translationYStart = -statusBarView!!.height.toFloat()
|
||||
// translationYEnd = 0f
|
||||
// alphaStart = 0.3f
|
||||
// alphaEnd = 1f
|
||||
// }else{
|
||||
// translationYStart = 0f
|
||||
// translationYEnd = -statusBarView!!.height.toFloat()
|
||||
// alphaStart = 1f
|
||||
// alphaEnd = 0.3f
|
||||
// }
|
||||
// statusBar.add(ObjectAnimator.ofFloat(statusBarView, "translationY", translationYStart, translationYEnd).apply {
|
||||
// duration = 1000
|
||||
// })
|
||||
// //ofFloatMove.duration = 1000
|
||||
// statusBar.add( ObjectAnimator.ofFloat(statusBarView, "alpha", alphaStart, alphaEnd).apply {
|
||||
// duration = 1000
|
||||
// })
|
||||
if(show){
|
||||
translationYStart = -statusBarView!!.height.toFloat()
|
||||
translationYEnd = 0f
|
||||
alphaStart = 0.3f
|
||||
alphaEnd = 1f
|
||||
statusBarView?.visibility = View.VISIBLE
|
||||
}else{
|
||||
translationYStart = 0f
|
||||
translationYEnd = -statusBarView!!.height.toFloat()
|
||||
alphaStart = 1f
|
||||
alphaEnd = 0.3f
|
||||
statusBarView?.visibility = View.GONE
|
||||
}
|
||||
statusBar.add(ObjectAnimator.ofFloat(statusBarView, "translationY", translationYStart, translationYEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
//ofFloatMove.duration = 1000
|
||||
statusBar.add( ObjectAnimator.ofFloat(statusBarView, "alpha", alphaStart, alphaEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
return statusBar
|
||||
}
|
||||
|
||||
private fun aniBottomBar(show:Boolean):List<Animator>{
|
||||
val statusBar = mutableListOf<Animator>()
|
||||
val translationYStart: Float
|
||||
val translationYEnd: Float
|
||||
val alphaStart: Float
|
||||
val alphaEnd: Float
|
||||
if(show){
|
||||
translationYStart = bottom!!.height.toFloat()
|
||||
translationYEnd = 0f
|
||||
alphaStart = 0.3f
|
||||
alphaEnd = 1f
|
||||
}else{
|
||||
translationYStart = 0f
|
||||
translationYEnd = bottom!!.height.toFloat()
|
||||
alphaStart = 1f
|
||||
alphaEnd = 0.3f
|
||||
}
|
||||
|
||||
statusBar.add(ObjectAnimator.ofFloat(bottom, "translationY", translationYStart, translationYEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
statusBar.add(ObjectAnimator.ofFloat(bottom, "alpha", alphaStart, alphaEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
// val translationYStart: Float
|
||||
// val translationYEnd: Float
|
||||
// val alphaStart: Float
|
||||
// val alphaEnd: Float
|
||||
// if(show){
|
||||
// translationYStart = bottom!!.height.toFloat()
|
||||
// translationYEnd = 0f
|
||||
// alphaStart = 0.3f
|
||||
// alphaEnd = 1f
|
||||
// }else{
|
||||
// translationYStart = 0f
|
||||
// translationYEnd = bottom!!.height.toFloat()
|
||||
// alphaStart = 1f
|
||||
// alphaEnd = 0.3f
|
||||
// }
|
||||
//
|
||||
// statusBar.add(ObjectAnimator.ofFloat(bottom, "translationY", translationYStart, translationYEnd).apply {
|
||||
// duration = 1000
|
||||
// })
|
||||
// statusBar.add(ObjectAnimator.ofFloat(bottom, "alpha", alphaStart, alphaEnd).apply {
|
||||
// duration = 1000
|
||||
// })
|
||||
return statusBar
|
||||
}
|
||||
|
||||
private fun aniSpeedSettingRow(show:Boolean,view:View):List<Animator>{
|
||||
val statusBar = mutableListOf<Animator>()
|
||||
val translationYStart: Float
|
||||
val translationYEnd: Float
|
||||
val alphaStart: Float
|
||||
val alphaEnd: Float
|
||||
if(show){
|
||||
translationYStart = -view.height.toFloat()
|
||||
translationYEnd = 0f
|
||||
alphaStart = 0.0f
|
||||
alphaEnd = 1f
|
||||
}else{
|
||||
translationYStart = 0f
|
||||
translationYEnd = -view.height.toFloat()
|
||||
alphaStart = 1f
|
||||
alphaEnd = 0.0f
|
||||
}
|
||||
|
||||
statusBar.add(ObjectAnimator.ofFloat(view, "translationY", translationYStart, translationYEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
statusBar.add(ObjectAnimator.ofFloat(view, "alpha", alphaStart, alphaEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
return statusBar
|
||||
}
|
||||
private fun aniOrderInfo(show:Boolean):List<Animator>{
|
||||
val statusBar = mutableListOf<Animator>()
|
||||
val translationYStart: Float
|
||||
val translationYEnd: Float
|
||||
val alphaStart: Float
|
||||
val alphaEnd: Float
|
||||
if(show){
|
||||
translationYStart = itinerary.height.toFloat()/5
|
||||
translationYEnd = 0f
|
||||
alphaStart = 0.0f
|
||||
alphaEnd = 1f
|
||||
}else{
|
||||
translationYStart = 0f
|
||||
translationYEnd = itinerary.height.toFloat()/5
|
||||
alphaStart = 1f
|
||||
alphaEnd = 0.0f
|
||||
}
|
||||
|
||||
statusBar.add(ObjectAnimator.ofFloat(itinerary, "translationY", translationYStart, translationYEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
statusBar.add(ObjectAnimator.ofFloat(itinerary, "alpha", alphaStart, alphaEnd).apply {
|
||||
duration = 1000
|
||||
})
|
||||
// val translationYStart: Float
|
||||
// val translationYEnd: Float
|
||||
// val alphaStart: Float
|
||||
// val alphaEnd: Float
|
||||
// if(show){
|
||||
// translationYStart = itinerary.height.toFloat()/5
|
||||
// translationYEnd = 0f
|
||||
// alphaStart = 0.0f
|
||||
// alphaEnd = 1f
|
||||
// }else{
|
||||
// translationYStart = 0f
|
||||
// translationYEnd = itinerary.height.toFloat()/5
|
||||
// alphaStart = 1f
|
||||
// alphaEnd = 0.0f
|
||||
// }
|
||||
//
|
||||
// statusBar.add(ObjectAnimator.ofFloat(itinerary, "translationY", translationYStart, translationYEnd).apply {
|
||||
// duration = 1000
|
||||
// })
|
||||
// statusBar.add(ObjectAnimator.ofFloat(itinerary, "alpha", alphaStart, alphaEnd).apply {
|
||||
// duration = 1000
|
||||
// })
|
||||
return statusBar
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user