[评论动画]
This commit is contained in:
yangyakun
2024-03-26 01:06:54 +08:00
parent 229d8e5b66
commit 277ab4f9da
28 changed files with 107 additions and 47 deletions

View File

@@ -1267,6 +1267,26 @@ public class OrderModel {
return parameters;
}
public void setStation(){
BusStationBean busStationBean = stationList.get(backgroundCurrentStationIndex);
String nextStationName = "";
String nextStationNameKr = "";
MogoLocation nextStationPoint = new MogoLocation();
if (backgroundCurrentStationIndex < stationList.size() - 1) {
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
nextStationName = nextStation.getName();
nextStationNameKr = nextStation.getNameKr();
nextStationPoint.setLongitude(nextStation.getGcjLon());
nextStationPoint.setLatitude(nextStation.getGcjLat());
}
final String currentStationName = busStationBean.getName();
String finalNextStationName = nextStationName;
String finalNextStationNameKr = nextStationNameKr;
MogoLocation currentStationPoint = new MogoLocation();
currentStationPoint.setLongitude(busStationBean.getGcjLon());
currentStationPoint.setLatitude(busStationBean.getGcjLat());
}
public void setTrajectoryStation(MogoLocation startStation,MogoLocation endStation,Long lineId){
TrajectoryAndDistanceManager.INSTANCE.setStationPoint(startStation,endStation,lineId);
}

View File

