diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java
index 28dcfb3497..a030df56de 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java
@@ -26,6 +26,8 @@ import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.dialog.BaseFloatDialog;
import com.mogo.service.imageloader.MogoImageView;
import com.mogo.utils.BitmapHelper;
+import com.mogo.utils.glide.GlideApp;
+import com.mogo.utils.glide.GlideRoundedCornersTransform;
import com.shuyu.gsyvideoplayer.GSYVideoManager;
import com.mogo.utils.DateTimeUtils;
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
@@ -136,7 +138,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
try {
mRecyclerView = findViewById(R.id.traffic_info_recyclerView);
//网格布局
- StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL);
+ StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
mRecyclerView.setLayoutManager(staggeredGridLayoutManager);
NoticeTrafficInfoGridItemDivider gridLayoutDivider = new NoticeTrafficInfoGridItemDivider(1,
(mContext.getResources().getColor(R.color.notice_check_dialog_bg_color)));
@@ -211,7 +213,9 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
*/
private void complete(Bitmap firstbitmap) {
thumbnailImage.setVisibility(View.VISIBLE);
- thumbnailImage.setImageBitmap(firstbitmap);
+// thumbnailImage.setImageBitmap(firstbitmap);
+ GlideApp.with(mContext).load(firstbitmap).optionalTransform(new GlideRoundedCornersTransform
+ (20f, GlideRoundedCornersTransform.CornerType.ALL)).into(thumbnailImage);
playImageView.setImageResource(R.drawable.notice_video_play);
playImageView.setVisibility(View.VISIBLE);
playImageView.setOnClickListener(v -> {
@@ -400,9 +404,9 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
NoticeValue status = new NoticeValue();
status.setKey("处理状态:");
- if (info.getOperaStatus() == "0"){
+ if (info.getOperaStatus().equals("1")) {
status.setValue("待处理");
- }else {
+ } else {
status.setValue("已处理");
}
dataArrayList.add(status);
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_traffic_police.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_traffic_police.xml
index 85570384fa..d4143332c9 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_traffic_police.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/notice_dialog_traffic_police.xml
@@ -47,7 +47,6 @@
android:id="@+id/thumbnail_image"
android:layout_width="0dp"
android:layout_height="0dp"
- android:scaleType="fitXY"
android:src="@drawable/notice_traffic_placeholder"
app:layout_constraintBottom_toBottomOf="@id/video_player"
app:layout_constraintEnd_toEndOf="@id/video_player"
@@ -85,7 +84,7 @@
android:id="@+id/traffic_info_recyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
- android:layout_marginLeft="@dimen/dp_80"
+ android:layout_marginLeft="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_38"
android:layout_marginRight="@dimen/dp_70"
android:layout_marginBottom="@dimen/dp_40"
@@ -94,13 +93,14 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/video_player" />
-
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:riv_corner_radius="@dimen/dp_20" />
#1F9BFE
#5A8EFD
#E63B4577
- #CCD5D5D4
+ #33D5D5D4
#3B4577
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml
index fef115a7ad..ac46370092 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values-xhdpi-2560x1440/dimens.xml
@@ -27,6 +27,7 @@
70px
80px
80px
+ 100px
140px
150px
180px
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml
index c9ea608070..0f799ac211 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/dimens.xml
@@ -25,6 +25,7 @@
56px
62px
80px
+ 100px
140px
150px
180px
diff --git a/core/mogo-core-res/src/main/AndroidManifest.xml b/core/mogo-core-res/src/main/AndroidManifest.xml
index aff9fa88bd..fb92f3a40d 100644
--- a/core/mogo-core-res/src/main/AndroidManifest.xml
+++ b/core/mogo-core-res/src/main/AndroidManifest.xml
@@ -1,5 +1,6 @@
+ package="com.mogo.eagle.core.widget"
+ android:launchMode="singleTask">
\ No newline at end of file
diff --git a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/AnimationView.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/AnimationView.java
index 30acdb6d5c..de03f59e5d 100644
--- a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/AnimationView.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/AnimationView.java
@@ -58,6 +58,7 @@ public class AnimationView extends View implements Handler.Callback {
mHandler = new Handler(this);
mProcessThread = new ProcessAnimThread(getContext(), mHandler);
mAnimTime = DEFAULT_ANIM_TIME;
+
}
public void setIsRepeat(boolean repeat) {
diff --git a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleSmallVideoPlayer.kt b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleSmallVideoPlayer.kt
index d5ab21bef9..df749bcb7d 100644
--- a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleSmallVideoPlayer.kt
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/NoticeSimpleSmallVideoPlayer.kt
@@ -1,6 +1,7 @@
package com.mogo.eagle.core.widget.media.video
import android.content.Context
+import android.os.Build
import android.util.AttributeSet
import android.util.Log
import android.view.Surface
@@ -11,6 +12,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.TimeTransformUtils
import com.mogo.eagle.core.widget.R
import com.shuyu.gsyvideoplayer.GSYVideoManager
+import com.shuyu.gsyvideoplayer.render.GSYRenderView
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView
@@ -71,7 +73,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
}
override fun updateStartImage() {
- Log.d(TAG,"updateStartImage");
+ Log.d(TAG, "updateStartImage");
when (mCurrentState) {
GSYVideoView.CURRENT_STATE_PLAYING ->
start.setImageResource(R.drawable.notice_video_pause)
@@ -89,7 +91,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
forceChange: Boolean
) {
super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange)
- Log.d(TAG,"setProgressAndTime");
+ Log.d(TAG, "setProgressAndTime");
mBottomContainer?.visibility = View.VISIBLE
mProgressBar?.visibility = View.VISIBLE
start?.visibility = View.VISIBLE
@@ -113,7 +115,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
override fun hideAllWidget() {
super.hideAllWidget()
- Log.d(TAG,"hideAllWidget");
+ Log.d(TAG, "hideAllWidget");
mBottomContainer?.visibility = View.VISIBLE
mProgressBar?.visibility = View.VISIBLE
start?.visibility = View.VISIBLE
@@ -122,14 +124,14 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
override fun changeUiToPrepareingClear() {
super.changeUiToPrepareingClear()
- Log.d(TAG,"changeUiToPrepareingClear");
+ Log.d(TAG, "changeUiToPrepareingClear");
mBottomContainer?.visibility = View.INVISIBLE
mProgressBar?.visibility = View.GONE
}
override fun changeUiToPlayingBufferingClear() {
super.changeUiToPlayingBufferingClear()
- Log.d(TAG,"changeUiToPlayingBufferingClear");
+ Log.d(TAG, "changeUiToPlayingBufferingClear");
mBottomContainer?.visibility = View.INVISIBLE
mProgressBar?.visibility = View.GONE
@@ -141,7 +143,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
override fun changeUiToCompleteClear() {
super.changeUiToCompleteClear()
- Log.d(TAG,"changeUiToCompleteClear");
+ Log.d(TAG, "changeUiToCompleteClear");
mBottomContainer?.visibility = View.INVISIBLE
mProgressBar?.visibility = View.GONE
@@ -158,7 +160,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
- Log.d(TAG,"onDetachedFromWindow");
+ Log.d(TAG, "onDetachedFromWindow");
mProgressBar?.progress = 0
mFullPauseBitmap = null
@@ -226,5 +228,16 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
}
}
}
+
+ override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
+ super.onSizeChanged(w, h, oldw, oldh)
+ if (!mIfCurrentIsFullscreen) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ this.outlineProvider = TextureVideoViewOutlineProvider(40F)
+ this.clipToOutline = true
+ }
+ }
+ }
+
}
diff --git a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/TextureVideoViewOutlineProvider.java b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/TextureVideoViewOutlineProvider.java
index 73783ddf3e..d1cf33faac 100644
--- a/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/TextureVideoViewOutlineProvider.java
+++ b/core/mogo-core-res/src/main/java/com/mogo/eagle/core/widget/media/video/TextureVideoViewOutlineProvider.java
@@ -10,7 +10,7 @@ import androidx.annotation.RequiresApi;
/**
* @author Jing
- * @description 描述
+ * @description
* @since: 11/16/21
*/
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@@ -23,12 +23,8 @@ public class TextureVideoViewOutlineProvider extends ViewOutlineProvider {
@Override
public void getOutline(View view, Outline outline) {
- Rect rect = new Rect();
- view.getGlobalVisibleRect(rect);
- int leftMargin = 0;
- int topMargin = 0;
- Rect selfRect = new Rect(leftMargin, topMargin,
- rect.right - rect.left - leftMargin, rect.bottom - rect.top - topMargin);
+ Rect selfRect = new Rect(0, 0,
+ view.getMeasuredWidth(), view.getMeasuredHeight());
outline.setRoundRect(selfRect, mRadius);
}
}
diff --git a/core/mogo-core-res/src/main/res/layout/item_notice_video_small.xml b/core/mogo-core-res/src/main/res/layout/item_notice_video_small.xml
index f3988e86a2..8e91a812a1 100644
--- a/core/mogo-core-res/src/main/res/layout/item_notice_video_small.xml
+++ b/core/mogo-core-res/src/main/res/layout/item_notice_video_small.xml
@@ -40,6 +40,7 @@
android:layout_gravity="bottom"
android:layout_marginLeft="@dimen/notice_play_marginleft_small"
android:layout_marginRight="@dimen/notice_play_marginright_small"
+
android:layout_marginBottom="@dimen/notice_play_bottom"
android:src="@drawable/notice_video_pause" />