[乘客屏页面调整、高精地图loading]
This commit is contained in:
yangyakun
2024-04-18 15:18:47 +08:00
parent 07211aaf98
commit 11b3927ec4
23 changed files with 157 additions and 20 deletions

View File

@@ -416,4 +416,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -96,6 +96,8 @@
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -157,6 +157,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- 16 9 -->
<!-- 1000 562.5 -->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -373,4 +373,8 @@
app:textSize="@dimen/dp_70"
tools:visibility="visible" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -166,4 +166,8 @@
android:layout_marginBottom="@dimen/dp_m_2"
app:layout_constraintStart_toStartOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</com.mogo.och.charter.passenger.ui.lockview.LockViewConstrainLayout>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/biz_login_5F6582"/>
<corners android:radius="@dimen/dp_37"/>
</shape>

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/dp_751"
android:layout_height="@dimen/dp_568"
android:background="@drawable/biz_login_error_info">
android:background="@drawable/biz_login_error_info_1080x1920">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_countdown"
@@ -13,7 +13,7 @@
android:layout_marginTop="@dimen/dp_35"
android:layout_marginEnd="@dimen/dp_45"
android:textColor="@color/biz_login_72A7FF"
android:textSize="@dimen/dp_40"
android:textSize="@dimen/dp_42"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="10s" />
@@ -43,7 +43,7 @@
android:layout_height="0dp"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_40"
android:textSize="@dimen/dp_44"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/actv_error_head"

View File

@@ -13,7 +13,7 @@
android:layout_marginTop="@dimen/dp_35"
android:layout_marginEnd="@dimen/dp_45"
android:textColor="@color/biz_login_72A7FF"
android:textSize="@dimen/dp_40"
android:textSize="@dimen/dp_42"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="10s" />

View File

@@ -24,7 +24,7 @@
android:id="@+id/actv_app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_70"
android:layout_marginBottom="@dimen/dp_41"
android:gravity="center"
android:text="版本号:6.4.0"
android:textColor="@color/white"

View File

@@ -12,13 +12,13 @@
android:id="@+id/actv_connect_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_70"
app:layout_constraintBottom_toTopOf="@+id/actv_app_version"
android:text="当前状态:连接司机屏中"
android:textColor="@color/white"
android:textSize="@dimen/dp_36"
android:textSize="@dimen/dp_28"
android:gravity="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/actv_app_version"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" />
@@ -26,14 +26,14 @@
android:id="@+id/actv_app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_70"
android:layout_marginBottom="@dimen/dp_41"
android:text="版本号:6.4.0"
android:textColor="@color/white"
android:textSize="@dimen/dp_36"
android:textSize="@dimen/dp_28"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/actv_connect_status" />
app:layout_constraintStart_toStartOf="parent"
/>
<com.mogo.och.biz.login.ui.errorview.ErrorInfoView
android:id="@+id/eiv_Info"

View File

@@ -12,13 +12,11 @@
android:id="@+id/actv_connect_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_70"
android:text="当前状态:连接司机屏中"
android:textColor="@color/white"
android:textSize="@dimen/dp_44"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/actv_app_version"
app:layout_constraintBottom_toTopOf="@+id/actv_app_version"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" />
@@ -26,14 +24,13 @@
android:id="@+id/actv_app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_70"
android:text="版本号:6.4.0"
android:textColor="@color/white"
android:textSize="@dimen/dp_44"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/actv_connect_status" />
app:layout_constraintStart_toStartOf="parent" />
<com.mogo.och.biz.login.ui.errorview.ErrorInfoView
android:id="@+id/eiv_Info"

View File

@@ -0,0 +1,61 @@
package com.mogo.och.common.module.wigets
import android.animation.ObjectAnimator
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.animation.LinearInterpolator
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.map.listener.IMogoMapListener
import com.mogo.map.listener.MogoMapListenerHandler
import com.mogo.och.common.module.R
import kotlinx.android.synthetic.main.common_loading_map.view.aciv_loading_map
class LoadingMapStatusView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr),IMogoMapListener {
companion object {
const val TAG = "LoadingMapStatusView"
}
private var autopilotLoadingAnimator: ObjectAnimator? = null
init {
LayoutInflater.from(context).inflate(R.layout.common_loading_map, this, true)
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerLogger.d(TAG,"onAttachedToWindow")
visibility = VISIBLE
MogoMapListenerHandler.mogoMapListenerHandler.registerHostMapListener(TAG,this)
if (autopilotLoadingAnimator == null) {
autopilotLoadingAnimator =
ObjectAnimator.ofFloat(aciv_loading_map, "rotation", 0f, 360f)
autopilotLoadingAnimator?.setInterpolator(LinearInterpolator())
autopilotLoadingAnimator?.setRepeatCount(-1) //无限循环
autopilotLoadingAnimator?.setDuration(1000) //设置持续时间
}
autopilotLoadingAnimator!!.start() //动画开始
setOnClickListener {
CallerLogger.d(TAG,"点击")
}
}
override fun onMapLoaded() {
visibility = GONE
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerLogger.d(TAG,"onDetachedFromWindow")
MogoMapListenerHandler.mogoMapListenerHandler.unregisterHostMapListener(TAG)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/common_loading_map_bg">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aciv_loading_map"
android:layout_gravity="center"
android:layout_width="@dimen/dp_136"
android:layout_height="@dimen/dp_125"
android:src="@drawable/common_loading_map" />
</FrameLayout>

View File

@@ -402,5 +402,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -57,4 +57,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -158,6 +158,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- 16 9 -->
<!-- 1000 562.5 -->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -407,4 +407,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -209,4 +209,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -394,4 +394,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -216,5 +216,10 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mogo.och.common.module.wigets.LoadingMapStatusView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/color_1A000000" />
</shape>

View File

@@ -14,6 +14,7 @@
<color name="color_B3FFFFFF">#B3FFFFFF</color>
<color name="color_E63B4577">#E63B4577</color>
<color name="color_1A000000">#1A000000</color>
<color name="color_FF2966EC">#FF2966EC</color>
<color name="color_1F9BFE">#1F9BFE</color>
<color name="color_256BFF">#256BFF</color>