Merge branch 'UI' into dev_MogoAP_eagle-1030_211020_8.0.14

This commit is contained in:
liujing
2021-11-12 15:46:35 +08:00
7 changed files with 38 additions and 17 deletions

3
.idea/gradle.xml generated
View File

@@ -4,7 +4,7 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
@@ -83,6 +83,7 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -54,8 +54,8 @@
<!--播放按钮-->
<ImageView
android:id="@+id/start_for_traffic"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:layout_centerInParent="true"
android:src="@drawable/notice_video_play"
android:visibility="invisible"

View File

@@ -33,14 +33,14 @@ class TestNoticeBroadcastReceiver : BroadcastReceiver() {
Log.d(TAG, "dispatchSceneTest::" + sceneType.toString());
if (sceneType == 301001) {
val pushData = NoticeTrafficStylePushData()
pushData.msg = "交警测试公告"
pushData.content = "交警测试公告内容"
pushData.msg = "交警任务公告"
pushData.title = "北京市顺义区北小营镇北小营市场发生交通事故,请警务人员前往处理"
//图片
val image: String = "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F201609%2F26%2F20160926081306_GM2tv.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638511084&t=92def7498b526dcba3fceda17c43fcb8"
//视频
val video: String = "https://vd2.bdstatic.com/mda-mk1347dzxdmcre0y/sc/cae_h264/1635819498112313003/mda-mk1347dzxdmcre0y.mp4?v_from_s=hkapp-haokan-tucheng&auth_key=1635837585-0-0-5295f6658c7711ba7b4d3ef478a7fbaa&bcevod_channel=searchbox_feed&pd=1&pt=3&abtest="
pushData.poiImgUrl = image
pushData.type = 0
val video: String = "https://view.2amok.com/20200219/012d8e2a55f227e90d76056bb6aab5e4.mp4"
pushData.poiImgUrl = video
pushData.type = 1
pushData.infoId = "905543067497902080"
CallerHmiManager.showTrafficBanner(pushData)
}

View File

@@ -36,6 +36,7 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
private lateinit var fullscreen: ImageView
private lateinit var currentTimeTextView: TextView
private lateinit var totalTimeTextView: TextView
private var TAG: String = "NoticeSimpleSmallVideoPlayer"
interface PlayListener {
fun onPlayEvent(event: Int)
@@ -70,12 +71,13 @@ class NoticeSimpleSmallVideoPlayer : StandardGSYVideoPlayer {
}
override fun updateStartImage() {
Log.d(TAG,"updateStartImage");
when (mCurrentState) {
GSYVideoView.CURRENT_STATE_PLAYING ->
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) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

View File

@@ -8,8 +8,7 @@
android:id="@+id/surface_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
</RelativeLayout>
android:gravity="center"></RelativeLayout>
<RelativeLayout
android:id="@+id/thumb"
@@ -38,10 +37,11 @@
android:id="@+id/start"
android:layout_width="@dimen/notice_play_height_small"
android:layout_height="@dimen/notice_play_height_small"
android:layout_gravity="bottom"
android:layout_marginLeft="@dimen/notice_play_marginleft_small"
android:layout_marginRight="@dimen/notice_play_marginright_small"
android:src="@drawable/notice_video_pause"
android:layout_gravity="bottom" />
android:layout_marginBottom="@dimen/notice_play_bottom_small"
android:src="@drawable/notice_video_pause" />
<TextView
android:id="@+id/current"
@@ -49,9 +49,9 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginRight="@dimen/notice_current_time_margin_small"
android:layout_marginBottom="5px"
android:gravity="center_vertical"
android:text="02:23"
android:layout_marginBottom="@dimen/notice_time_bottom_small"
android:textColor="@android:color/white"
android:textSize="@dimen/time_textsize" />
@@ -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" />

View File

@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="dp_20">20px</dimen>
<dimen name="module_ext_speed_width">300px</dimen>
<dimen name="module_ext_speed_height">300px</dimen>
<dimen name="module_ext_speed_padding">60px</dimen>
@@ -60,5 +62,8 @@
<dimen name="notice_play_marginright_small">26px</dimen>
<dimen name="notice_current_time_margin_small">15px</dimen>
<dimen name="notice_seekbar_width_small">600px</dimen>
<dimen name="notice_seekbar_bottom_small">30px</dimen>
<dimen name="notice_time_bottom_small">18px</dimen>
<dimen name="notice_play_bottom_small">28px</dimen>
</resources>