@@ -454,6 +454,10 @@ class TaxiPassengerBaseFragment() :
arrivedView.preLoadImages()
}
fun setEvaluateView(){
evaluate.visibility = View.VISIBLE
}
companion object {
@JvmField

View File

@@ -19,6 +19,7 @@ import com.mogo.och.common.module.manager.debug.DebugViewWatchDogFragment
import com.mogo.och.taxi.passenger.R
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment
import kotlinx.android.synthetic.main.taxi_p_debug.view.tv_show_arrive
import kotlinx.android.synthetic.main.taxi_p_debug.view.tv_show_evaluate
import kotlinx.android.synthetic.main.taxi_p_debug.view.tv_show_order_info
import kotlinx.android.synthetic.main.taxi_p_debug.view.tv_show_phone_check
import kotlinx.android.synthetic.main.taxi_p_debug.view.tv_show_start_autopilot
@@ -77,7 +78,9 @@ class DebugView @JvmOverloads constructor(
fragment?.showOrHideServingOrderFragment(true)
fragment?.preLoadArrivedImages()
}
tv_show_evaluate.onClick {
fragment?.setEvaluateView()
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun changeOverview(debugEvent: DebugEvent) {

View File

@@ -35,5 +35,10 @@
android:text="订单信息"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/tv_show_evaluate"
android:text="评论"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -11,13 +11,13 @@ import androidx.lifecycle.findViewTreeViewModelStoreOwner
import com.mogo.commons.voice.AIAssist
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.och.common.module.manager.xiaozhimanager.ZhiViewmanager
import com.mogo.och.common.module.utils.FrameAnimatorContainer
import com.mogo.och.common.module.utils.RxUtils
import com.mogo.och.common.module.voice.VoiceNotice
import com.mogo.och.taxi.passenger.common.R
import kotlinx.android.synthetic.main.taxi_p_evaluate.view.iv_close
import kotlinx.android.synthetic.main.taxi_p_evaluate.view.iv_evaluate_great
import kotlinx.android.synthetic.main.taxi_p_evaluate.view.iv_evaluate_low
import kotlinx.android.synthetic.main.taxi_p_evaluate.view.iv_taxt_p_greate_text
class EvaluateView : ConstraintLayout, EvaluateViewModel.EvaluateCallback {
@@ -36,30 +36,35 @@ class EvaluateView : ConstraintLayout, EvaluateViewModel.EvaluateCallback {
private var viewModel: EvaluateViewModel?=null
private var ivEvaluateGreatAni: FrameAnimatorContainer?=null
private fun initView() {
LayoutInflater.from(context).inflate(R.layout.taxi_p_evaluate, this, true)
iv_evaluate_great.onClick {
if(isFirat){
iv_evaluate_great.pivotX = (iv_evaluate_great.width / 2).toFloat()
iv_evaluate_great.pivotY = iv_evaluate_great.height.toFloat()
iv_evaluate_great.animate().scaleY(1.7f).scaleX(1.7f).setListener(object
:AnimatorListenerAdapter() {
override fun onAnimationStart(animation: Animator) {
VoiceNotice.showNotice("感谢您的认可,我们会再接再厉", AIAssist.LEVEL2)
iv_taxt_p_greate_text.animate().alpha(1f).duration = 1000
// 小智爱心动作
ZhiViewmanager.showListeningAni(ZhiViewmanager.loveAni)
RxUtils.createSubscribe(3_000) {
visibility = GONE
iv_taxt_p_greate_text.alpha = 0f
//恢复默认大小
iv_evaluate_great.scaleX = 1.0f
iv_evaluate_great.scaleY = 1.0f
// 小智回归默认动作
ZhiViewmanager.showListeningAni(ZhiViewmanager.normalAni,false)
}
if(ivEvaluateGreatAni==null) {
ivEvaluateGreatAni =
FrameAnimatorContainer(R.array.taxi_p_arrive_dest_great, 31, iv_evaluate_great, isOnce = true)
ivEvaluateGreatAni?.start()
}else{
ivEvaluateGreatAni?.reStart()
}
ivEvaluateGreatAni?.setOnAnimStopListener(object :
FrameAnimatorContainer.OnAnimationStoppedListener {
override fun AnimationStopped() {
}
}).duration = 1000
})
VoiceNotice.showNotice("感谢您的认可,我们会再接再厉", AIAssist.LEVEL2)
// 小智爱心动作
ZhiViewmanager.showListeningAni(ZhiViewmanager.loveAni)
RxUtils.createSubscribe(3_000) {
visibility = GONE
// 小智回归默认动作
ZhiViewmanager.showListeningAni(ZhiViewmanager.normalAni,false)
}
isFirat = false
}
}
@@ -68,7 +73,7 @@ class EvaluateView : ConstraintLayout, EvaluateViewModel.EvaluateCallback {
if(isFirat){
iv_evaluate_low.pivotX = (iv_evaluate_low.width / 2).toFloat()
iv_evaluate_low.pivotY = iv_evaluate_low.height.toFloat()
iv_evaluate_low.animate().scaleY(1.7f).scaleX(1.7f).setListener(object :
iv_evaluate_low.animate().scaleY(1.2f).scaleX(1.2f).setListener(object :
AnimatorListenerAdapter() {
override fun onAnimationStart(animation: Animator) {
VoiceNotice.showNotice("感谢您的反馈,我们会继续努力!", AIAssist.LEVEL2)
@@ -97,7 +102,7 @@ class EvaluateView : ConstraintLayout, EvaluateViewModel.EvaluateCallback {
isFirat = true
VoiceNotice.showNotice("行程即将结束咯~小智很想知道您的体验如何呢", AIAssist.LEVEL2)
}else{
iv_evaluate_great.scaleX = 1f
iv_evaluate_great.setImageResource(R.drawable.arrive_dest_great_000)
iv_evaluate_low.scaleY = 1f
isFirat = true
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -279,4 +279,27 @@
</string-array>
<string-array name="taxi_p_arrive_dest_great">
<item>@drawable/arrive_dest_great_001</item>
<item>@drawable/arrive_dest_great_002</item>
<item>@drawable/arrive_dest_great_003</item>
<item>@drawable/arrive_dest_great_004</item>
<item>@drawable/arrive_dest_great_005</item>
<item>@drawable/arrive_dest_great_006</item>
<item>@drawable/arrive_dest_great_007</item>
<item>@drawable/arrive_dest_great_008</item>
<item>@drawable/arrive_dest_great_009</item>
<item>@drawable/arrive_dest_great_010</item>
<item>@drawable/arrive_dest_great_011</item>
<item>@drawable/arrive_dest_great_012</item>
<item>@drawable/arrive_dest_great_013</item>
<item>@drawable/arrive_dest_great_014</item>
<item>@drawable/arrive_dest_great_015</item>
<item>@drawable/arrive_dest_great_016</item>
<item>@drawable/arrive_dest_great_017</item>
</string-array>
</resources>

View File

@@ -7,7 +7,9 @@
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
android:id="@+id/rcccl_con"
android:layout_width="@dimen/dp_600"
android:layout_height="@dimen/dp_349"
android:layout_marginStart="@dimen/dp_40"
@@ -56,16 +58,6 @@
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/iv_evaluate_great"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:layout_marginBottom="@dimen/dp_10"
android:src="@drawable/taxi_p_evaluate_great"
app:layout_constraintBottom_toTopOf="@+id/tv_great_evaluate"
app:layout_constraintEnd_toEndOf="@+id/tv_great_evaluate"
app:layout_constraintStart_toStartOf="@+id/tv_great_evaluate" />
<ImageView
android:id="@+id/iv_evaluate_low"
android:layout_width="@dimen/dp_120"
@@ -78,16 +70,6 @@
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>
<ImageView
android:id="@+id/iv_taxt_p_greate_text"
android:layout_width="@dimen/dp_314"
android:layout_height="@dimen/dp_140"
android:src="@drawable/taxt_p_greate_text"
android:alpha="0"
android:layout_marginStart="@dimen/dp_81"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="@dimen/dp_81"
@@ -96,4 +78,15 @@
android:src="@drawable/taxi_p_evaluate_close"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_evaluate_great"
android:layout_width="@dimen/dp_320"
android:layout_height="@dimen/dp_400"
android:layout_marginBottom="@dimen/dp_33"
android:layout_marginStart="@dimen/dp_30"
android:src="@drawable/arrive_dest_great_000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/rcccl_con" />
</merge>

View File

@@ -302,6 +302,9 @@ class TaxiPassengerBaseFragment() :
overMapView.setDebugMode(true)
showOrHide(true,"Debug 按钮")
}
fun setEvaluateView(){
evaluate.visibility = View.VISIBLE
}
/**
* 显示或者隐藏到达乘客站点的洁面

View File

@@ -11,8 +11,8 @@ import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.och.taxi.passenger.R
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_arrive
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_evaluate
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_order_info
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_overmap_debug
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_phone_check
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_start_autopilot
import kotlinx.android.synthetic.main.taxt_u_p_debug.view.tv_show_start_autopilot_success
@@ -66,9 +66,8 @@ class DebugView @JvmOverloads constructor(
tv_show_start_autopilot_success.onClick {
fragment?.showOrHideCheckAndStartAutopilotView(2)
}
tv_show_overmap_debug.onClick {
fragment?.setOverMapDebug()
fragment?.preLoadArrivedImages()
tv_show_evaluate.onClick {
fragment?.setEvaluateView()
}
}
@Subscribe(threadMode = ThreadMode.MAIN)

View File

@@ -43,6 +43,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/tv_show_evaluate"
android:text="overmap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.appcompat.widget.LinearLayoutCompat>