From e73f593dd038d7b63bbfa0c392bfe512aab7c2a6 Mon Sep 17 00:00:00 2001 From: liujing Date: Fri, 12 Nov 2021 15:46:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E8=AD=A6=E7=B1=BB=E5=9E=8B=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=99=A8UI=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/gradle.xml | 3 ++- .../layout/notice_dialog_traffic_police.xml | 4 ++-- .../test/TestNoticeBroadcastReceiver.kt | 10 ++++----- .../video/NoticeSimpleSmallVideoPlayer.kt | 19 +++++++++++++++--- .../res/drawable/notice_video_after_pause.png | Bin 0 -> 936 bytes .../res/layout/item_notice_video_small.xml | 14 +++++++------ .../src/main/res/values/dimens.xml | 5 +++++ 7 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 core/mogo-core-res/src/main/res/drawable/notice_video_after_pause.png diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 920b7ba5e1..62f8f6fabb 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,7 +4,7 @@ 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 d8f8438b0f..ef7ef08dfb 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 @@ -54,8 +54,8 @@ start.setImageResource(R.drawable.notice_video_pause) GSYVideoView.CURRENT_STATE_ERROR -> start.setImageResource(R.drawable.notice_video_pause) - else -> start.setImageResource(R.drawable.notice_video_play) + else -> start.setImageResource(R.drawable.notice_video_after_pause) } } @@ -87,6 +89,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { forceChange: Boolean ) { super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange) + Log.d(TAG,"setProgressAndTime"); mBottomContainer?.visibility = View.VISIBLE mProgressBar?.visibility = View.VISIBLE start?.visibility = View.VISIBLE @@ -110,6 +113,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { override fun hideAllWidget() { super.hideAllWidget() + Log.d(TAG,"hideAllWidget"); mBottomContainer?.visibility = View.VISIBLE mProgressBar?.visibility = View.VISIBLE start?.visibility = View.VISIBLE @@ -118,12 +122,14 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { override fun changeUiToPrepareingClear() { super.changeUiToPrepareingClear() + Log.d(TAG,"changeUiToPrepareingClear"); mBottomContainer?.visibility = View.INVISIBLE mProgressBar?.visibility = View.GONE } override fun changeUiToPlayingBufferingClear() { super.changeUiToPlayingBufferingClear() + Log.d(TAG,"changeUiToPlayingBufferingClear"); mBottomContainer?.visibility = View.INVISIBLE mProgressBar?.visibility = View.GONE @@ -135,6 +141,8 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { override fun changeUiToCompleteClear() { super.changeUiToCompleteClear() + Log.d(TAG,"changeUiToCompleteClear"); + mBottomContainer?.visibility = View.INVISIBLE mProgressBar?.visibility = View.GONE } @@ -150,6 +158,8 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { override fun onDetachedFromWindow() { super.onDetachedFromWindow() + Log.d(TAG,"onDetachedFromWindow"); + mProgressBar?.progress = 0 mFullPauseBitmap = null } @@ -159,17 +169,18 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { } override fun onCompletion() { - Logger.d("liyz", "onCompletion ------> ") + Logger.d(TAG, "onCompletion") mBottomContainer?.visibility = View.VISIBLE mProgressBar?.visibility = View.VISIBLE start?.visibility = View.VISIBLE - start.setImageResource(R.drawable.notice_video_play) + start.setImageResource(R.drawable.notice_video_after_pause) isPostBufferUpdate = false } override fun onSurfaceUpdated(surface: Surface) { super.onSurfaceUpdated(surface) + Logger.d(TAG, "onSurfaceUpdated") if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) { mThumbImageViewLayout.visibility = View.INVISIBLE } @@ -184,6 +195,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { override fun onBufferingUpdate(percent: Int) { super.onBufferingUpdate(percent) + Logger.d(TAG, "onBufferingUpdate") if (!isPostBufferUpdate && percent == 0) { isPostBufferUpdate = true playListener?.onPlayEvent(PLAY_EVT_PLAY_BEGIN) @@ -205,6 +217,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer { override fun onSurfaceAvailable(surface: Surface) { super.onSurfaceAvailable(surface) + Logger.d(TAG, "onSurfaceAvailable") mProgressBar?.visibility = View.GONE if (GSYVideoType.getRenderType() != GSYVideoType.TEXTURE) { if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) { diff --git a/core/mogo-core-res/src/main/res/drawable/notice_video_after_pause.png b/core/mogo-core-res/src/main/res/drawable/notice_video_after_pause.png new file mode 100644 index 0000000000000000000000000000000000000000..a8de64c2d2ecdb7f00afbb4320dea97fc4ebd29a GIT binary patch literal 936 zcmV;Z16TZsP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91G@t_j1ONa40RR91Gynhq0A0WB0{{R65=lfsRA>d&nmcP1K^TT}yj4~z zUO*v*prD0?f)?6np@lX!sZym#l`4Ngje>}ZH$pT*)DSNa3r%B@Mhh)cD2Sk-h$sjO ziue2Rd5eMJz|NfAo!yxoc$wMnn=|`9%sI2Oll1g>O1s@2L5n@znv(`*4$YuVO>jN0 zOOq?oe1dw6qr!fIkuL;DcLjuYF zIy4E?{unU2XW2!;<@+AVgDe;yT%AJaLeG%xZ#x%SFt*vjs@qip$@@}t2B=}QsA?FE zUp0_n=%aBNsI?|gRb3a5{0rs^P<_bz+bs%QCy+eqIW>&*HC(1Z=u$V3@xPUZ7K|Mx z5UTc0JvVjj|Be7HfuV?|KO9VZ7cB7Hy{hB=5aQ+opcx{nqFMStS)9 z`O};55Yk3>g#txNN}rT=k;h@_U=)F&2z(u1EFxT`ufxu(K##?TKk(+?qF7{-p4G{O#yljz!5<1W`US^6M$wgdmNb0#bt-$`1<;vG z73d~LPXY6_)3EP4HJ~>bJ_JbN?N%y4Z9s0Iv%q}!&4MeR0?;cA>Ok_L%V@W`m_Yw9 zIfX`n`Pr>uU%yyDFEFNAdF(ToH(xi3K(R}JR?0000< KMNUMnLSTYxEs&uA literal 0 HcmV?d00001 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 8f28636ac2..6d8eb39b8c 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 @@ -8,8 +8,7 @@ android:id="@+id/surface_container" android:layout_width="match_parent" android:layout_height="match_parent" - android:gravity="center"> - + android:gravity="center"> + android:layout_marginBottom="@dimen/notice_play_bottom_small" + android:src="@drawable/notice_video_pause" /> @@ -63,6 +63,7 @@ android:max="100" android:maxHeight="8px" android:minHeight="8px" + android:layout_marginBottom="@dimen/notice_seekbar_bottom_small" android:progressDrawable="@drawable/notice_seekbar_style" android:thumb="@drawable/notice_player_ic_circle_nor" /> @@ -72,8 +73,9 @@ android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="@dimen/notice_current_time_margin_small" - android:layout_marginBottom="5px" + android:layout_marginBottom="@dimen/notice_time_bottom_small" android:text="08:66" + android:gravity="center_vertical" android:textColor="@android:color/white" android:textSize="@dimen/time_textsize" /> diff --git a/core/mogo-core-res/src/main/res/values/dimens.xml b/core/mogo-core-res/src/main/res/values/dimens.xml index da9a00d2e9..4eae569208 100644 --- a/core/mogo-core-res/src/main/res/values/dimens.xml +++ b/core/mogo-core-res/src/main/res/values/dimens.xml @@ -1,5 +1,7 @@ + + 20px 300px 300px 60px @@ -60,5 +62,8 @@ 26px 15px 600px + 30px + 18px + 28px \ No newline at end of file