光环助手V5.0.0-新社区展示功能(0629 产品测试问题 15-17)https://git.ghzs.com/pm/halo-app-issues/-/issues/1253#note_106052
This commit is contained in:
@ -78,7 +78,7 @@ class ForumArticleAskListFragment : ListFragment<AnswerEntity, ForumArticleAskLi
|
||||
} else if (dy < -CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) {
|
||||
EventBus.getDefault().post(EBTypeChange(ForumDetailFragment.EB_SHOW_QUESTION_BUTTON, 0))
|
||||
}
|
||||
scroll()
|
||||
if (dy != 0) scroll()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -262,17 +262,18 @@ class ForumDetailFragment : BaseLazyTabFragment() {
|
||||
}
|
||||
|
||||
if (background.isEmpty()) {
|
||||
ImageUtils.getBitmap(game.getIcon(), object : BiCallback<Bitmap, Boolean> {
|
||||
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
override fun onFirst(first: Bitmap) {
|
||||
var blurBitmap = BitmapUtils.doBlur(first, 100)
|
||||
runOnUiThread {
|
||||
mBinding.forumDefaultBackground.setImageBitmap(blurBitmap)
|
||||
}
|
||||
}
|
||||
ImageUtils.getBitmap(if (type == "official_bbs") icon else game.getIcon(),
|
||||
object : BiCallback<Bitmap, Boolean> {
|
||||
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
override fun onFirst(first: Bitmap) {
|
||||
var blurBitmap = BitmapUtils.doBlur(first, 100)
|
||||
runOnUiThread {
|
||||
mBinding.forumDefaultBackground.setImageBitmap(blurBitmap)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSecond(second: Boolean) {}
|
||||
})
|
||||
override fun onSecond(second: Boolean) {}
|
||||
})
|
||||
} else {
|
||||
ImageUtils.display(mBinding.forumBackground, background)
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At
|
||||
var remainingTv: TextView = findViewById(R.id.remainingTv)
|
||||
var back: ImageView = findViewById(R.id.back)
|
||||
var pendingView: TextView = findViewById(R.id.pendingView)
|
||||
var titleTv: TextView = findViewById(R.id.title)
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.layout_article_item_video
|
||||
@ -66,6 +67,10 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At
|
||||
|
||||
fun startPlayLogic(isAutoPlay: Boolean) {
|
||||
mIsAutoPlay = isAutoPlay
|
||||
// if (mIsAutoPlay) {
|
||||
// val seekTime = ForumScrollCalculatorHelper.getPlaySchedule(MD5Utils.getContentMD5(mVideoEntity?.url))
|
||||
// seekOnStart = seekTime
|
||||
// }
|
||||
startPlayLogic()
|
||||
}
|
||||
|
||||
@ -182,11 +187,15 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At
|
||||
private fun showBackBtn() {
|
||||
mTopContainer.background = ContextCompat.getDrawable(context, R.drawable.video_title_bg)
|
||||
back.visibility = View.VISIBLE
|
||||
mVideoEntity?.run {
|
||||
titleTv.text = title
|
||||
}
|
||||
}
|
||||
|
||||
private fun hideBackBtn() {
|
||||
mTopContainer?.setBackgroundResource(0)
|
||||
back.visibility = View.GONE
|
||||
titleTv.text = ""
|
||||
}
|
||||
|
||||
fun updateThumb(url: String) {
|
||||
@ -199,6 +208,7 @@ class ArticleItemVideoView @JvmOverloads constructor(context: Context, attrs: At
|
||||
|
||||
fun updateVideoData(video: ForumVideoEntity) {
|
||||
mVideoEntity = video
|
||||
titleTv.text = if (mIfCurrentIsFullscreen) video.title else ""
|
||||
}
|
||||
|
||||
override fun setViewShowState(view: View?, visibility: Int) {
|
||||
|
||||
@ -56,7 +56,7 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B
|
||||
binding.content.visibility = View.VISIBLE
|
||||
}
|
||||
//若文章内有图片和视频,标题后增加‘有视频’标签 issues-1052
|
||||
if (entity.getPassVideos().isNotEmpty() && entity.images.isNotEmpty()) {
|
||||
if (entity.getPassVideos().isNotEmpty()) {
|
||||
val videoSpan = SpanBuilder(" ").image(1, " ".length, R.drawable.ic_article_video_label).build()
|
||||
binding.title.text = SpannableStringBuilder()
|
||||
.append(entity.questions.title)
|
||||
|
||||
@ -83,7 +83,7 @@ class ForumArticleListFragment : LazyListFragment<ArticleEntity, ForumArticleLis
|
||||
} else if (dy < -CommunityFragment.FOLLOW_HINT_TRIGGER_HEIGHT) {
|
||||
EventBus.getDefault().post(EBTypeChange(CommunityFragment.EB_SHOW_QUESTION_BUTTON, 0))
|
||||
}
|
||||
scroll()
|
||||
if (dy != 0) scroll()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ class UserHistoryFragment : ListFragment<PersonalHistoryEntity, UserHistoryViewM
|
||||
}
|
||||
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
scroll()
|
||||
if (dy != 0) scroll()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -69,6 +69,7 @@ data class ArticleEntity(
|
||||
val question = Questions(title = title)
|
||||
val answer = AnswerEntity()
|
||||
answer.id = id
|
||||
answer.articleTitle = title
|
||||
answer.questions = question
|
||||
answer.brief = brief
|
||||
answer.images = images
|
||||
|
||||
Reference in New Issue
Block a user