opt ui
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.hmi.ui.notice
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
@@ -77,7 +78,7 @@ class NoticeFloatView constructor(
|
||||
|
||||
if (bean.fileType == 2) {
|
||||
playIcon.visibility = View.VISIBLE
|
||||
} else {
|
||||
} else {
|
||||
playIcon.visibility = View.GONE
|
||||
}
|
||||
|
||||
@@ -181,9 +182,11 @@ class NoticeFloatView constructor(
|
||||
|
||||
init {
|
||||
delayClosePush = Runnable {
|
||||
hide()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun pushBeanChanged(bean: NoticeNormalData?) {
|
||||
uiHandler.post {
|
||||
uiHandler.removeCallbacks(delayClosePush)
|
||||
@@ -221,6 +224,7 @@ class NoticeFloatView constructor(
|
||||
} else {
|
||||
if (getApis(context).statusManagerApi.isMainPageOnResume) {
|
||||
showByTopView(bean)
|
||||
startClosePush()
|
||||
} else {
|
||||
showByWindowManager(bean)
|
||||
}
|
||||
@@ -245,7 +249,7 @@ class NoticeFloatView constructor(
|
||||
uiHandler.removeCallbacks(delayClosePush)
|
||||
uiHandler.postDelayed(
|
||||
delayClosePush,
|
||||
1000L
|
||||
10000L
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.mogo.eagle.core.function.api.notice.NoticeNetCallBack;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
|
||||
import com.mogo.eagle.core.function.call.notice.CallerNoticeManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.widget.media.video.NoticeSimpleSmallVideoPlayer;
|
||||
import com.mogo.eagle.core.widget.media.video.NoticeSimpleVideoPlayer;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog;
|
||||
@@ -67,8 +68,10 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
|
||||
public void initView() {
|
||||
setContentView(R.layout.notice_dialog_traffic_police);
|
||||
setCanceledOnTouchOutside(true);
|
||||
playerShow();//视频播放器
|
||||
recyclerVie();//下方详情信息列表
|
||||
|
||||
accept = findViewById(R.id.accept_traffic);
|
||||
refuse = findViewById(R.id.refuse_traffic);
|
||||
accept.setOnClickListener(v -> {
|
||||
@@ -100,6 +103,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
}
|
||||
adapter = new NoticeTrafficAdapter(mContext, dataArrayList);
|
||||
mRecyclerView.setAdapter(adapter);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -205,7 +209,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
private void playerShow() {
|
||||
mVideoPlayer = findViewById(R.id.video_player);
|
||||
thumbnailImage = findViewById(R.id.thumbnail_image);
|
||||
playImageView = this.findViewById(R.id.start);
|
||||
playImageView = this.findViewById(R.id.start_play);
|
||||
playImageView.setOnClickListener(v -> {
|
||||
startLive();
|
||||
});
|
||||
@@ -415,5 +419,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
@Override
|
||||
public void dismiss() {
|
||||
super.dismiss();
|
||||
Log.d("liyz", "trafficdialog dismiss");
|
||||
releasePlayer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
android:layout_marginLeft="@dimen/dp_200"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginRight="@dimen/dp_200"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_push_dialog_bottom_title"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/notice_traffic_dialog_title" />
|
||||
@@ -56,7 +55,7 @@
|
||||
app:layout_constraintTop_toTopOf="@id/video_player" />
|
||||
<!--播放按钮-->
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
android:id="@+id/start_play"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_centerInParent="true"
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.eagle.core.utilcode.util.TimeTransformUtils
|
||||
import com.mogo.eagle.core.widget.R
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
|
||||
Reference in New Issue
Block a user