[fea]
[算路模块修改]
This commit is contained in:
yangyakun
2024-10-10 19:01:20 +08:00
parent 8299e138e8
commit 01553cbbef
48 changed files with 2054 additions and 2402 deletions

View File

@@ -131,28 +131,30 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
showLoginInfoAnimator2?.interpolator = DecelerateInterpolator()
}
UiThreadHandler.postDelayed({
val animatorSet = AnimatorSet()
animatorSet.playTogether(showLoginInfoAnimator1, showLoginInfoAnimator2)
animatorSet.duration = 500
animatorSet.addListener(object :AnimatorListener{
override fun onAnimationStart(animation: Animator) {
cl_login_info.visibility = View.VISIBLE
}
cl_login_info?.let {
val animatorSet = AnimatorSet()
animatorSet.playTogether(showLoginInfoAnimator1, showLoginInfoAnimator2)
animatorSet.duration = 500
animatorSet.addListener(object :AnimatorListener{
override fun onAnimationStart(animation: Animator) {
cl_login_info?.visibility = View.VISIBLE
}
override fun onAnimationEnd(animation: Animator) {
override fun onAnimationEnd(animation: Animator) {
}
}
override fun onAnimationCancel(animation: Animator) {
override fun onAnimationCancel(animation: Animator) {
}
}
override fun onAnimationRepeat(animation: Animator) {
override fun onAnimationRepeat(animation: Animator) {
}
}
})
animatorSet.start()
})
animatorSet.start()
}
},2_000,UiThreadHandler.MODE.QUEUE)
}

View File

@@ -327,6 +327,69 @@ object LineManager : CallerBase<ILineCallback>() {
0L
)
}
val wayLatLons = mutableListOf<AutoPilotLonLat>()
// 途经点
if (!contrai.passPoints.isNullOrEmpty()) {
for (mogoLatLng in contrai.passPoints!!) {
wayLatLons.add(
AutoPilotLonLat(
mogoLatLng.lat,
mogoLatLng.lon,
when (mogoLatLng.pointType) {
1 -> {//途径点
false
}
2 -> {//禁行点
false
}
3 -> {//站点
true
}
else -> {
false
}
}
)
)
}
}
val blackLatLons = mutableListOf<AutoPilotLonLat>()
// 黑名单点
if (!contrai.blackPoints.isNullOrEmpty()) {
for (mogoLatLng in contrai.blackPoints!!) {
blackLatLons.add(
AutoPilotLonLat(
mogoLatLng.lat,
mogoLatLng.lat,
when (mogoLatLng.pointType) {
1 -> {//途径点
false
}
2 -> {//禁行点
false
}
3 -> {//站点
true
}
else -> {
false
}
}
)
)
}
}
parameters?.wayLatLons = wayLatLons
parameters?.blackLatLons = blackLatLons
}
if (parameters == null) {
ToastUtils.showShort("未设置起始或终点站点")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:background="@color/common_f7151d41"
android:id="@+id/no_order_data_view">
<ImageView
android:id="@+id/no_order_data_iv"
android:layout_width="@dimen/dp_198"
android:layout_height="@dimen/dp_158"
android:src="@drawable/common_empty"
android:scaleType="fitXY"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/>
<TextView
android:id="@+id/no_order_data_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/common_B3FFFFFF"
android:textSize="@dimen/dp_40"
android:gravity="center"
android:layout_marginTop="@dimen/dp_31"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/no_order_data_iv"
android:text="@string/common_empty_data"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:background="@color/common_f7151d41"
android:id="@+id/no_order_data_view">
<ImageView
android:id="@+id/no_order_data_iv"
android:layout_width="@dimen/dp_198"
android:layout_height="@dimen/dp_158"
android:src="@drawable/common_empty"
android:scaleType="fitXY"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/>
<TextView
android:id="@+id/tv_error_msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/common_B3FFFFFF"
android:textSize="@dimen/dp_40"
android:gravity="center"
android:layout_marginTop="@dimen/dp_31"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/no_order_data_iv"
android:text="@string/common_empty_data"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -31,4 +31,5 @@
<string name="common_change2_pxjs_manual">平行驾驶已退出,请立即接管,注意周边环境 小心驾驶</string>
<string name="common_biz_loading">加载中……</string>
<string name="common_empty_data">暂无数据</string>
</resources>

View File

@@ -20,6 +20,7 @@ public class BusStationBean {
private boolean leaving;
private String introduction;// 站点简介
private boolean isPlayTts;
private int pointType; // 1:途径点 2:禁行点 3:站点
public String getNameKr() {
return nameKr;
@@ -117,6 +118,14 @@ public class BusStationBean {
isPlayTts = playTts;
}
public int getPointType() {
return pointType;
}
public void setPointType(int pointType) {
this.pointType = pointType;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -130,13 +139,14 @@ public class BusStationBean {
&& Double.compare(that.lat, lat) == 0
&& drivingStatus == that.drivingStatus
&& leaving == that.leaving
&& pointType == that.pointType
&& name.equals(that.name)
&& (nameKr == null || nameKr.equals(that.nameKr));
}
@Override
public int hashCode() {
return Objects.hash(siteId, name, nameKr, seq, gcjLon, gcjLat, lon, lat, drivingStatus, leaving);
return Objects.hash(siteId, name, nameKr, seq, gcjLon, gcjLat, lon, lat, drivingStatus, leaving,pointType);
}
@Override
@@ -154,6 +164,7 @@ public class BusStationBean {
", leaving=" + leaving +
", introduction='" + introduction + '\'' +
", isPlayTts=" + isPlayTts +
", pointType=" + pointType +
'}';
}
}

View File

@@ -30,4 +30,7 @@ data class ContraiInfo(
* 文件的保存时间
*/
val contrailSaveTime: Long,
var passPoints: MutableList<BusStationBean>?, // 用于算路的经停点
var blackPoints: MutableList<BusStationBean>?, // 用于算路的黑名單點
)