Merge branch 'dev' of gitlab.ghzs.com:halo/assistant-android into dev

This commit is contained in:
kehaoyuan
2019-10-24 15:30:47 +08:00
25 changed files with 37 additions and 31 deletions

View File

@ -275,8 +275,8 @@ dependencies {
implementation "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.3.1"
implementation 'com.walkud.rom.checker:RomChecker:1.0.0'
debugImplementation "com.github.ChuckerTeam.Chucker:library:$chucker"
releaseImplementation "com.github.ChuckerTeam.Chucker:library-no-op:$chucker"
debugImplementation "com.github.nichbar.chucker:library:$chucker"
releaseImplementation "com.github.nichbar.chucker:library-no-op:$chucker"
implementation 'com.aliyun.dpa:oss-android-sdk:2.9.2'

View File

@ -49,7 +49,7 @@ class VideoAdapter(context: Context,
ImageUtils.display(holder.binding.videoCover, entity.poster)
holder.binding.videoLikeCount.text = entity.vote.toSimpleCount()
holder.itemView.setOnClickListener {
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_FAVORITE_VIDEO.value, false, "我的收藏-视频")
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_FAVORITE_VIDEO.value, false, path = "我的收藏-视频")
}
} else if (holder is FooterViewHolder) {
holder.initFooterViewHolder(mViewModel, mIsLoading, mIsNetworkError, mIsOver)

View File

@ -852,12 +852,13 @@ class GameDetailFragment : NormalFragment() {
private fun updateConcernMenuIcon(isConcerned: Boolean) {
if (isConcerned) {
if (TextUtils.isEmpty(mToolbar.title) && mViewModel.displayTopVideo) {
mConcernMenuItem?.setIcon(R.drawable.ic_game_detail_followed_light)
/*if (TextUtils.isEmpty(mToolbar.title) && mViewModel.displayTopVideo) {
// 有文字,显示黑色图标
mConcernMenuItem?.setIcon(R.drawable.ic_game_detail_followed_light)
} else {
mConcernMenuItem?.setIcon(R.drawable.ic_menu_gamedetail_collected)
}
}*/
} else {
if (TextUtils.isEmpty(mToolbar.title) && mViewModel.displayTopVideo) {
// 有文字,显示黑色图标

View File

@ -154,18 +154,6 @@ class TopVideoView @JvmOverloads constructor(context: Context, attrs: AttributeS
override fun onSeekComplete() {
super.onSeekComplete()
MtaHelper.onEvent("游戏详情_顶部视频", "${getMtaKeyPrefix()}-拖动进度条", combinedTitleAndId)
//播放完成后判断是否已缓冲完毕,没有完成显示播放错误状态
if (mBufferPoint != 0 && mBufferPoint != 100) {
Utils.toast(context, "网络错误,视频播放失败")
gsyVideoManager.releaseMediaPlayer()
changeUiToPreparingShow()
postDelayed({
if (!NetworkUtils.isAvailable(mContext)) {
changeUiToError()
}
}, 10 * 1000)
}
}
// 重载以减少横竖屏切换的时间
@ -210,6 +198,17 @@ class TopVideoView @JvmOverloads constructor(context: Context, attrs: AttributeS
MtaHelper.onEventWithTime("视频播放量_按位置", playedTime, "游戏详情-顶部视频", combinedTitleAndId)
MtaHelper.onEventWithTime("视频播放量_游戏加位置", playedTime, gameName, "游戏详情-顶部视频")
//播放完成后判断是否已缓冲完毕,没有完成显示播放错误状态
if (mBufferPoint != 0 && mBufferPoint != 100 && isShown) {
Utils.toast(context, "网络错误,视频播放失败")
gsyVideoManager.releaseMediaPlayer()
changeUiToPreparingShow()
postDelayed({
if (!NetworkUtils.isAvailable(mContext)) {
changeUiToError()
}
}, 10 * 1000)
}
super.onCompletion()
}
@ -219,7 +218,6 @@ class TopVideoView @JvmOverloads constructor(context: Context, attrs: AttributeS
}
override fun updateStartImage() {
//if (mIfCurrentIsFullscreen) {
if (mStartButton is ImageView) {
val imageView = mStartButton as ImageView
when (mCurrentState) {
@ -228,9 +226,6 @@ class TopVideoView @JvmOverloads constructor(context: Context, attrs: AttributeS
else -> imageView.setImageResource(R.drawable.ic_game_detail_play)
}
}
// } else {
// super.updateStartImage()
// }
}
override fun setStateAndUi(state: Int) {

View File

@ -49,7 +49,7 @@ class UserVideoHistoryAdapter(context: Context, val mViewModel: UserVideoHistory
ImageUtils.display(holder.binding.videoCover, entity.poster)
holder.binding.videoLikeCount.text = entity.vote.toSimpleCount()
holder.itemView.setOnClickListener {
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_VIDEO.value, false, "个人主页-视频")
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_VIDEO.value, false, path = "个人主页-视频")
}
} else if (holder is FooterViewHolder) {
holder.initFooterViewHolder(mViewModel, mIsLoading, mIsNetworkError, mIsOver)

View File

@ -1163,7 +1163,7 @@ class AnswerDetailFragment : NormalFragment() {
@JavascriptInterface
fun onVideoClick(content: String) {
val videoEntity = GsonUtils.fromJson(content, MyVideoEntity::class.java)
DirectUtils.directToVideoDetail(requireContext(), videoEntity.id, videoEntity.id, false, "回答详情-视频")
DirectUtils.directToVideoDetail(requireContext(), videoEntity.id, videoEntity.id, false, path = "回答详情-视频")
}
}

View File

@ -153,7 +153,7 @@ class VideoDetailContainerFragment : NormalFragment() {
mViewModel.noDataError.observeNonNull(this) {
if (it) {
showNoDataErrorView()
toast("内容可能被删除")
toast("内容可能被删除")
}
}

View File

@ -60,7 +60,7 @@ class VideoVerifyAdapter(context: Context,
}
holder.itemView.setOnClickListener {
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_UPLOADED_VIDEO.value, false, "视频投稿-已投稿")
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_UPLOADED_VIDEO.value, false, path = "视频投稿-已投稿")
}
} else if (holder is FooterViewHolder) {
holder.initFooterViewHolder(mViewModel, mIsLoading, mIsNetworkError, mIsOver)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 993 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 983 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

View File

@ -5,8 +5,8 @@
<ImageView
android:id="@+id/menu_download_iv"
android:layout_width="19dp"
android:layout_height="19dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/ic_menu_gamedetail_download" />

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
@ -21,8 +22,17 @@
</LinearLayout>
<com.gh.gamecenter.gamedetail.video.TopVideoView
android:id="@+id/player"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="202dp" />
android:layout_height="wrap_content">
<com.gh.gamecenter.gamedetail.video.TopVideoView
android:id="@+id/player"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="h,180:101"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View File

@ -80,7 +80,7 @@ ext {
gsyVideo = "7.1.1"
chucker = "3.0.1"
chucker = "3.0.1-fixed-SNAPSHOT"
dsBridge = "3.0-SNAPSHOT"