[taxi-p]
[预加载动画]
This commit is contained in:
yangyakun
2023-12-28 11:35:36 +08:00
parent b020eb3679
commit 963ba0cfab
389 changed files with 86 additions and 50 deletions

View File

@@ -438,8 +438,9 @@ class TaxiPassengerBaseFragment() :
return statusBar
}
fun preLoadArrivedImages() {
arrivedView.preLoadImages()
}
companion object {

View File

@@ -53,20 +53,16 @@ class ArrivedView : WindowRelativeLayout, ArrivedViewModel.ArrivedViewCallback {
aciv_close.onClick {
visibility = View.GONE
}
taxiPxiaozhiLove = BigFrameAnimatorContainer(R.array.arrived_dest, 31,aciv_bg,isOnce = true)
taxiPxiaozhiLove?.setOnAnimStopListener(object : BigFrameAnimatorContainer.OnAnimationStoppedListener{
override fun AnimationStopped() {
d(SceneConstant.M_TAXI_P + TAG, "动画暂停")
}
})
}
override fun onVisibilityAggregated(isVisible: Boolean) {
super.onVisibilityAggregated(isVisible)
d(SceneConstant.M_TAXI_P + TAG, "展示---:${isVisible}")
if (isVisible) {
taxiPxiaozhiLove = BigFrameAnimatorContainer(R.array.arrived_dest, 31,aciv_bg,isOnce = true)
if(taxiPxiaozhiLove==null) {
taxiPxiaozhiLove =
BigFrameAnimatorContainer(R.array.arrived_dest, 31, aciv_bg, isOnce = true)
}
taxiPxiaozhiLove?.start()
v_video_right_rear_view.resetView()
viewModel.setEndInfo()
@@ -109,6 +105,12 @@ class ArrivedView : WindowRelativeLayout, ArrivedViewModel.ArrivedViewCallback {
actv_endstation.text = stationName
}
override fun preLoadImages() {
if (taxiPxiaozhiLove==null) {
taxiPxiaozhiLove = BigFrameAnimatorContainer(R.array.arrived_dest, 31,aciv_bg,isOnce = true)
}
}
fun aniArrived(show:Boolean){
RxUtils.createSubscribe(500) {
val alphaStart: Float
@@ -124,7 +126,7 @@ class ArrivedView : WindowRelativeLayout, ArrivedViewModel.ArrivedViewCallback {
}
ObjectAnimator.ofFloat(this@ArrivedView, "alpha", alphaStart, alphaEnd).apply {
duration = 1000
addListener(object : AnimatorListenerAdapter(){
addListener(object :AnimatorListenerAdapter(){
override fun onAnimationEnd(animation: Animator) {
d(TAG,"onAnimationEndcarrivedView")
if(show){

View File

@@ -1,36 +1,51 @@
package com.mogo.och.taxi.passenger.ui.arrived
import androidx.lifecycle.ViewModel
import com.mogo.och.common.module.manager.distancemamager.IDistanceListener
import com.mogo.och.common.module.manager.distancemamager.TrajectoryAndDistanceManager
import com.mogo.och.taxi.passenger.model.TaxiPassengerModel
class ArrivedViewModel: ViewModel() {
class ArrivedViewModel : ViewModel(), IDistanceListener {
private val TAG = ArrivedViewModel::class.java.simpleName
private var viewCallback:ArrivedViewCallback?=null
private var viewCallback: ArrivedViewCallback? = null
private var havePreLoadOrderNum: String? = null
init {
TrajectoryAndDistanceManager.addDistanceListener(TAG, this)
}
fun setViewCallback(viewCallback: ArrivedViewCallback){
fun setViewCallback(viewCallback: ArrivedViewCallback) {
this.viewCallback = viewCallback
}
fun setEndInfo(){
fun setEndInfo() {
TaxiPassengerModel.currentOCHOrder?.endSiteAddr?.let {
this.viewCallback?.setEndStation(it)
}
}
override fun distanceCallback(distance: Float) {
if (distance <= 50) {
TaxiPassengerModel.currentOCHOrder?.orderNo?.let {
if (it != havePreLoadOrderNum) {
this.viewCallback?.preLoadImages()
havePreLoadOrderNum = it
}
}
}
}
override fun onCleared() {
super.onCleared()
this.viewCallback = null
}
interface ArrivedViewCallback{
fun setEndStation(stationName:String)
interface ArrivedViewCallback {
fun setEndStation(stationName: String)
fun preLoadImages()
}
}

View File

@@ -71,6 +71,7 @@ class DebugView @JvmOverloads constructor(
}
tv_show_order_info.onClick {
fragment?.showOrHideServingOrderFragment(true)
fragment?.preLoadArrivedImages()
}
}

View File

@@ -80,7 +80,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
aivStartPlay.scaleX = 0.8f
aivStartPlay.scaleY = 0.8f
mProgressBar.thumb = ZoomDrawable.zoomDrawableImage(context,R.drawable.bg_taxi_p_video_index,0.66f,0.66f)
mProgressBar.thumb = ZoomDrawable.zoomDrawableImage(context,R.drawable.taxi_p_video_index,0.66f,0.66f)
}
private fun addDrageAnchor(){
@@ -108,7 +108,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
titleTextView.layoutParams = layoutParams1
aivStartPlay.scaleX = 1f
aivStartPlay.scaleY = 1f
val drawable = ActivityCompat.getDrawable(context, R.drawable.bg_taxi_p_video_index)
val drawable = ActivityCompat.getDrawable(context, R.drawable.taxi_p_video_index)
mProgressBar.thumb = drawable
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
mProgressBar.maxHeight = 6

View File

@@ -6,7 +6,6 @@ import android.view.LayoutInflater
import android.view.View
import android.widget.FrameLayout
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import com.mogo.commons.voice.AIAssist
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
@@ -175,7 +174,7 @@ class NumberCheckView @JvmOverloads constructor(
private fun changeStyle() {
numSelectTextView.forEachIndexed { indexIn, textView ->
if(indexIn==index){
numSelectTextView[index]!!.setBackgroundResource(R.drawable.bg_taxi_p_checked_input_background)
numSelectTextView[index]!!.setBackgroundResource(R.drawable.taxi_p_checked_input_background)
numSelectTextView[index]!!.setTextColor(
ContextCompat.getColor(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 808 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 801 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 723 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 736 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 745 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 731 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 566 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 956 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 981 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 836 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 976 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 922 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 925 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1004 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 986 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Some files were not shown because too many files have changed in this diff Show More