Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev
This commit is contained in:
@ -669,13 +669,17 @@ class GameDetailFragment : NormalFragment() {
|
||||
gameBigEvent.background = ContextCompat.getDrawable(requireContext(), R.drawable.bg_game_big_event_light)
|
||||
gameBigEvent.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(requireContext(), R.drawable.ic_game_detail_big_event), null,
|
||||
ContextCompat.getDrawable(requireContext(), R.drawable.ic_game_detail_big_event_arrow), null)
|
||||
gameBigEvent.text = "${TimeUtils.getFormatTime(it.time, "MM-dd")}今天:${it.content}"
|
||||
var eventStr = "${TimeUtils.getFormatTime(it.time, "MM-dd")}今天:${it.content}"
|
||||
if (eventStr.contains("\n")) eventStr = eventStr.substring(0, eventStr.indexOf("\n"))
|
||||
gameBigEvent.text = eventStr
|
||||
} else {
|
||||
gameBigEvent.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_999999))
|
||||
gameBigEvent.background = ContextCompat.getDrawable(requireContext(), R.drawable.bg_game_big_event)
|
||||
gameBigEvent.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(requireContext(), R.drawable.ic_game_detail_big_event_gray), null,
|
||||
ContextCompat.getDrawable(requireContext(), R.drawable.ic_game_detail_big_event_arrow_gray), null)
|
||||
gameBigEvent.text = "${TimeUtils.getFormatTime(it.time, "MM-dd")}:${it.content}"
|
||||
var eventStr = "${TimeUtils.getFormatTime(it.time, "MM-dd")}:${it.content}"
|
||||
if (eventStr.contains("\n")) eventStr = eventStr.substring(0, eventStr.indexOf("\n"))
|
||||
gameBigEvent.text = eventStr
|
||||
}
|
||||
gameBigEvent.setOnClickListener {
|
||||
MtaHelper.onEvent("游戏详情_新", "游戏大事件", mViewModel.game?.name ?: "")
|
||||
|
||||
@ -62,19 +62,19 @@ class DescAdapter(context: Context,
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
val descItemData = descItemList[position]
|
||||
return when (descItemData.type) {
|
||||
"gallery" -> IMAGE_GALLERY
|
||||
"video" -> VIDEOS
|
||||
"comment" -> COMMENTS
|
||||
"info" -> GAME_DETAIL
|
||||
"update" -> UPDATE_CONTENT
|
||||
"server" -> LATEST_SERVICE
|
||||
"related_version" -> RELATED_VERSION
|
||||
"image_recommend" -> IMAGE
|
||||
"libao" -> LIBAO
|
||||
"article" -> INFO_RAIDERS
|
||||
"related_game" -> RECOMMENDED_GAMES
|
||||
"custom_column" -> CUSTOM_COLUMN
|
||||
"notice" -> NOTICE
|
||||
DetailEntity.Type.IMAGE_GALLERY.value -> IMAGE_GALLERY
|
||||
DetailEntity.Type.VIDEOS.value -> VIDEOS
|
||||
DetailEntity.Type.COMMENTS.value -> COMMENTS
|
||||
DetailEntity.Type.GAME_INFO.value -> GAME_DETAIL
|
||||
DetailEntity.Type.UPDATE_CONTENT.value -> UPDATE_CONTENT
|
||||
DetailEntity.Type.LATEST_SERVER.value -> LATEST_SERVICE
|
||||
DetailEntity.Type.RELATED_VERSION.value -> RELATED_VERSION
|
||||
DetailEntity.Type.IMAGE.value -> IMAGE
|
||||
DetailEntity.Type.LIBAO.value -> LIBAO
|
||||
DetailEntity.Type.INFO_GUIDE.value -> INFO_RAIDERS
|
||||
DetailEntity.Type.RECOMMENDED_GAMES.value -> RECOMMENDED_GAMES
|
||||
DetailEntity.Type.CUSTOM_COLUMN.value -> CUSTOM_COLUMN
|
||||
DetailEntity.Type.NOTICE.value -> NOTICE
|
||||
DetailEntity.Type.INFERIOR_CUSTOM_COLUMN.value -> INFERIOR_CUSTOM_COLUMN
|
||||
else -> FOOTER
|
||||
}
|
||||
@ -233,7 +233,8 @@ class DescAdapter(context: Context,
|
||||
detailEntity.shouldBoundTogetherWithPreviousItem,
|
||||
detailEntity.shouldBoundTogetherWithNextItem)
|
||||
|
||||
viewHolder.binding.contentTv.setTextWithHighlightedTextWrappedInsideWrapper(customColumn.des ?: "", copyClickedText = true)
|
||||
viewHolder.binding.contentTv.setTextWithHighlightedTextWrappedInsideWrapper(customColumn.des
|
||||
?: "", copyClickedText = true)
|
||||
|
||||
viewHolder.binding.recyclerview.isNestedScrollingEnabled = false
|
||||
viewHolder.binding.recyclerview.layoutManager = if (customColumn.showInfoTagDes == true) {
|
||||
@ -289,7 +290,8 @@ class DescAdapter(context: Context,
|
||||
viewHolder.binding.contentTv.setExpandMaxLines(maxDesLines)
|
||||
viewHolder.binding.contentTv.setIsExpanded(Int.MAX_VALUE == maxDesLines)
|
||||
viewHolder.binding.customColumn = customColumn
|
||||
viewHolder.binding.contentTv.setTextWithHighlightedTextWrappedInsideWrapper(customColumn.des ?: "", copyClickedText = true)
|
||||
viewHolder.binding.contentTv.setTextWithHighlightedTextWrappedInsideWrapper(customColumn.des
|
||||
?: "", copyClickedText = true)
|
||||
viewHolder.binding.recyclerview.isNestedScrollingEnabled = false
|
||||
viewHolder.binding.recyclerview.layoutManager = if (customColumn.showInfoTagDes == true) {
|
||||
LinearLayoutManager(mContext)
|
||||
@ -480,7 +482,7 @@ class DescAdapter(context: Context,
|
||||
?: GameEntity(), mEntrance, "更新内容")
|
||||
mContext.startActivity(intent)
|
||||
}
|
||||
holder.binding.historyVersionTv.goneIf(updateContent?.historyApkStatus != "on")
|
||||
holder.binding.historyVersionTv.goneIf(updateContent?.historyApkCount == 0)
|
||||
holder.binding.contentTv.setExpandCallback {
|
||||
MtaHelper.onEvent("游戏详情_新", "展开更新内容", gameName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user