[M2] 布局问题处理
This commit is contained in:
@@ -63,6 +63,8 @@ class PM2DrivingModel private constructor() {
|
||||
private var mDrivingInfoCallback: DrivingInfoCallback? = null //行程信息
|
||||
private var mAutoStatusCallback: AutoPilotStatusCallback? = null //自动驾驶状态
|
||||
|
||||
private var operationStatus: PM2OperationStatusResponse.Result? = null
|
||||
|
||||
private val handler = Handler(Handler.Callback { msg ->
|
||||
if (msg.what == MSG_QUERY_BUS_P_STATION) {
|
||||
queryDriverOperationStatus()
|
||||
@@ -215,8 +217,13 @@ class PM2DrivingModel private constructor() {
|
||||
object : OchCommonServiceCallback<PM2OperationStatusResponse> {
|
||||
override fun onSuccess(data: PM2OperationStatusResponse?) {
|
||||
if (data?.data == null) return
|
||||
mDrivingInfoCallback?.changeOperationStatus(data.data.driverStatus == 1)
|
||||
mDrivingInfoCallback?.updatePlateNumber(data.data.plateNumber)
|
||||
if (data.data.driverStatus != operationStatus?.driverStatus
|
||||
|| data.data.plateNumber != operationStatus?.plateNumber){
|
||||
d(TAG, "queryDriverOperationStatus ===== 车牌或者登陆状态有变更")
|
||||
mDrivingInfoCallback?.changeOperationStatus(data.data.driverStatus == 1)
|
||||
}
|
||||
operationStatus = data.data as PM2OperationStatusResponse.Result
|
||||
// mDrivingInfoCallback?.updatePlateNumber(data.data.plateNumber)
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
@@ -244,7 +251,9 @@ class PM2DrivingModel private constructor() {
|
||||
if (data?.result === routesResult) {
|
||||
return
|
||||
}
|
||||
|
||||
if (data?.result?.sites === null) {
|
||||
d(TAG, "queryDriverSiteByCoordinate ===== 没有路线")
|
||||
routesResult = null
|
||||
mNextStationIndex = 0
|
||||
isGoingToNextStation = false
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.widget.ImageView
|
||||
import android.widget.RelativeLayout
|
||||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.RequestOptions
|
||||
import com.mogo.eagle.core.utilcode.util.BitmapHelper
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
@@ -62,20 +63,23 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
fun setVideoPath(path: String) {
|
||||
this.path = path
|
||||
// BitmapHelper.getVideoThumbnail(path) /*获取第一帧图*/
|
||||
// cacheImage?.let {
|
||||
cacheImage?.let {
|
||||
Glide.with(context).load(BitmapHelper.getVideoThumbnail(path))
|
||||
.apply(RequestOptions().placeholder(R.drawable.m2_p_video_holder).centerCrop())
|
||||
.into(it)
|
||||
// it.setImageBitmap(BitmapHelper.getVideoThumbnail(path))
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
fun setCacheImageView(imgPath: String) {
|
||||
|
||||
cacheImage?.let {
|
||||
Glide.with(context)
|
||||
.load(imgPath)
|
||||
.apply(RequestOptions().placeholder(R.drawable.m2_p_video_holder).centerCrop())
|
||||
.into(it)
|
||||
}
|
||||
// cacheImage?.let {
|
||||
// Glide.with(context)
|
||||
// .load(imgPath)
|
||||
// .apply(RequestOptions().placeholder(R.drawable.m2_p_video_holder).centerCrop())
|
||||
// .into(it)
|
||||
// }
|
||||
|
||||
cacheImage?.visibility = VISIBLE
|
||||
}
|
||||
@@ -98,7 +102,7 @@ class AdvanceVideoView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
fun setCacheImageViewGone() {
|
||||
cacheImage?.visibility = GONE
|
||||
cacheImage?.visibility = INVISIBLE
|
||||
}
|
||||
|
||||
fun setPause() {
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
app:mapStyleExtraPath="@string/m2_over_map_style_extra_path"
|
||||
app:mapStylePath="@string/m2_over_map_style_path"
|
||||
app:isClearArrived="true"
|
||||
app:resetDrawableMarginRight="@dimen/dp_34"
|
||||
app:resetDrawableMarginBottom="@dimen/dp_54"
|
||||
app:carDrawable = "@drawable/m2_map_car_icon"
|
||||
app:startPointDrawable="@drawable/m2_map_start_icon"
|
||||
app:endPointDrawable="@drawable/m2_map_end_icon"/>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
android:id="@+id/driving_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.29"
|
||||
app:layout_constraintHeight_percent="0.289"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/hd_map_fragment"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
@@ -19,7 +19,7 @@
|
||||
android:id="@+id/hd_map_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.416"
|
||||
app:layout_constraintHeight_percent="0.417"
|
||||
app:layout_constraintTop_toBottomOf="@+id/driving_fragment"
|
||||
app:layout_constraintBottom_toTopOf="@+id/video_fragment"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
@@ -31,7 +31,7 @@
|
||||
android:id="@+id/video_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.294"
|
||||
app:layout_constraintHeight_percent="0.294"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hd_map_fragment"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
Reference in New Issue
Block a user