完全移除 DataBinding https://git.shanqu.cc/halo/android/assistant-android/-/issues/59
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.gh.download.dialog
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@ -87,8 +88,8 @@ class DownloadDialogAdapter(
|
||||
holder.binding.otherVersionHint.goneIf(section != DownloadDialogSectionType.OTHER)
|
||||
}
|
||||
is DownloadDialogLinkItemViewHolder -> {
|
||||
holder.binding.links = listData[position].links
|
||||
holder.binding.clickListener = OnViewClickListener<GameEntity.PluginLink> { _, data ->
|
||||
val links = listData[position].links
|
||||
val clickListener = OnViewClickListener<GameEntity.PluginLink> { _, data ->
|
||||
when (data.linkType) {
|
||||
"dialog" -> {
|
||||
DownloadLinkDialog.showDownloadDialog(mContext, data)
|
||||
@ -110,6 +111,28 @@ class DownloadDialogAdapter(
|
||||
|
||||
// MtaHelper.onEvent(DownloadDialog.MTA_KEY, "点击", viewModel.gameEntity.name + "_" + data.title)
|
||||
}
|
||||
holder.binding.run {
|
||||
links?.let {
|
||||
leftLink.setOnClickListener { view ->
|
||||
clickListener.onClick(view, links[0])
|
||||
}
|
||||
rightLink.setOnClickListener { view ->
|
||||
clickListener.onClick(view, links[1])
|
||||
}
|
||||
}
|
||||
leftLink.visibleIf(!links.isNullOrEmpty())
|
||||
rightLink.visibleIf(links?.size ?:0 > 1)
|
||||
leftLink.text = if (links.isNullOrEmpty()) "" else links[0].title
|
||||
rightLink.text = if (links?.size ?: 0 > 1) links?.get(1)?.title else ""
|
||||
leftLink.background = GradientDrawable().apply {
|
||||
cornerRadius = 8F.dip2px().toFloat()
|
||||
setStroke(0.5F.dip2px(), R.color.divider.toColor())
|
||||
}
|
||||
rightLink.background = GradientDrawable().apply {
|
||||
cornerRadius = 8F.dip2px().toFloat()
|
||||
setStroke(0.5F.dip2px(), R.color.divider.toColor())
|
||||
}
|
||||
}
|
||||
}
|
||||
is DownloadDialogInstructionItemViewHolder -> {
|
||||
holder.bindItem(listData, position, mEntrance)
|
||||
|
||||
@ -2,8 +2,10 @@ package com.gh.gamecenter.adapter.viewholder
|
||||
|
||||
import com.facebook.drawee.generic.RoundingParams
|
||||
import com.gh.base.BaseRecyclerViewHolder
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.util.DisplayUtils
|
||||
import com.gh.common.util.ImageUtils
|
||||
import com.gh.common.util.goneIf
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.databinding.GameImageItemBinding
|
||||
import com.gh.gamecenter.entity.GameEntity
|
||||
@ -12,7 +14,13 @@ class GameImageViewHolder(var binding: GameImageItemBinding) : BaseRecyclerViewH
|
||||
|
||||
// 注意:专题详情的大图不能用此方法
|
||||
fun bindImage(entity: GameEntity, applyRoundCorner: Boolean = false) {
|
||||
binding.game = entity
|
||||
binding.run {
|
||||
gameContainer.goneIf(!(entity.type == "game" && entity.getApk().isNotEmpty()))
|
||||
gameIcon.displayGameIcon(entity)
|
||||
gameName.text = entity.name
|
||||
gameSize.text = if (entity.getApk().isNotEmpty()) entity.getApk()[0].size.toString() else ""
|
||||
BindingAdapters.setDownloadButton(progressBar, entity, null, null, null, "")
|
||||
}
|
||||
val context = binding.root.context
|
||||
val width = context.resources.displayMetrics.widthPixels - DisplayUtils.dip2px(context, 16F)
|
||||
|
||||
|
||||
@ -82,9 +82,8 @@ class NewCatalogListAdapter(context: Context,
|
||||
|
||||
val gameEntity = mEntityList[position]
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
val sortType = mViewModel.sortType.value
|
||||
val sortSize = mViewModel.sortSize.text
|
||||
|
||||
@ -6,6 +6,8 @@ import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.util.DisplayUtils
|
||||
import com.gh.common.util.ImageUtils
|
||||
import com.gh.common.util.IntentUtils
|
||||
import com.gh.common.util.toBinding
|
||||
import com.gh.common.view.SubCategoryView
|
||||
import com.gh.gamecenter.R
|
||||
@ -34,8 +36,14 @@ class CategoryDirectoryAdapter(context: Context, var categoryTitle: String)
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
when (holder) {
|
||||
is CategoryViewHolder -> {
|
||||
holder.binding.category = mEntityList[position]
|
||||
holder.binding.title = categoryTitle
|
||||
val category = mEntityList[position]
|
||||
holder.binding.run {
|
||||
containerPrimaryCategory.setOnClickListener {
|
||||
IntentUtils.startCategoryListActivity(root.context, categoryTitle, category)
|
||||
}
|
||||
ImageUtils.display(iconIv, category.icon)
|
||||
categoryName.text = category.name
|
||||
}
|
||||
holder.bindCategory(
|
||||
category = mEntityList[position],
|
||||
expandableStatusMap = expandStatusMap,
|
||||
|
||||
@ -81,9 +81,8 @@ class NewCategoryListAdapter(context: Context,
|
||||
if (holder is GameItemViewHolder) {
|
||||
val gameEntity = mEntityList[position]
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
val padTop = if (position == 0) 16F.dip2px() else 8F.dip2px()
|
||||
holder.itemView.setPadding(16F.dip2px(), padTop, 16F.dip2px(), 8F.dip2px())
|
||||
|
||||
@ -7,6 +7,7 @@ import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.base.BaseRecyclerViewHolder
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.ExposureType
|
||||
@ -22,7 +23,6 @@ import com.gh.gamecenter.databinding.CategoryGameItemBinding
|
||||
import com.gh.gamecenter.entity.GameEntity
|
||||
import com.gh.gamecenter.eventbus.EBDownloadStatus
|
||||
import com.lightgame.download.DownloadEntity
|
||||
import java.util.*
|
||||
|
||||
class CategoryV2ListAdapter(context: Context,
|
||||
private val mViewModel: CategoryV2ListViewModel,
|
||||
@ -83,9 +83,8 @@ class CategoryV2ListAdapter(context: Context,
|
||||
holder.itemView.setPadding(16F.dip2px(), 8F.dip2px(), 16F.dip2px(), 8F.dip2px())
|
||||
val gameEntity = mEntityList[position]
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
val categoryTitle = mCategoryViewModel.categoryTitle
|
||||
val selectedCategoryName = mCategoryViewModel.selectedCategoryName
|
||||
@ -174,6 +173,22 @@ class CategoryV2ListAdapter(context: Context,
|
||||
|
||||
inner class CategoryGameItemViewHolder(val binding: CategoryGameItemBinding): BaseRecyclerViewHolder<Any>(binding.root) {
|
||||
|
||||
fun bindGameItem(gameEntity: GameEntity) {
|
||||
binding.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setPadding(0,0,if (gameEntity.commentCount > 3) 8F.dip2px() else 0,0)
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
}
|
||||
}
|
||||
|
||||
fun initServerType(gameEntity: GameEntity) {
|
||||
val serverLabel = gameEntity.serverLabel
|
||||
when {
|
||||
|
||||
@ -48,11 +48,9 @@ class NewInstalledGameFragmentAdapter(context: Context, private var mViewModel:
|
||||
|
||||
private fun initGameNormal(holder: GameItemViewHolder, gameEntity: GameEntity) {
|
||||
gameEntity.collection = ArrayList() // 清空集合,防止下载按钮会因为存在集合而清空合集包的状态判断
|
||||
holder.bindGameItem(gameEntity, isShowPlatform = true)
|
||||
holder.initServerType(gameEntity)
|
||||
val binding = holder.binding
|
||||
binding.game = gameEntity
|
||||
binding.isShowPlatform = true
|
||||
binding.executePendingBindings()
|
||||
val name: String?
|
||||
if (gameEntity.getApk().size > 0) {
|
||||
name = String.format(
|
||||
|
||||
@ -2,6 +2,8 @@ package com.gh.gamecenter.forum.home
|
||||
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@ -41,8 +43,31 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B
|
||||
}
|
||||
|
||||
private fun bindItem(entity: AnswerEntity, entrance: String, path: String) {
|
||||
binding.entity = entity
|
||||
binding.executePendingBindings()
|
||||
binding.run {
|
||||
questionTitle.goneIf(entity.type != "answer")
|
||||
questionTitle.text = entity.questions.title
|
||||
userName.text = entity.user.name
|
||||
userBadgeName.text = entity.user.badge?.name
|
||||
ImageUtils.display(userBadgeIcon, entity.user.badge?.icon)
|
||||
ImageUtils.display(popularAnswerUserIcon, entity.popularAnswer?.user?.icon)
|
||||
userBadgeIcon.goneIf(entity.user.badge == null)
|
||||
concernBtn.goneIf(entity.me.isFollower || entity.user.id == UserManager.getInstance().userId)
|
||||
followedUserTv.goneIf(!entity.me.isFollower)
|
||||
time.text = (if (entity.me.isFollower) " · " else "") + NewsUtils.getFormattedTime(entity.time!!) + (if (entity.status == "pending" || entity.status == "fail") " · " else "")
|
||||
statusTv.setText(if (entity.status == "pending") R.string.content_pending_status else R.string.fail_status)
|
||||
statusTv.setTextColor(if (entity.status == "pending") R.color.theme_green.toColor() else R.color.theme_red.toColor())
|
||||
statusTv.goneIf(!(entity.status == "pending" || entity.status == "fail"))
|
||||
title.goneIf(entity.type == "answer")
|
||||
title.text = if (entity.type.contains("video")) entity.articleTitle else entity.questions.title
|
||||
content.text = if (entity.type.contains("video")) entity.des else entity.brief
|
||||
popularAnswerContainer.background = GradientDrawable().apply {
|
||||
setColor(Color.parseColor("#F5F6F7"))
|
||||
cornerRadius = 4F.dip2px().toFloat()
|
||||
}
|
||||
popularAnswerUserName.text = entity.popularAnswer?.user?.name
|
||||
popularAnswerContent.text = entity.popularAnswer?.brief
|
||||
forumNameTv.text = entity.bbs.name
|
||||
}
|
||||
|
||||
binding.userIcon.display(entity.user.border, entity.user.icon, entity.user.auth?.icon)
|
||||
binding.forumNameTv.text = entity.bbs.name
|
||||
@ -160,7 +185,6 @@ class ForumArticleAskItemViewHolder(val binding: CommunityAnswerItemBinding) : B
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
|
||||
private fun bindVideoData(entity: ForumVideoEntity) {
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.gh.gamecenter.forum.search
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.Spanned
|
||||
import android.view.View
|
||||
@ -21,6 +23,7 @@ import com.gh.gamecenter.databinding.CommunityAnswerItemBinding
|
||||
import com.gh.gamecenter.databinding.ForumSearchContentListBinding
|
||||
import com.gh.gamecenter.entity.CommunityEntity
|
||||
import com.gh.gamecenter.forum.home.ForumArticleAskItemViewHolder
|
||||
import com.gh.gamecenter.manager.UserManager
|
||||
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
|
||||
import com.gh.gamecenter.qa.entity.AnswerEntity
|
||||
import com.gh.gamecenter.qa.entity.Questions
|
||||
@ -144,8 +147,31 @@ class ForumContentSearchListAdapter(context: Context, val mListViewModel: ForumC
|
||||
normalContainer.visibility = View.GONE
|
||||
includedAnswerItem.root.visibility = View.VISIBLE
|
||||
|
||||
includedAnswerItem.entity = answer
|
||||
includedAnswerItem.executePendingBindings()
|
||||
includedAnswerItem.run {
|
||||
questionTitle.goneIf(answer.type != "answer")
|
||||
questionTitle.text = answer.questions.title
|
||||
userName.text = answer.user.name
|
||||
userBadgeName.text = answer.user.badge?.name
|
||||
ImageUtils.display(userBadgeIcon, answer.user.badge?.icon)
|
||||
ImageUtils.display(popularAnswerUserIcon, answer.popularAnswer?.user?.icon)
|
||||
userBadgeIcon.goneIf(answer.user.badge == null)
|
||||
concernBtn.goneIf(answer.me.isFollower || answer.user.id == UserManager.getInstance().userId)
|
||||
followedUserTv.goneIf(!answer.me.isFollower)
|
||||
time.text = (if (answer.me.isFollower) " · " else "") + NewsUtils.getFormattedTime(answer.time!!) + (if (answer.status == "pending" || answer.status == "fail") " · " else "")
|
||||
statusTv.setText(if (answer.status == "pending") R.string.content_pending_status else R.string.fail_status)
|
||||
statusTv.setTextColor(if (answer.status == "pending") R.color.theme_green.toColor() else R.color.theme_red.toColor())
|
||||
statusTv.goneIf(!(answer.status == "pending" || answer.status == "fail"))
|
||||
title.goneIf(answer.type == "answer")
|
||||
title.text = if (answer.type.contains("video")) answer.articleTitle else answer.questions.title
|
||||
content.text = if (answer.type.contains("video")) answer.des else answer.brief
|
||||
popularAnswerContainer.background = GradientDrawable().apply {
|
||||
setColor(Color.parseColor("#F5F6F7"))
|
||||
cornerRadius = 4F.dip2px().toFloat()
|
||||
}
|
||||
popularAnswerUserName.text = answer.popularAnswer?.user?.name
|
||||
popularAnswerContent.text = answer.popularAnswer?.brief
|
||||
forumNameTv.text = answer.bbs.name
|
||||
}
|
||||
|
||||
val answerViewHolder = ForumArticleAskItemViewHolder(includedAnswerItem)
|
||||
answerViewHolder.bindForumAnswerItem(answer, mEntrance, "")
|
||||
@ -157,7 +183,17 @@ class ForumContentSearchListAdapter(context: Context, val mListViewModel: ForumC
|
||||
forumSearchHolder.binding.includedAnswerItem.root.visibility = View.GONE
|
||||
forumSearchHolder.binding.normalContainer.visibility = View.VISIBLE
|
||||
|
||||
forumSearchHolder.binding.entity = answer
|
||||
forumSearchHolder.binding.run {
|
||||
playIv.goneIf(answer.getPassVideos().isEmpty())
|
||||
durationTv.goneIf(answer.getPassVideos().isEmpty())
|
||||
durationTv.text = if (answer.getPassVideos().isNotEmpty()) answer.getPassVideos()[0].duration else "00:00"
|
||||
durationTv.background = GradientDrawable().apply {
|
||||
setColor(Color.parseColor("#99000000"))
|
||||
cornerRadius = 2F.dip2px().toFloat()
|
||||
}
|
||||
countTv.text = "${answer.count.comment}评论 · ${answer.count.vote}点赞"
|
||||
timeTv.text = TimeUtils.getFormatTime(answer.time ?: 0, "yyyy-MM-dd")
|
||||
}
|
||||
if (answer.type == "question") {
|
||||
forumSearchHolder.binding.content.visibility = View.GONE
|
||||
val title = answer.questions.title ?: ""
|
||||
|
||||
@ -11,7 +11,9 @@ import android.widget.TextView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.base.OnViewClickListener
|
||||
import com.gh.common.constant.Config
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.ExposureType
|
||||
@ -545,7 +547,7 @@ class GameFragmentAdapter(
|
||||
eTrace = null,
|
||||
event = ExposureType.EXPOSURE
|
||||
)
|
||||
holder.binding.traceEvent = mItemDataList[position].exposureEvent
|
||||
BindingAdapters.setDownloadButton(holder.binding.progressBar, entity, mItemDataList[position].exposureEvent, null, null, "")
|
||||
}
|
||||
holder.binding.gameImageIcon.setOnClickListener {
|
||||
DataCollectionUtils.uploadClick(mContext, "$name-大图", "游戏-专题")
|
||||
@ -587,9 +589,8 @@ class GameFragmentAdapter(
|
||||
val subjectDigestList = mItemDataList[position].subjectRecommend
|
||||
val binding = holder.binding
|
||||
|
||||
binding.list = subjectDigestList
|
||||
val blockData = mViewModel.blockData
|
||||
binding.clickListener = OnViewClickListener<Int> { v, clickedPosition ->
|
||||
val clickListener = OnViewClickListener<Int> { v, clickedPosition ->
|
||||
if (clickedPosition is Int) {
|
||||
MtaHelper.onEvent("推荐入口", blockData?.name, (clickedPosition + 1).toString())
|
||||
if (clickedPosition < subjectDigestList?.size!!) {
|
||||
@ -680,6 +681,34 @@ class GameFragmentAdapter(
|
||||
}
|
||||
}
|
||||
|
||||
binding.run {
|
||||
viewpagerTvFailure.goneIf(subjectDigestList != null)
|
||||
viewpagerTvFailure.setOnClickListener {
|
||||
clickListener.onClick(it, null)
|
||||
}
|
||||
homeSubjectFailure.goneIf(subjectDigestList != null)
|
||||
homeSubjectFailure.setOnClickListener {
|
||||
clickListener.onClick(it, null)
|
||||
}
|
||||
entranceContainer1.setOnClickListener { clickListener.onClick(it, 0) }
|
||||
entranceContainer2.setOnClickListener { clickListener.onClick(it, 1) }
|
||||
entranceContainer3.setOnClickListener { clickListener.onClick(it, 2) }
|
||||
entranceContainer4.setOnClickListener { clickListener.onClick(it, 3) }
|
||||
entranceContainer5.setOnClickListener { clickListener.onClick(it, 4) }
|
||||
subjectDigestList?.let {
|
||||
ImageUtils.display(entranceIcon1, if (subjectDigestList.isNotEmpty()) subjectDigestList[0].icon else "")
|
||||
ImageUtils.display(entranceIcon2, if (subjectDigestList.size > 1) subjectDigestList[1].icon else "")
|
||||
ImageUtils.display(entranceIcon3, if (subjectDigestList.size > 2) subjectDigestList[2].icon else "")
|
||||
ImageUtils.display(entranceIcon4, if (subjectDigestList.size > 3) subjectDigestList[3].icon else "")
|
||||
ImageUtils.display(entranceIcon5, if (subjectDigestList.size > 4) subjectDigestList[4].icon else "")
|
||||
entranceName1.text = if (subjectDigestList.isNotEmpty()) { if (Config.isShowPlugin()) subjectDigestList[0].name else subjectDigestList[0].nameNormal } else "推荐入口"
|
||||
entranceName2.text = if (subjectDigestList.size > 1) { if (Config.isShowPlugin()) subjectDigestList[1].name else subjectDigestList[1].nameNormal } else "推荐入口"
|
||||
entranceName3.text = if (subjectDigestList.size > 2) { if (Config.isShowPlugin()) subjectDigestList[2].name else subjectDigestList[2].nameNormal } else "推荐入口"
|
||||
entranceName4.text = if (subjectDigestList.size > 3) { if (Config.isShowPlugin()) subjectDigestList[3].name else subjectDigestList[3].nameNormal } else "推荐入口"
|
||||
entranceName5.text = if (subjectDigestList.size > 4) { if (Config.isShowPlugin()) subjectDigestList[4].name else subjectDigestList[4].nameNormal } else "推荐入口"
|
||||
}
|
||||
}
|
||||
|
||||
val itemData = mItemDataList[position]
|
||||
val slideList = itemData.slideList
|
||||
val pagerAdapter = binding.viewPager.adapter
|
||||
@ -767,11 +796,8 @@ class GameFragmentAdapter(
|
||||
)
|
||||
}
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.binding.isShowSuffix = subjectData.isShowSuffix
|
||||
holder.binding.briefStyle = subjectData.briefStyle
|
||||
holder.bindGameItem(gameEntity, subjectData.isShowSuffix, subjectData.briefStyle)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
runOnIoThread(true) {
|
||||
itemData.exposureEvent = ExposureEvent.createEventWithSourceConcat(
|
||||
|
||||
@ -3,7 +3,12 @@ package com.gh.gamecenter.game
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import com.gh.base.BaseRecyclerViewHolder
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.util.dip2px
|
||||
import com.gh.common.util.toColor
|
||||
import com.gh.common.util.toDrawable
|
||||
import com.gh.common.view.DrawableView
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.databinding.GameItemBinding
|
||||
import com.gh.gamecenter.entity.GameEntity
|
||||
|
||||
@ -13,6 +18,28 @@ class GameItemViewHolder(var binding: GameItemBinding) : BaseRecyclerViewHolder<
|
||||
initServerType(binding.gameName, binding.gameKaifuType, gameEntity)
|
||||
}
|
||||
|
||||
fun bindGameItem(
|
||||
entity: GameEntity,
|
||||
isShowSuffix: Boolean = true,
|
||||
briefStyle: String = "",
|
||||
isShowPlatform: Boolean = false
|
||||
) {
|
||||
binding.run {
|
||||
gameIconView.displayGameIcon(entity)
|
||||
BindingAdapters.setGameName(gameName, entity, isShowPlatform, isShowSuffix)
|
||||
BindingAdapters.setTextSize(gameRating, if (entity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, entity)
|
||||
gameRating.setCompoundDrawables(if (entity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (entity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (entity.commentCount > 3) {
|
||||
if (entity.star == 10.0F) "10" else entity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (entity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = entity.decoratedDes
|
||||
recommendStar.rating = entity.recommendStar.toFloat()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun initServerType(gameNameTv: TextView, serverTypeTv: TextView, gameEntity: GameEntity) {
|
||||
val serverLabel = gameEntity.serverLabel
|
||||
|
||||
@ -37,7 +37,7 @@ class AddSearchAndPlayedGameAdapter(context: Context, val mChooseGamesViewModel:
|
||||
if (holder is GameItemViewHolder) {
|
||||
val entity = mEntityList[position]
|
||||
val isSelected = mChooseGamesViewModel.chooseGamesLiveData.value?.find { it.id == entity.id } != null
|
||||
holder.binding.game = entity
|
||||
holder.bindGameItem(entity)
|
||||
holder.binding.downloadBtn.text = if (isSelected) "删除" else "添加"
|
||||
holder.binding.downloadBtn.background =
|
||||
if (isSelected) R.drawable.bg_shape_f5_radius_999.toDrawable() else R.drawable.download_button_normal_style.toDrawable()
|
||||
|
||||
@ -11,6 +11,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.ExposureType
|
||||
@ -498,8 +499,20 @@ open class GameCollectionDetailAdapter(
|
||||
|
||||
fun bindView(gameEntity: GameEntity, position: Int, isLast: Boolean) {
|
||||
binding.run {
|
||||
game = gameEntity
|
||||
gameItemIncluded.game = gameEntity
|
||||
gameItemIncluded.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
recommendStar.rating = gameEntity.recommendStar.toFloat()
|
||||
}
|
||||
root.setPadding(
|
||||
16F.dip2px(),
|
||||
if (position == 0) 16F.dip2px() else 8F.dip2px(),
|
||||
@ -510,7 +523,6 @@ open class GameCollectionDetailAdapter(
|
||||
gameItemIncluded.root.background = null
|
||||
gameItemIncluded.recommendStarPref.text = "推荐指数"
|
||||
initServerType(gameEntity)
|
||||
executePendingBindings()
|
||||
|
||||
val exposureSources = ArrayList<ExposureSource>().apply {
|
||||
add(ExposureSource("游戏单", "${mViewModel.gameCollectionTitle}+${mViewModel.gameCollectionId}"))
|
||||
|
||||
@ -394,9 +394,10 @@ class GameCollectionDetailFragment :
|
||||
private fun initImageTypeView() {
|
||||
mBinding?.imageItem?.run {
|
||||
mEntity?.run {
|
||||
entity = this
|
||||
executePendingBindings()
|
||||
|
||||
nameTv.text = title
|
||||
userNameTv.text = user?.name
|
||||
ImageUtils.display(poster, cover)
|
||||
tagIv.goneIf(stamp.isEmpty())
|
||||
imageItemDesTv.text = intro
|
||||
|
||||
when (stamp) {
|
||||
@ -416,9 +417,9 @@ class GameCollectionDetailFragment :
|
||||
private fun initVideoTypeView() {
|
||||
mBinding?.videoItem?.run {
|
||||
mEntity?.run {
|
||||
entity = this
|
||||
executePendingBindings()
|
||||
|
||||
tagIv.goneIf(stamp.isEmpty())
|
||||
userNameTv.text = user?.name
|
||||
nameTv.text = title
|
||||
videoItemDesTv.text = intro
|
||||
|
||||
when (stamp) {
|
||||
|
||||
@ -17,7 +17,7 @@ import com.gh.gamecenter.entity.NewsEntity
|
||||
|
||||
class GameNewsAdapter(val context: Context, val article: ArrayList<NewsEntity>, val mFuLiViewModel: FuLiViewModel?, val mEntrance: String) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return NewsViewHolder(DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.item_game_detail_news, parent, false))
|
||||
return NewsViewHolder(ItemGameDetailNewsBinding.inflate(LayoutInflater.from(context), parent, false))
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = article.size
|
||||
|
||||
@ -81,7 +81,7 @@ class ServersCalendarActivity : ToolBarActivity() {
|
||||
val postButton = container.findViewById<TextView>(R.id.menu_post_text)
|
||||
postButton.text = "反馈"
|
||||
|
||||
mBinding = DataBindingUtil.bind(mContentView)!!
|
||||
mBinding = ActivityServersCalendarBinding.bind(mContentView)
|
||||
mBinding.includeNoConnection.root.setOnClickListener {
|
||||
mBinding.includeLoading.root.visibility = View.VISIBLE
|
||||
mBinding.includeNoConnection.root.visibility = View.GONE
|
||||
|
||||
@ -76,9 +76,8 @@ class HistoryGameListAdapter(context: Context, private val mViewModel: HistoryGa
|
||||
is GameItemViewHolder -> {
|
||||
val gameEntity = mEntityList[position]
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
(holder.binding.selectIv.layoutParams as ConstraintLayout.LayoutParams).apply {
|
||||
width = 20f.dip2px()
|
||||
|
||||
@ -9,6 +9,7 @@ import com.gh.base.fragment.LazyFragment
|
||||
import com.gh.common.AppExecutor
|
||||
import com.gh.common.TimeElapsedHelper
|
||||
import com.gh.common.constant.Constants
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureListener
|
||||
import com.gh.common.util.*
|
||||
import com.gh.common.view.OffsetLinearLayoutManager
|
||||
@ -66,7 +67,14 @@ class HomeFragment : LazyFragment() {
|
||||
mListAdapter.submitList(it)
|
||||
})
|
||||
mViewModel.loadStatus.observeNonNull(this, callback = {
|
||||
mBinding.loadStatus = it
|
||||
val loadStatus = it
|
||||
mBinding.run {
|
||||
BindingAdapters.isRefreshing(gameRefresh, LoadStatus.LIST_LOADED)
|
||||
gameRefresh.goneIf(loadStatus == LoadStatus.INIT_FAILED)
|
||||
gameList.goneIf(loadStatus == LoadStatus.INIT_LOADING)
|
||||
reuseNoConnection.root.goneIf(loadStatus != LoadStatus.INIT_FAILED)
|
||||
reuseLoading.root.goneIf(loadStatus != LoadStatus.INIT_LOADING)
|
||||
}
|
||||
mListAdapter.setLoadStatus(it)
|
||||
mBinding.reuseNoConnection.root.visibility = if (it == LoadStatus.INIT_FAILED) View.VISIBLE else View.GONE
|
||||
mBinding.reuseLoading.root.visibility = if (it == LoadStatus.INIT_LOADING) View.VISIBLE else View.GONE
|
||||
@ -95,7 +103,14 @@ class HomeFragment : LazyFragment() {
|
||||
R.color.theme
|
||||
)
|
||||
)
|
||||
mBinding.loadStatus = LoadStatus.LIST_LOADED
|
||||
val loadStatus = LoadStatus.LIST_LOADED
|
||||
mBinding.run {
|
||||
BindingAdapters.isRefreshing(gameRefresh, LoadStatus.LIST_LOADED)
|
||||
gameRefresh.goneIf(loadStatus == LoadStatus.INIT_FAILED)
|
||||
gameList.goneIf(loadStatus == LoadStatus.INIT_LOADING)
|
||||
reuseNoConnection.root.goneIf(loadStatus != LoadStatus.INIT_FAILED)
|
||||
reuseLoading.root.goneIf(loadStatus != LoadStatus.INIT_LOADING)
|
||||
}
|
||||
mAutomaticLayoutManager = OffsetLinearLayoutManager(requireContext())
|
||||
mLayoutManager = mAutomaticLayoutManager
|
||||
mListAdapter = HomeFragmentAdapter(requireContext(), mViewModel, mLayoutManager) {
|
||||
|
||||
@ -9,8 +9,7 @@ import com.gh.gamecenter.entity.HomeRecommend
|
||||
class HomeRecommendItemViewHolder(val binding: HomeRecommendItemBinding) : BaseRecyclerViewHolder<Any>(binding.root) {
|
||||
|
||||
fun bindRecommend(recommends: List<HomeRecommend>) {
|
||||
binding.list = recommends
|
||||
binding.clickListener = OnViewClickListener<Int> { _, position ->
|
||||
val clickListener = OnViewClickListener<Int> { _, position ->
|
||||
// 很奇怪这里居然抛出 IndexOutOfBoundsException 异常(有可能数据改变了,页面还没刷新导致)
|
||||
if (position >= recommends.size) return@OnViewClickListener
|
||||
|
||||
@ -28,5 +27,31 @@ class HomeRecommendItemViewHolder(val binding: HomeRecommendItemBinding) : BaseR
|
||||
PageSwitchDataHelper.pushCurrentPageData(hashMapOf(Pair(PageSwitchDataHelper.PAGE_BUSINESS_TYPE, "首页-推荐位")))
|
||||
DirectUtils.directToLinkPage(binding.root.context, recommend.transformLinkEntity(), "首页推荐入口", "新首页-推荐入口")
|
||||
}
|
||||
binding.run {
|
||||
containerOne.goneIf(recommends.isEmpty())
|
||||
containerTwo.goneIf(recommends.size < 2)
|
||||
containerThree.goneIf(recommends.size < 3)
|
||||
containerFour.goneIf(recommends.size < 4)
|
||||
containerFive.goneIf(recommends.size < 5)
|
||||
spaceOne.goneIf(recommends.size < 2)
|
||||
spaceTwo.goneIf(recommends.size < 3)
|
||||
spaceThree.goneIf(recommends.size < 4)
|
||||
spaceFour.goneIf(recommends.size < 5)
|
||||
containerOne.setOnClickListener { clickListener.onClick(it, 0) }
|
||||
containerTwo.setOnClickListener { clickListener.onClick(it, 1) }
|
||||
containerThree.setOnClickListener { clickListener.onClick(it, 2) }
|
||||
containerFour.setOnClickListener { clickListener.onClick(it, 3) }
|
||||
containerFive.setOnClickListener { clickListener.onClick(it, 4) }
|
||||
ImageUtils.display(iconIvOne, if (recommends.isNotEmpty()) recommends[0].icon else "")
|
||||
ImageUtils.display(iconIvTwo, if (recommends.size > 1) recommends[1].icon else "")
|
||||
ImageUtils.display(iconIvThree, if (recommends.size > 2) recommends[2].icon else "")
|
||||
ImageUtils.display(iconIvFour, if (recommends.size > 3) recommends[3].icon else "")
|
||||
ImageUtils.display(iconIvFive, if (recommends.size > 4) recommends[4].icon else "")
|
||||
nameTvOne.text = if (recommends.isNotEmpty()) recommends[0].name else "推荐入口"
|
||||
nameTvTwo.text = if (recommends.size > 1) recommends[1].name else "推荐入口"
|
||||
nameTvThree.text = if (recommends.size > 2) recommends[2].name else "推荐入口"
|
||||
nameTvFour.text = if (recommends.size > 3) recommends[3].name else "推荐入口"
|
||||
nameTvFive.text = if (recommends.size > 4) recommends[4].name else "推荐入口"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ import androidx.recyclerview.widget.DefaultItemAnimator
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.iinterface.IOffsetable
|
||||
@ -447,10 +448,10 @@ class LegacyHomeFragmentAdapterAssistant(
|
||||
basicSource = mBasicExposureSources,
|
||||
source = listOf(ExposureSource("专题", entity.subjectData?.name + "-大图"))
|
||||
)
|
||||
holder.binding.traceEvent = item.exposureEvent
|
||||
BindingAdapters.setDownloadButton(holder.binding.progressBar, entity, item.exposureEvent, null, "(游戏-专题:$name-大图)", "")
|
||||
} else {
|
||||
BindingAdapters.setDownloadButton(holder.binding.progressBar, entity, null, null, "(游戏-专题:$name-大图)", "")
|
||||
}
|
||||
|
||||
holder.binding.entrance = "(游戏-专题:$name-大图)"
|
||||
holder.binding.gameImageIcon.setOnClickListener {
|
||||
DataCollectionUtils.uploadClick(mContext, "$name-大图", "游戏-专题")
|
||||
MtaHelper.onEvent("游戏专题", "大图", name + ":" + entity.name)
|
||||
@ -484,12 +485,8 @@ class LegacyHomeFragmentAdapterAssistant(
|
||||
)
|
||||
}
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity, subjectData.isShowSuffix, subjectData.briefStyle)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.isShowSuffix = subjectData.isShowSuffix
|
||||
holder.binding.briefStyle = subjectData.briefStyle
|
||||
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
runOnIoThread(true) {
|
||||
item.exposureEvent = ExposureEvent.createEventWithSourceConcat(
|
||||
|
||||
@ -40,12 +40,9 @@ class PackageSkipAdapter(val context: Context, val games: ArrayList<GameEntity>,
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if (holder is GameItemViewHolder) {
|
||||
val gameEntity = games[position]
|
||||
holder.binding.game = gameEntity
|
||||
holder.initServerType(gameEntity)
|
||||
val subjectData = gameEntity.subjectData
|
||||
holder.binding.isShowSuffix = subjectData?.isShowSuffix
|
||||
holder.binding.briefStyle = subjectData?.briefStyle
|
||||
holder.binding.executePendingBindings()
|
||||
holder.bindGameItem(gameEntity, subjectData?.isShowSuffix ?: true, subjectData?.briefStyle ?: "")
|
||||
holder.initServerType(gameEntity)
|
||||
|
||||
if (games.size == 1) {
|
||||
holder.itemView.background = ContextCompat.getDrawable(context, R.drawable.background_shape_white_radius_8)
|
||||
|
||||
@ -7,6 +7,7 @@ import android.view.ViewGroup
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.IExposable
|
||||
@ -57,7 +58,20 @@ class MyFollowedGameAdapter(context: Context, var mViewModel: MyFollowedGameView
|
||||
|
||||
holder.run {
|
||||
binding.run {
|
||||
gameItemIncluded.game = gameEntity
|
||||
gameItemIncluded.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
recommendStar.rating = gameEntity.recommendStar.toFloat()
|
||||
}
|
||||
moreBtn.visibility = View.GONE
|
||||
initServerType(gameEntity)
|
||||
initShortcut(gameEntity, mEntrance, path, newPath)
|
||||
|
||||
@ -3,9 +3,9 @@ package com.gh.gamecenter.mygame
|
||||
import android.content.Context
|
||||
import android.util.SparseArray
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.IExposable
|
||||
@ -19,7 +19,6 @@ import com.gh.gamecenter.databinding.ItemFollowedGameBinding
|
||||
import com.gh.gamecenter.entity.GameEntity
|
||||
import com.gh.gamecenter.eventbus.EBDownloadStatus
|
||||
import com.gh.gamecenter.game.GameAndPosition
|
||||
import java.util.*
|
||||
|
||||
class MyReservationAdapter(context: Context, var mViewModel: MyReservationViewModel)
|
||||
: ListAdapter<GameEntity>(context), IExposable {
|
||||
@ -56,7 +55,20 @@ class MyReservationAdapter(context: Context, var mViewModel: MyReservationViewMo
|
||||
val path = "预约Tab"
|
||||
val newPath = "预约Tab_新"
|
||||
|
||||
holder.binding.gameItemIncluded.game = gameEntity
|
||||
holder.binding.gameItemIncluded.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
recommendStar.rating = gameEntity.recommendStar.toFloat()
|
||||
}
|
||||
holder.initServerType(gameEntity)
|
||||
holder.initShortcut(gameEntity, mEntrance, path, newPath)
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.IExposable
|
||||
@ -103,7 +104,20 @@ open class PlayedGameAdapter(context: Context,
|
||||
if (mIsMyPlayedGame) {
|
||||
holder.initDownloadButtonOffset()
|
||||
}
|
||||
holder.binding.gameItemIncluded.game = gameEntity
|
||||
holder.binding.gameItemIncluded.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
recommendStar.rating = gameEntity.recommendStar.toFloat()
|
||||
}
|
||||
|
||||
holder.binding.gameItemIncluded.labelList.removeAllViews()
|
||||
val runTimeView = TextView(mContext)
|
||||
|
||||
@ -4,7 +4,6 @@ import android.content.Context
|
||||
import android.util.TypedValue
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.util.*
|
||||
@ -13,12 +12,12 @@ import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.adapter.viewholder.FooterViewHolder
|
||||
import com.gh.gamecenter.adapter.viewholder.GameViewHolder
|
||||
import com.gh.gamecenter.baselist.ListAdapter
|
||||
import com.gh.gamecenter.databinding.GameItemBinding
|
||||
import com.gh.gamecenter.entity.GameEntity
|
||||
import com.gh.gamecenter.eventbus.EBDownloadStatus
|
||||
import com.gh.gamecenter.game.GameItemViewHolder
|
||||
import com.gh.gamecenter.mygame.PlayedGameViewModel
|
||||
import com.lightgame.download.DownloadEntity
|
||||
import java.util.HashMap
|
||||
|
||||
class UserPlayedGameAdapter(context: Context,
|
||||
private val mViewModel: PlayedGameViewModel): ListAdapter<GameEntity>(context) {
|
||||
@ -63,7 +62,7 @@ class UserPlayedGameAdapter(context: Context,
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return when (viewType) {
|
||||
ItemViewType.GAME_NORMAL -> GameItemViewHolder(DataBindingUtil.inflate(mLayoutInflater, R.layout.game_item, parent, false))
|
||||
ItemViewType.GAME_NORMAL -> GameItemViewHolder(GameItemBinding.inflate(mLayoutInflater, parent, false))
|
||||
|
||||
else -> FooterViewHolder(mLayoutInflater.inflate(R.layout.refresh_footerview, parent, false))
|
||||
}
|
||||
@ -76,9 +75,8 @@ class UserPlayedGameAdapter(context: Context,
|
||||
root.setPadding(16F.dip2px(), 8F.dip2px(), 16F.dip2px(), 8F.dip2px())
|
||||
|
||||
val gameEntity = mEntityList[position]
|
||||
game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.initServerType(gameEntity)
|
||||
executePendingBindings()
|
||||
|
||||
gameDes.run {
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_SP, 11F)
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.gh.gamecenter.qa.answer
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
@ -10,6 +12,7 @@ import com.gh.common.util.*
|
||||
import com.gh.gamecenter.CollectionActivity
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.databinding.CommunityAnswerItemBinding
|
||||
import com.gh.gamecenter.manager.UserManager
|
||||
import com.gh.gamecenter.qa.entity.AnswerEntity
|
||||
import com.gh.gamecenter.qa.entity.ArticleEntity
|
||||
|
||||
@ -62,8 +65,31 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B
|
||||
}
|
||||
|
||||
private fun bindItem(entity: AnswerEntity, entrance: String, path: String) {
|
||||
binding.entity = entity
|
||||
binding.executePendingBindings()
|
||||
binding.run {
|
||||
questionTitle.goneIf(entity.type != "answer")
|
||||
questionTitle.text = entity.questions.title
|
||||
userName.text = entity.user.name
|
||||
userBadgeName.text = entity.user.badge?.name
|
||||
ImageUtils.display(userBadgeIcon, entity.user.badge?.icon)
|
||||
ImageUtils.display(popularAnswerUserIcon, entity.popularAnswer?.user?.icon)
|
||||
userBadgeIcon.goneIf(entity.user.badge == null)
|
||||
concernBtn.goneIf(entity.me.isFollower || entity.user.id == UserManager.getInstance().userId)
|
||||
followedUserTv.goneIf(!entity.me.isFollower)
|
||||
time.text = (if (entity.me.isFollower) " · " else "") + NewsUtils.getFormattedTime(entity.time!!) + (if (entity.status == "pending" || entity.status == "fail") " · " else "")
|
||||
statusTv.setText(if (entity.status == "pending") R.string.content_pending_status else R.string.fail_status)
|
||||
statusTv.setTextColor(if (entity.status == "pending") R.color.theme_green.toColor() else R.color.theme_red.toColor())
|
||||
statusTv.goneIf(!(entity.status == "pending" || entity.status == "fail"))
|
||||
title.goneIf(entity.type == "answer")
|
||||
title.text = if (entity.type.contains("video")) entity.articleTitle else entity.questions.title
|
||||
content.text = if (entity.type.contains("video")) entity.des else entity.brief
|
||||
popularAnswerContainer.background = GradientDrawable().apply {
|
||||
setColor(Color.parseColor("#F5F6F7"))
|
||||
cornerRadius = 4F.dip2px().toFloat()
|
||||
}
|
||||
popularAnswerUserName.text = entity.popularAnswer?.user?.name
|
||||
popularAnswerContent.text = entity.popularAnswer?.brief
|
||||
forumNameTv.text = entity.bbs.name
|
||||
}
|
||||
|
||||
binding.userIcon.display(entity.user.border, entity.user.icon, entity.user.auth?.icon)
|
||||
binding.imageContainer.bindData(entity, entrance, path)
|
||||
@ -137,6 +163,5 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B
|
||||
binding.content.paint.flags = Paint.ANTI_ALIAS_FLAG
|
||||
binding.content.setTextColor(ContextCompat.getColor(itemView.context, R.color.text_subtitle))
|
||||
}
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ open class GameAdapter(context: Context) : ListAdapter<GameEntity>(context) {
|
||||
override fun onBindViewHolder(holder: androidx.recyclerview.widget.RecyclerView.ViewHolder, position: Int) {
|
||||
if (holder is GameItemViewHolder) {
|
||||
val entity = mEntityList[position]
|
||||
holder.binding.game = entity
|
||||
holder.bindGameItem(entity)
|
||||
holder.binding.downloadBtn.visibility = View.GONE
|
||||
val layoutParams = holder.binding.gameName.layoutParams
|
||||
layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT
|
||||
|
||||
@ -95,7 +95,7 @@ class QuestionEditActivity : BaseRichEditorActivity<QuestionEditViewModel>(),
|
||||
mViewModel.gameEntity = null
|
||||
}
|
||||
setForumName()
|
||||
mBinding.vm = mViewModel
|
||||
mBinding.questionseditTitle.setText(mViewModel.title)
|
||||
} else if (requestCode == VideoPublishFragment.REQUEST_GAME_CODE) {
|
||||
val game = data.getParcelableExtra<GameEntity>(GameEntity::class.java.simpleName)
|
||||
if (game != null) {
|
||||
@ -139,10 +139,10 @@ class QuestionEditActivity : BaseRichEditorActivity<QuestionEditViewModel>(),
|
||||
if (!cacheTitle.isNullOrEmpty()) mViewModel.title = cacheTitle
|
||||
if (!cacheContent.isNullOrEmpty()) mViewModel.content = cacheContent
|
||||
}
|
||||
mBinding = DataBindingUtil.bind(mContentView)!!
|
||||
mBinding = ActivityQuestionsEditBinding.bind(mContentView)
|
||||
checkPostButtonEnable()
|
||||
mBinding.questionseditTitle.setOnEditorActionListener { _, _, e -> e?.keyCode == KeyEvent.KEYCODE_ENTER; }
|
||||
mBinding.vm = mViewModel
|
||||
mBinding.questionseditTitle.setText(mViewModel.title)
|
||||
mBinding.editorInsertContainer.editorFont.visibility = View.GONE
|
||||
mBinding.editorInsertContainer.editorLink.visibility = View.GONE
|
||||
mOriginalCb.visibility = View.GONE
|
||||
|
||||
@ -10,6 +10,7 @@ import androidx.collection.ArrayMap
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.Constants
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.ExposureType
|
||||
@ -117,8 +118,20 @@ class SearchGameIndexAdapter(
|
||||
|
||||
if (holder is SearchGameIndexItemViewHolder) {
|
||||
val binding = holder.binding
|
||||
binding.game = gameEntity
|
||||
binding.gameItemIncluded.game = gameEntity
|
||||
binding.gameItemIncluded.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
recommendStar.rating = gameEntity.recommendStar.toFloat()
|
||||
}
|
||||
binding.topDivider.goneIf(position == 0)
|
||||
binding.gameItemIncluded.root.setPadding(
|
||||
16F.dip2px(),
|
||||
@ -127,7 +140,6 @@ class SearchGameIndexAdapter(
|
||||
16F.dip2px()
|
||||
)
|
||||
holder.initServerType(gameEntity)
|
||||
binding.executePendingBindings()
|
||||
|
||||
binding.run {
|
||||
val isShowTag = !gameEntity.shouldUseMirrorInfo()
|
||||
|
||||
@ -9,6 +9,7 @@ import androidx.collection.ArrayMap
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.Constants
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.exposure.ExposureEvent
|
||||
import com.gh.common.exposure.ExposureSource
|
||||
import com.gh.common.exposure.ExposureType
|
||||
@ -182,11 +183,22 @@ class SearchGameResultAdapter(
|
||||
private fun bindGameItem(holder: SearchGameIndexItemViewHolder) {
|
||||
val binding = holder.binding
|
||||
val gameEntity = mEntityList[holder.adapterPosition].game!!
|
||||
binding.game = gameEntity
|
||||
binding.gameItemIncluded.game = gameEntity
|
||||
binding.gameItemIncluded.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
recommendStar.rating = gameEntity.recommendStar.toFloat()
|
||||
}
|
||||
binding.gameItemIncluded.root.setPadding(16F.dip2px(), 16F.dip2px(), 16F.dip2px(), 16F.dip2px())
|
||||
holder.initServerType(gameEntity)
|
||||
binding.executePendingBindings()
|
||||
|
||||
val exposureSources = ArrayList<ExposureSource>()
|
||||
exposureSources.add(ExposureSource("首页搜索", ""))
|
||||
|
||||
@ -83,7 +83,7 @@ class GameServersTestAdapter(context: Context,
|
||||
16F.dip2px(),
|
||||
if (isTheLastOfTheLatestConsecutiveGame) 16F.dip2px() else 8F.dip2px())
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.binding.gameName.layoutParams = holder.binding.gameName.layoutParams.apply {
|
||||
width = ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
}
|
||||
@ -118,7 +118,6 @@ class GameServersTestAdapter(context: Context,
|
||||
StringUtils.buildString("开服表:", gameEntity.name),
|
||||
mExposureEventArray[viewHolder.adapterPosition])
|
||||
DownloadItemUtils.updateItem(mContext, gameEntity, GameViewHolder(viewHolder.binding), true, gameEntity.briefStyle)
|
||||
viewHolder.binding.executePendingBindings()
|
||||
viewHolder.itemView.setOnClickListener {
|
||||
GameDetailActivity.startGameDetailActivity(mContext, gameEntity,
|
||||
StringUtils.buildString(mEntrance, "+(开服表[", viewHolder.adapterPosition.toString(), "])"),
|
||||
|
||||
@ -19,8 +19,8 @@ import androidx.lifecycle.ViewModelProviders
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder
|
||||
import com.bigkoo.pickerview.listener.OnTimeSelectListener
|
||||
import com.contrarywind.view.WheelView
|
||||
import com.gh.base.OnViewClickListener
|
||||
import com.gh.base.ToolBarActivity
|
||||
import com.gh.common.databind.AddKaiFuBindingAdapter
|
||||
import com.gh.common.util.EntranceUtils
|
||||
import com.gh.common.util.HaloWheelViewAdapter
|
||||
import com.gh.gamecenter.R
|
||||
@ -72,28 +72,31 @@ class AddKaiFuActivity : ToolBarActivity() {
|
||||
|
||||
// initView
|
||||
mBinding = ActivityKaifuAddBinding.bind(mContentView)
|
||||
mBinding?.list = mViewModel?.calendarList
|
||||
mBinding?.clickListener = OnViewClickListener { view: View, position: Any ->
|
||||
if (position is Int) {
|
||||
if (position == 0) {
|
||||
when (view.id) {
|
||||
R.id.kaifu_add_first_name -> { // 自动填充->名字
|
||||
mViewModel?.copyLastFirstNameToNext()
|
||||
mBinding?.kaifuAddContainer?.let {
|
||||
AddKaiFuBindingAdapter.addKaiFuView(
|
||||
it, mViewModel?.calendarList
|
||||
) { view: View, position: Any ->
|
||||
if (position is Int) {
|
||||
if (position == 0) {
|
||||
when (view.id) {
|
||||
R.id.kaifu_add_first_name -> { // 自动填充->名字
|
||||
mViewModel?.copyLastFirstNameToNext()
|
||||
}
|
||||
R.id.kaifu_add_server_name -> {
|
||||
mViewModel?.copyLastFirstAndServerNameToNext()
|
||||
}
|
||||
R.id.kaifu_add_time -> { // 自动填充->时间
|
||||
mViewModel?.copyTimeToNext()
|
||||
}
|
||||
}
|
||||
R.id.kaifu_add_server_name -> {
|
||||
mViewModel?.copyLastFirstAndServerNameToNext()
|
||||
}
|
||||
R.id.kaifu_add_time -> { // 自动填充->时间
|
||||
mViewModel?.copyTimeToNext()
|
||||
} else if (view.id == R.id.kaifu_add_time) {
|
||||
showDataPicker { data: Date?, _ ->
|
||||
run {
|
||||
data?.minutes = mPickerMinutes[data?.minutes ?: 0]
|
||||
mViewModel?.calendarList!![position].setTime(if (data == null) 0 else data.time / 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (view.id == R.id.kaifu_add_time) {
|
||||
showDataPicker(OnTimeSelectListener { data: Date?, _ ->
|
||||
run {
|
||||
data?.minutes = mPickerMinutes.get(data?.minutes ?: 0)
|
||||
mViewModel?.calendarList!![position].setTime(if (data == null) 0 else data.time / 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.g00fy2.versioncompare.Version
|
||||
import com.gh.base.BaseRecyclerViewHolder
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.databind.BindingAdapters
|
||||
import com.gh.common.simulator.SimulatorDownloadManager
|
||||
import com.gh.common.simulator.SimulatorGameManager
|
||||
import com.gh.common.util.*
|
||||
@ -158,7 +159,20 @@ class SimulatorGameListAdapter(context: Context,
|
||||
topToTop = -1
|
||||
bottomMargin = DisplayUtils.dip2px(8F)
|
||||
}
|
||||
gameItemIncluded.game = gameEntity
|
||||
gameItemIncluded.run {
|
||||
gameIconView.displayGameIcon(gameEntity)
|
||||
BindingAdapters.setGameName(gameName, gameEntity, false, null)
|
||||
BindingAdapters.setTextSize(gameRating, if (gameEntity.commentCount > 3) 12 else 10)
|
||||
BindingAdapters.setGameTags(labelList, gameEntity)
|
||||
gameRating.setCompoundDrawables(if (gameEntity.commentCount > 3) R.drawable.game_horizontal_rating.toDrawable() else null, null, null, null)
|
||||
gameRating.setPadding(0, 0, if (gameEntity.commentCount > 3) 8F.dip2px() else 0, 0)
|
||||
gameRating.text = if (gameEntity.commentCount > 3) {
|
||||
if (gameEntity.star == 10.0F) "10" else gameEntity.star.toString()
|
||||
} else ""
|
||||
gameRating.setTextColor(if (gameEntity.commentCount > 3) R.color.theme_font.toColor() else R.color.theme.toColor())
|
||||
gameDes.text = gameEntity.decoratedDes
|
||||
recommendStar.rating = gameEntity.recommendStar.toFloat()
|
||||
}
|
||||
gameItemIncluded.recentPlayedTag.goneIf(!gameEntity.isRecentlyPlayed)
|
||||
gameItemIncluded.selectIv.goneIf(!mShowSelectFlag)
|
||||
gameItemIncluded.selectIv.isChecked = mSelectList[position - 1]
|
||||
|
||||
@ -94,11 +94,9 @@ class SubjectAdapter(context: Context,
|
||||
holder.itemView.setPadding(padLeft, padTop, 20F.dip2px(), 12F.dip2px())
|
||||
|
||||
val gameEntity = mEntityList[position]
|
||||
holder.binding.game = gameEntity
|
||||
holder.binding.briefStyle = subjectData.briefStyle
|
||||
holder.binding.isShowSuffix = true // 专题详情均显示游戏后缀 https://git.ghzs.com/pm/halo-app-issues/-/issues/1098 (3)
|
||||
// 专题详情均显示游戏后缀 https://git.ghzs.com/pm/halo-app-issues/-/issues/1098 (3)
|
||||
holder.bindGameItem(gameEntity, true, subjectData.briefStyle)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
if (subjectData.isOrder!!) {
|
||||
var index = 1
|
||||
|
||||
@ -26,9 +26,8 @@ class SuggestGameCollectAdapter(context: Context,
|
||||
holder.itemView.setPadding(8F.dip2px(),4F.dip2px(),12F.dip2px(),4F.dip2px())
|
||||
|
||||
val gameEntity = mGameList[position]
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
holder.binding.downloadBtn.text = "查看"
|
||||
holder.binding.root.setOnClickListener {
|
||||
GameDetailActivity.startGameDetailActivity(mContext, gameEntity, "(意见反馈-收录提示)")
|
||||
|
||||
@ -79,9 +79,8 @@ class TagsListAdapter(context: Context,
|
||||
if (holder is GameItemViewHolder) {
|
||||
val gameEntity = mEntityList[position]
|
||||
|
||||
holder.binding.game = gameEntity
|
||||
holder.bindGameItem(gameEntity)
|
||||
holder.initServerType(gameEntity)
|
||||
holder.binding.executePendingBindings()
|
||||
|
||||
val padTop = if (position == 0) 16F.dip2px() else 8F.dip2px()
|
||||
holder.itemView.setPadding(16F.dip2px(), padTop, 16F.dip2px(), 8F.dip2px())
|
||||
|
||||
@ -9,10 +9,12 @@ import android.widget.LinearLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.gh.common.constant.ItemViewType;
|
||||
import com.gh.common.databind.BindingAdapters;
|
||||
import com.gh.common.util.DataCollectionUtils;
|
||||
import com.gh.common.util.DialogUtils;
|
||||
import com.gh.common.util.DisplayUtils;
|
||||
import com.gh.common.util.DownloadItemUtils;
|
||||
import com.gh.common.util.ExtensionsKt;
|
||||
import com.gh.common.util.HomePluggableHelper;
|
||||
import com.gh.common.util.MtaHelper;
|
||||
import com.gh.common.util.PlatformUtils;
|
||||
@ -103,8 +105,16 @@ public class GamePluginAdapter extends BaseRecyclerAdapter {
|
||||
final GameEntity gameEntity = mPluginList.get(position);
|
||||
holder.initServerType(gameEntity);
|
||||
GamePluggableItemBinding binding = holder.getBinding();
|
||||
binding.gameItemIncluded.setGame(gameEntity);
|
||||
binding.gameItemIncluded.setIsShowPlatform(true);
|
||||
binding.gameItemIncluded.gameIconView.displayGameIcon(gameEntity);
|
||||
BindingAdapters.setGameName(binding.gameItemIncluded.gameName, gameEntity, true, null);
|
||||
BindingAdapters.setTextSize(binding.gameItemIncluded.gameRating, gameEntity.getCommentCount() > 3 ? 12 : 10);
|
||||
BindingAdapters.setGameTags(binding.gameItemIncluded.labelList, gameEntity);
|
||||
binding.gameItemIncluded.gameRating.setCompoundDrawables(gameEntity.getCommentCount() > 3 ? ExtensionsKt.toDrawable(R.drawable.game_horizontal_rating) : null, null, null, null);
|
||||
binding.gameItemIncluded.gameRating.setPadding(0, 0, gameEntity.getCommentCount() > 3 ? DisplayUtils.dip2px(8) : 0, 0);
|
||||
binding.gameItemIncluded.gameRating.setText(gameEntity.getCommentCount() > 3 ? (gameEntity.getStar() == 10.0 ? "10" : String.valueOf(gameEntity.getStar())) : "");
|
||||
binding.gameItemIncluded.gameRating.setTextColor(gameEntity.getCommentCount() > 3 ? ExtensionsKt.toColor(R.color.theme_font) : ExtensionsKt.toColor(R.color.theme));
|
||||
binding.gameItemIncluded.gameDes.setText(gameEntity.getDecoratedDes());
|
||||
binding.gameItemIncluded.recommendStar.setRating(gameEntity.getRecommendStar());
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
MtaHelper.onEvent("首页_新", "点击", "插件化" + (position + 1) + "_" + gameEntity.getName());
|
||||
DataCollectionUtils.uploadClick(mContext, "插件化" + "-列表", "游戏-专题", gameEntity.getName());
|
||||
|
||||
@ -1,77 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<layout >
|
||||
<include layout="@layout/reuse_toolbar" />
|
||||
|
||||
<data >
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<import type = "java.util.List" />
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp">
|
||||
|
||||
<import type = "com.gh.gamecenter.entity.ServerCalendarEntity" />
|
||||
|
||||
<variable
|
||||
name = "clickListener"
|
||||
type = "com.gh.base.OnViewClickListener" />
|
||||
|
||||
<variable
|
||||
name = "list"
|
||||
type = "List<ServerCalendarEntity>" />
|
||||
</data >
|
||||
|
||||
<LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent"
|
||||
android:orientation = "vertical" >
|
||||
|
||||
<include layout = "@layout/reuse_toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "0dp"
|
||||
android:layout_marginTop = "8dp"
|
||||
android:layout_weight = "1"
|
||||
android:background = "@android:color/white" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:padding = "20dp" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/kaifu_add_container"
|
||||
addKaiFuView="@{list}"
|
||||
clickListener="@{clickListener}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/kaifu_add_container"
|
||||
android:layout_marginTop="20dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:text="@string/kaifu_add_hint"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout >
|
||||
|
||||
</ScrollView >
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_marginTop = "1dp"
|
||||
android:background = "@android:color/white" >
|
||||
<LinearLayout
|
||||
android:id="@+id/kaifu_add_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/add_post"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "40dp"
|
||||
android:layout_margin = "8dp"
|
||||
style="@style/PrimaryButton"
|
||||
android:gravity = "center"
|
||||
android:text = "提交" />
|
||||
</FrameLayout >
|
||||
</LinearLayout >
|
||||
</layout >
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/kaifu_add_container"
|
||||
android:layout_marginTop="20dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:text="@string/kaifu_add_hint"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/add_post"
|
||||
style="@style/PrimaryButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="8dp"
|
||||
android:gravity="center"
|
||||
android:text="提交" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -1,291 +1,280 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.gh.gamecenter.qa.questions.edit.QuestionEditViewModel" />
|
||||
</data>
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/normal_toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_height">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/normal_toolbar"
|
||||
style="@style/Base_ToolbarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.ActionMenuView
|
||||
android:id="@+id/actionMenuView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="10dp"
|
||||
android:text="取消"
|
||||
android:textColor="@color/text_subtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/normal_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:layout_below="@+id/normal_toolbar_container"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/normal_toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_height">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/normal_toolbar"
|
||||
style="@style/Base_ToolbarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.ActionMenuView
|
||||
android:id="@+id/actionMenuView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/backBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="10dp"
|
||||
android:text="取消"
|
||||
android:textColor="@color/text_subtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/normal_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/questionsedit_title_rl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/normal_toolbar_container"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/questionsedit_title_rl"
|
||||
android:id="@+id/chooseActivityContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_choose_activity"
|
||||
android:drawablePadding="12dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="参与话题"
|
||||
android:textColor="@color/text_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activityTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableRight="@drawable/ic_forum_arrow_right"
|
||||
android:drawablePadding="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="end"
|
||||
android:hint="添加话题标签"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_title"
|
||||
android:textColorHint="@color/text_subtitleDesc"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:background="@color/divider" />
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/questionsedit_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp">
|
||||
android:background="@null"
|
||||
android:completionThreshold="1"
|
||||
android:dropDownVerticalOffset="1dp"
|
||||
android:hint="写下你想问的问题"
|
||||
android:lineSpacingExtra="8dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:popupBackground="@drawable/question_edit_popup_border"
|
||||
android:textColor="@color/text_title"
|
||||
android:textColorHint="@color/text_body"
|
||||
android:textCursorDrawable="@drawable/cursor_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/chooseActivityContainer"
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:background="@color/divider" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.gh.common.view.RichEditor
|
||||
android:id="@+id/rich_editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/editPlaceholder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="15dp"
|
||||
android:text="请详细描述你的问题"
|
||||
android:textColor="@color/text_body" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="44dp"
|
||||
android:layout_above="@+id/editor_insert_container"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/forum_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@drawable/bg_choose_forum"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/editorTextNumTv"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/forum_icon_view"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:visibility="gone"
|
||||
app:gameIconBorderColor="@color/black_alpha_10"
|
||||
app:gameIconBorderWidth="0.5dp"
|
||||
app:gameIconCornerRadius="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chooseForumTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:drawableRight="@drawable/ic_article_edit_choose_forum_arrow_blue"
|
||||
android:drawablePadding="8dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="选择论坛"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/editorTextNumTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_choose_activity"
|
||||
android:drawablePadding="12dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="参与话题"
|
||||
android:textColor="@color/text_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activityTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableRight="@drawable/ic_forum_arrow_right"
|
||||
android:drawablePadding="4dp"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:gravity="end"
|
||||
android:hint="添加话题标签"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_title"
|
||||
android:textColorHint="@color/text_subtitleDesc"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
android:text="0"
|
||||
android:textColor="@color/text_body"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/forum_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/forum_container"
|
||||
app:layout_constraintTop_toTopOf="@+id/forum_container" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:background="@color/divider" />
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/questionsedit_title"
|
||||
<include
|
||||
android:id="@+id/editor_insert_container"
|
||||
layout="@layout/editor_insert_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:completionThreshold="1"
|
||||
android:dropDownVerticalOffset="1dp"
|
||||
android:hint="写下你想问的问题"
|
||||
android:lineSpacingExtra="8dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:popupBackground="@drawable/question_edit_popup_border"
|
||||
android:text="@={vm.title}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textColorHint="@color/text_body"
|
||||
android:textCursorDrawable="@drawable/cursor_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:background="@color/divider" />
|
||||
|
||||
android:layout_alignParentBottom="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
android:id="@+id/uploadVideoGuideContainer"
|
||||
android:layout_width="264dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.gh.common.view.RichEditor
|
||||
android:id="@+id/rich_editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/editPlaceholder"
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="15dp"
|
||||
android:text="请详细描述你的问题"
|
||||
android:textColor="@color/text_body" />
|
||||
android:src="@drawable/pic_upload_video_guide" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uploadVideoGuideClose"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="8dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:id="@+id/originalTipsContainer"
|
||||
android:layout_width="268dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:src="@drawable/pic_original_pop" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_above="@+id/editor_insert_container"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/forum_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@drawable/bg_choose_forum"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/editorTextNumTv"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/forum_icon_view"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:visibility="gone"
|
||||
app:gameIconBorderColor="@color/black_alpha_10"
|
||||
app:gameIconBorderWidth="0.5dp"
|
||||
app:gameIconCornerRadius="20dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chooseForumTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:drawableRight="@drawable/ic_article_edit_choose_forum_arrow_blue"
|
||||
android:drawablePadding="8dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="选择论坛"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/editorTextNumTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:gravity="end"
|
||||
android:text="0"
|
||||
android:textColor="@color/text_body"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/forum_container"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/forum_container"
|
||||
app:layout_constraintTop_toTopOf="@+id/forum_container" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/editor_insert_container"
|
||||
layout="@layout/editor_insert_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/uploadVideoGuideContainer"
|
||||
android:layout_width="264dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/pic_upload_video_guide" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uploadVideoGuideClose"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="8dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/originalTipsContainer"
|
||||
android:layout_width="268dp"
|
||||
android:layout_height="64dp"
|
||||
<TextView
|
||||
android:id="@+id/originalTipsClose"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/pic_original_pop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/originalTipsClose"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="8dp" />
|
||||
</RelativeLayout>
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="8dp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@ -1,313 +1,274 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/reuse_listview_item_style"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/home_item_padding">
|
||||
|
||||
<data>
|
||||
<TextView
|
||||
android:id="@+id/game_order"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:minWidth="24dp"
|
||||
android:minHeight="24dp"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/selectIv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<import type="android.graphics.Color" />
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/selectIv"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="12dp"
|
||||
android:src="@drawable/selector_ic_simulator"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_order"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameIconView"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<import type="android.text.TextUtils" />
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/gameIconView"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginRight="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/selectIv"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameDescContainer"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<import type="com.gh.common.util.DisplayUtils" />
|
||||
<TextView
|
||||
android:id="@+id/game_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/gameDescContainer"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDescContainer"
|
||||
app:layout_constraintRight_toLeftOf="@+id/recent_played_tag"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameIconView"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="地海争霸:巫妖王再怒" />
|
||||
|
||||
<variable
|
||||
name="briefStyle"
|
||||
type="String" />
|
||||
<TextView
|
||||
android:id="@+id/recent_played_tag"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:background="@drawable/button_round_1affa142"
|
||||
android:gravity="center"
|
||||
android:text="近期玩过"
|
||||
android:textColor="@color/text_F8A142"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_name"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_kaifu_type"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name" />
|
||||
|
||||
<variable
|
||||
name="isShowPlatform"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="isShowSuffix"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="game"
|
||||
type="com.gh.gamecenter.entity.GameEntity" />
|
||||
</data>
|
||||
<TextView
|
||||
android:id="@+id/game_kaifu_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@color/theme"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingBottom="0.5dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/recent_played_tag"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDescContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/gameDescContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/reuse_listview_item_style"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/home_item_padding">
|
||||
app:layout_constraintBottom_toTopOf="@+id/label_list"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameIconView"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_btn"
|
||||
app:layout_constraintTop_toBottomOf="@+id/game_name">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_order"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:minWidth="24dp"
|
||||
android:minHeight="24dp"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/selectIv" />
|
||||
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/selectIv"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="12dp"
|
||||
android:src="@drawable/selector_ic_simulator"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_order"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameIconView" />
|
||||
|
||||
<com.gh.common.view.GameIconView
|
||||
android:layout_marginRight="12dp"
|
||||
android:id="@+id/gameIconView"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
game="@{game}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/selectIv"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameDescContainer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_name"
|
||||
isShowPlatform="@{isShowPlatform}"
|
||||
isShowSuffix="@{isShowSuffix}"
|
||||
setGameName="@{game}"
|
||||
android:id="@+id/game_rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawablePadding="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="地海争霸:巫妖王再怒"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameIconView"
|
||||
app:layout_constraintBottom_toTopOf="@+id/gameDescContainer"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDescContainer"
|
||||
app:layout_constraintRight_toLeftOf="@+id/recent_played_tag"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true" />
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_des"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recent_played_tag"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:background="@drawable/button_round_1affa142"
|
||||
android:gravity="center"
|
||||
android:text="近期玩过"
|
||||
android:textColor="@color/text_F8A142"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_name"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_kaifu_type" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_kaifu_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@color/theme"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingBottom="0.5dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/recent_played_tag"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDescContainer" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/gameDescContainer"
|
||||
android:id="@+id/game_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintBottom_toTopOf="@+id/label_list"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameIconView"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_btn">
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@id/game_rating"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_rating"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="巫妖王再怒霜之哀殤又飢渴" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_speed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_weight="4"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_downloading_formattable"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintHorizontal_weight="4"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_percentage"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_percentage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_percentage"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@+id/download_speed"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/game_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="download_speed,download_percentage" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/game_progressbar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:layout_below="@+id/game_info"
|
||||
android:layout_marginRight="5dp"
|
||||
android:max="1000"
|
||||
android:progress="500"
|
||||
android:progressDrawable="@drawable/progressbar_bg_style"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/download_speed" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/recommendContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/bg_game_item_recommend"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/recommendIv"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_rating"
|
||||
setTextSize="@{game.commentCount > 3?12F:10F}"
|
||||
android:id="@+id/recommendTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableLeft="@{game.commentCount > 3?@drawable/game_horizontal_rating: null}"
|
||||
android:drawablePadding="4dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:gravity="center|start"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingRight="@{game.commentCount > 3?DisplayUtils.dip2px(8F): 0}"
|
||||
android:text="@{game.commentCount > 3?(game.star == 10.0? `10` : game.star + ``): ``}"
|
||||
android:textColor="@{Color.parseColor(game.commentCount > 3?`#1383EB`:`#2496FF`)}"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_des"
|
||||
app:layout_constraintHorizontal_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_toRightOf="@id/game_rating"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:text="@{game.decoratedDes}"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_FF7C1F"
|
||||
android:textSize="10sp"
|
||||
tools:text="巫妖王再怒霜之哀殤又飢渴"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/recommendIv"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_rating" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_speed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_downloading_formattable"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_percentage"
|
||||
app:layout_constraintHorizontal_weight="4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_percentage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_percentage"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintLeft_toRightOf="@+id/download_speed"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintHorizontal_weight="1" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/game_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="download_speed,download_percentage" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/game_progressbar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:layout_below="@+id/game_info"
|
||||
android:layout_marginRight="5dp"
|
||||
android:max="1000"
|
||||
android:progress="500"
|
||||
android:progressDrawable="@drawable/progressbar_bg_style"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/download_speed"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/recommendContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/bg_game_item_recommend"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/recommendIv"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommendTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:gravity="center|start"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_FF7C1F"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/recommendIv"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_goneMarginStart="4dp"
|
||||
tools:text="最新活动火爆来袭" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
app:layout_goneMarginStart="4dp"
|
||||
tools:text="最新活动火爆来袭" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.gh.common.view.GameTagContainerView
|
||||
android:id="@+id/label_list"
|
||||
setGameTags="@{game}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintTop_toBottomOf="@+id/gameDescContainer"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDescContainer"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDescContainer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_btn"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
style="@style/PrimaryGradientButton"
|
||||
android:gravity="center"
|
||||
android:text="@string/download"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameDescContainer"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
||||
<com.gh.common.view.GameTagContainerView
|
||||
android:id="@+id/label_list"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDescContainer"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDescContainer"
|
||||
app:layout_constraintTop_toBottomOf="@+id/gameDescContainer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_btn"
|
||||
style="@style/PrimaryGradientButton"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/download"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameDescContainer"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -1,436 +1,402 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<data>
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/selectIv"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:src="@drawable/selector_ic_history"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<import type="com.gh.common.util.NewsUtils" />
|
||||
|
||||
<import type="com.gh.gamecenter.manager.UserManager" />
|
||||
|
||||
<variable
|
||||
name="entity"
|
||||
type="com.gh.gamecenter.qa.entity.AnswerEntity" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/rightContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/selectIv"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:src="@drawable/selector_ic_history"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:background="@color/white">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/rightContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/content_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
android:paddingLeft="11dp"
|
||||
android:paddingRight="20dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/top_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:background="@color/cutting_line"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_line"
|
||||
tools:text="本名李嘉恆,加拿大籍華人,出生於廣東省廣州,2012年在韓國出道,曾為韓國男子組合EXO成員及中國分隊EXO-M隊長。" />
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/unread_hint"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:background="@drawable/oval_message_hint_bg"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintLeft_toLeftOf="@id/title" />
|
||||
|
||||
<com.gh.common.view.AvatarBorderView
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
app:avatar_width="36dp"
|
||||
app:badge_width="12dp"
|
||||
app:border_color="@color/black_alpha_10"
|
||||
app:border_width="1px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/question_title"
|
||||
tools:layout_height="54dp"
|
||||
tools:layout_width="54dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLength="12"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="14sp"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/timeContainer"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_icon"
|
||||
app:layout_constraintRight_toLeftOf="@+id/user_badge_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/user_icon"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="我的名字很长我的名字很长我的名字很长" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/user_badge_icon"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/user_name"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_name"
|
||||
app:layout_constraintRight_toLeftOf="@+id/user_badge_name"
|
||||
app:layout_constraintTop_toTopOf="@id/user_name"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_badge_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/user_badge_icon"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_badge_icon"
|
||||
app:layout_constraintRight_toLeftOf="@+id/concernBtn"
|
||||
app:layout_constraintTop_toTopOf="@id/user_badge_icon"
|
||||
tools:text="答题先锋答题先锋答题先锋答题先锋答题先锋答题先锋" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/concernBtn"
|
||||
style="@style/PrimaryLightButton"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="28dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/concern"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/user_icon"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/user_icon"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/timeContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/user_icon"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/followedUserTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.6"
|
||||
android:includeFontPadding="false"
|
||||
android:text="关注的人"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="11sp"
|
||||
tools:text=" · 1分钟前 · "
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/statusTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="11sp"
|
||||
tools:text="内容审核中"
|
||||
tools:textColor="@color/theme_green" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_icon"
|
||||
tools:text="本名李嘉恆,加拿大籍華人,出生於廣東省廣州,2012年在韓國出道,曾為韓國男子組合EXO成員及中國分隊EXO-M隊長。" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
tools:text="2012年在韓國出道,曾為韓國男子組合EXO成員及中國分隊EXO-M隊長。2014年解約回國後出演多部電影,開啟其演員生涯。2015年11月,發行首張中文單曲《Bad Girl》,開啟其個人歌手生涯。2016年11月,發行首張英文單曲《JULY》,正式開啟嘻哈音樂之路。" />
|
||||
|
||||
<com.gh.common.view.ImageContainerView
|
||||
android:id="@+id/image_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content"
|
||||
app:offset="40dp" />
|
||||
|
||||
<com.gh.gamecenter.forum.home.ArticleItemVideoView
|
||||
android:id="@+id/horizontalVideoView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintDimensionRatio="w,1:1.78"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content" />
|
||||
|
||||
<com.gh.gamecenter.forum.home.ArticleItemVideoView
|
||||
android:id="@+id/verticalVideoView"
|
||||
android:layout_width="212dp"
|
||||
android:layout_height="282dp"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/content_container"
|
||||
android:layout_width="0dp"
|
||||
android:id="@+id/popularAnswerContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="11dp"
|
||||
android:paddingRight="20dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/top_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:background="@color/cutting_line"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question_title"
|
||||
visibleGone="@{entity.type.equals(`answer`)}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:maxLines="2"
|
||||
android:text="@{entity.questions.title}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/top_line"
|
||||
tools:text="本名李嘉恆,加拿大籍華人,出生於廣東省廣州,2012年在韓國出道,曾為韓國男子組合EXO成員及中國分隊EXO-M隊長。" />
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/unread_hint"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:background="@drawable/oval_message_hint_bg"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintLeft_toLeftOf="@id/title" />
|
||||
|
||||
<com.gh.common.view.AvatarBorderView
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
app:avatar_width="36dp"
|
||||
app:badge_width="12dp"
|
||||
app:border_color="@color/black_alpha_10"
|
||||
app:border_width="1px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/question_title"
|
||||
tools:layout_height="54dp"
|
||||
tools:layout_width="54dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLength="12"
|
||||
android:maxLines="1"
|
||||
android:text="@{entity.user.name}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="14sp"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/timeContainer"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_icon"
|
||||
app:layout_constraintRight_toLeftOf="@+id/user_badge_icon"
|
||||
app:layout_constraintTop_toTopOf="@id/user_icon"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="我的名字很长我的名字很长我的名字很长" />
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/image_container"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/user_badge_icon"
|
||||
imageIcon="@{entity.user.badge.icon}"
|
||||
visibleGone="@{entity.user.badge != null}"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/user_name"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_name"
|
||||
app:layout_constraintRight_toLeftOf="@+id/user_badge_name"
|
||||
app:layout_constraintTop_toTopOf="@id/user_name"
|
||||
tools:visibility="visible" />
|
||||
android:id="@+id/popularAnswerUserIcon"
|
||||
style="@style/frescoCircleStyle"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundingBorderColor="@color/black_alpha_10"
|
||||
app:roundingBorderWidth="0.5dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_badge_name"
|
||||
android:id="@+id/popularAnswerUserName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@{entity.user.badge.name}"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="@id/user_badge_icon"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_badge_icon"
|
||||
app:layout_constraintRight_toLeftOf="@+id/concernBtn"
|
||||
app:layout_constraintTop_toTopOf="@id/user_badge_icon"
|
||||
tools:text="答题先锋答题先锋答题先锋答题先锋答题先锋答题先锋" />
|
||||
android:layout_marginLeft="8dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/popularAnswerUserIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/popularAnswerUserIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/popularAnswerUserIcon"
|
||||
tools:text="原神大佬" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/concernBtn"
|
||||
goneIf="@{entity.me.isFollower || entity.user.id.equals(UserManager.getInstance().getUserId())}"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="28dp"
|
||||
style="@style/PrimaryLightButton"
|
||||
android:gravity="center"
|
||||
android:text="@string/concern"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="回答了问题:"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/user_icon"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/user_icon"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/popularAnswerUserName"
|
||||
app:layout_constraintStart_toEndOf="@+id/popularAnswerUserName"
|
||||
app:layout_constraintTop_toTopOf="@+id/popularAnswerUserName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/popularAnswerContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/popularAnswerUserIcon"
|
||||
tools:text="雷泽是当前版本极具代表性的4星主C角色,其定位为物理输出为主,雷伤输出为辅的物理型" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/content_container">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/forumNameLl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/timeContainer"
|
||||
android:id="@+id/forumNameContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/user_icon"
|
||||
app:layout_constraintLeft_toRightOf="@id/user_icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_name">
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:background="@drawable/bg_shape_f5_radius_999"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginLeft="3dp"
|
||||
app:cardCornerRadius="9dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/forumIcon"
|
||||
style="@style/frescoCircleStyle"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/followedUserTv"
|
||||
goneIf="@{!entity.me.isFollower}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.6"
|
||||
android:includeFontPadding="false"
|
||||
android:text="关注的人"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@{(entity.me.isFollower ? ` · ` : ``) + NewsUtils.getFormattedTime(entity.time) + ((entity.status.equals(`pending`) || entity.status.equals(`fail`)) ? ` · ` : ``)}"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="11sp"
|
||||
tools:text=" · 1分钟前 · "
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/statusTv"
|
||||
visibleGone="@{entity.status.equals(`pending`) || entity.status.equals(`fail`)}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{entity.status.equals(`pending`) ? @string/content_pending_status : @string/fail_status}"
|
||||
android:textColor="@{entity.status.equals(`pending`) ? @color/theme_green : @color/theme_red}"
|
||||
android:textSize="11sp"
|
||||
tools:text="内容审核中"
|
||||
tools:textColor="@color/theme_green" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
goneIf="@{entity.type.equals(`answer`)}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:maxLines="2"
|
||||
android:text="@{(entity.type.contains(`video`))? entity.articleTitle : entity.questions.title}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/user_icon"
|
||||
tools:text="本名李嘉恆,加拿大籍華人,出生於廣東省廣州,2012年在韓國出道,曾為韓國男子組合EXO成員及中國分隊EXO-M隊長。" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:maxLines="2"
|
||||
android:text="@{(entity.type.contains(`video`))? entity.des : entity.brief}"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
tools:text="2012年在韓國出道,曾為韓國男子組合EXO成員及中國分隊EXO-M隊長。2014年解約回國後出演多部電影,開啟其演員生涯。2015年11月,發行首張中文單曲《Bad Girl》,開啟其個人歌手生涯。2016年11月,發行首張英文單曲《JULY》,正式開啟嘻哈音樂之路。" />
|
||||
|
||||
<com.gh.common.view.ImageContainerView
|
||||
android:id="@+id/image_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content"
|
||||
app:offset="40dp" />
|
||||
|
||||
<com.gh.gamecenter.forum.home.ArticleItemVideoView
|
||||
android:id="@+id/horizontalVideoView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintDimensionRatio="w,1:1.78"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content" />
|
||||
|
||||
<com.gh.gamecenter.forum.home.ArticleItemVideoView
|
||||
android:id="@+id/verticalVideoView"
|
||||
android:layout_width="212dp"
|
||||
android:layout_height="282dp"
|
||||
android:layout_marginLeft="9dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/popularAnswerContainer"
|
||||
drawable_radius="@{4}"
|
||||
drawable_solidColor="@{0xFFF5F6F7}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/image_container"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/popularAnswerUserIcon"
|
||||
style="@style/frescoCircleStyle"
|
||||
imageUrl="@{entity.popularAnswer.user.icon}"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundingBorderColor="@color/black_alpha_10"
|
||||
app:roundingBorderWidth="0.5dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/popularAnswerUserName"
|
||||
android:id="@+id/forumNameTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@{entity.popularAnswer.user.name}"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/popularAnswerUserIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/popularAnswerUserIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/popularAnswerUserIcon"
|
||||
tools:text="原神大佬" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="回答了问题:"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/popularAnswerUserName"
|
||||
app:layout_constraintStart_toEndOf="@+id/popularAnswerUserName"
|
||||
app:layout_constraintTop_toTopOf="@+id/popularAnswerUserName" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="@{entity.popularAnswer.brief}"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/popularAnswerUserIcon"
|
||||
tools:text="雷泽是当前版本极具代表性的4星主C角色,其定位为物理输出为主,雷伤输出为辅的物理型" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:textSize="11sp"
|
||||
tools:text="地下城与勇士" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/content_container">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/forumNameLl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/forumNameContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:background="@drawable/bg_shape_f5_radius_999"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginLeft="3dp"
|
||||
app:cardCornerRadius="9dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/forumIcon"
|
||||
style="@style/frescoCircleStyle"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/forumNameTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="@{entity.bbs.name}"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="11sp"
|
||||
tools:text="地下城与勇士" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_select_forum" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_select_forum" />
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/include_vote_and_comment"
|
||||
layout="@layout/piece_community_vote_and_comment"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/content_container" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<include
|
||||
android:id="@+id/include_vote_and_comment"
|
||||
layout="@layout/piece_community_vote_and_comment"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/content_container" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -1,71 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<data>
|
||||
<TextView
|
||||
android:id="@+id/left_link"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/right_link"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="如何更好的识别平台?" />
|
||||
|
||||
<import type="java.util.List" />
|
||||
<TextView
|
||||
android:id="@+id/right_link"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/left_link"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="如何更好的识别平台?" />
|
||||
|
||||
<import type="com.gh.gamecenter.entity.GameEntity.PluginLink" />
|
||||
|
||||
<variable
|
||||
name="clickListener"
|
||||
type="com.gh.base.OnViewClickListener" />
|
||||
|
||||
<variable
|
||||
name="links"
|
||||
type="List<PluginLink>" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/left_link"
|
||||
visibleInvisible="@{links.size > 0}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, links.get(0))}"
|
||||
android:singleLine="true"
|
||||
android:text="@{links.size > 0?links.get(0).title:``}"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp"
|
||||
app:drawable_radius="@{8}"
|
||||
app:drawable_strokeColor="@{0xffeeeeee}"
|
||||
app:drawable_strokeWidth="@{0.5f}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/right_link"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="如何更好的识别平台?" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/right_link"
|
||||
visibleInvisible="@{links.size > 1}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, links.get(1))}"
|
||||
android:singleLine="true"
|
||||
android:text="@{links.size > 1?links.get(1).title:``}"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp"
|
||||
android:visibility="invisible"
|
||||
app:drawable_radius="@{8}"
|
||||
app:drawable_strokeColor="@{0xffeeeeee}"
|
||||
app:drawable_strokeWidth="@{0.5f}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/left_link"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="如何更好的识别平台?" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -1,143 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<data>
|
||||
<include
|
||||
android:id="@+id/includedAnswerItem"
|
||||
layout="@layout/community_answer_item"
|
||||
android:visibility="gone" />
|
||||
|
||||
<variable
|
||||
name="entity"
|
||||
type="com.gh.gamecenter.qa.entity.AnswerEntity" />
|
||||
|
||||
<import type="com.gh.common.util.TimeUtils" />
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/normalContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<include
|
||||
android:visibility="gone"
|
||||
android:id="@+id/includedAnswerItem"
|
||||
layout="@layout/community_answer_item" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/normalContainer"
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:ellipsize="end"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/image"
|
||||
tools:text="雷泽是当前版本极具代表性的4星主C角色,其定位为物理输出为主,雷泽是当前版本极具代表性的4星主C角色" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title"
|
||||
tools:text="雷泽是当前版本极具代表性的4星主C角色,其定位为物理输出为主,雷泽是当前版本极具代表性的4星主C角色" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/image"
|
||||
style="@style/frescoStyle"
|
||||
android:layout_width="106dp"
|
||||
android:layout_height="80dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundWithOverlayColor="@color/white"
|
||||
app:roundedCornerRadius="4dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playIv"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/community_video_play_icon"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/image"
|
||||
app:layout_constraintStart_toStartOf="@+id/image"
|
||||
app:layout_constraintTop_toTopOf="@+id/image"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/durationTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/image" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingRight="20dp">
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/image"
|
||||
tools:text="雷泽是当前版本极具代表性的4星主C角色,其定位为物理输出为主,雷泽是当前版本极具代表性的4星主C角色" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/image"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title"
|
||||
tools:text="雷泽是当前版本极具代表性的4星主C角色,其定位为物理输出为主,雷泽是当前版本极具代表性的4星主C角色" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/image"
|
||||
style="@style/frescoStyle"
|
||||
android:layout_width="106dp"
|
||||
android:layout_height="80dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:roundedCornerRadius="4dp"
|
||||
app:roundWithOverlayColor="@color/white"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
visibleGone="@{entity.passVideos.size()>0}"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/community_video_play_icon"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/image"
|
||||
app:layout_constraintStart_toStartOf="@+id/image"
|
||||
app:layout_constraintTop_toTopOf="@+id/image"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
drawable_radius="@{2}"
|
||||
drawable_solidColor="@{0x99000000}"
|
||||
visibleGone="@{entity.passVideos.size()>0}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="3dp"
|
||||
android:text="@{entity.passVideos.size()>0?entity.passVideos.get(0).duration:`00:00`}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/image" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/countTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{entity.count.comment +`评论 · `+entity.count.vote+`点赞`}"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="11sp" />
|
||||
<TextView
|
||||
android:id="@+id/timeTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="11sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@{TimeUtils.getFormatTime(entity.time,`yyyy-MM-dd`)}"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="11sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!--<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@color/text_f5f5f5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/timeTv" />-->
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
<!--<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@color/text_f5f5f5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/timeTv" />-->
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@ -1,221 +1,220 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<include layout="@layout/reuse_toolbar" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="快递公司全面复工:三通一达等均已全网恢复正常运营" />
|
||||
|
||||
<include layout="@layout/reuse_toolbar" />
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question_title"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="6dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="快递公司全面复工:三通一达等均已全网恢复正常运营" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/white"
|
||||
android:gravity="center"
|
||||
app:layout_behavior="com.gh.common.view.FixAppBarLayoutBehavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
|
||||
|
||||
<com.gh.common.view.ExpandAndCloseTextView
|
||||
android:id="@+id/question_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="14sp"
|
||||
tools:text="国家邮政局召开部分快递企业专题电话会议。国家邮政局局党组书记、局长马军胜主持召开专题电话会议,向中通、圆通、申通、韵达、百世" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/question_images_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/question_images_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:roundedCornerRadius="3dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/video_play"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/community_video_play_icon"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/question_video_status_gradient"
|
||||
android:gravity="center"
|
||||
android:text="继续上传"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/question_images_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_weight="1"
|
||||
app:roundedCornerRadius="3dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/question_images_3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:roundedCornerRadius="3dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/question_images_3_mask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#80000000"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question_images_3_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/all_white"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
android:background="@android:color/white"
|
||||
android:gravity="center"
|
||||
app:layout_behavior="com.gh.common.view.FixAppBarLayoutBehavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
|
||||
|
||||
<View
|
||||
android:id="@+id/answer_edit_line2"
|
||||
<com.gh.common.view.ExpandAndCloseTextView
|
||||
android:id="@+id/question_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/divider" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="14sp"
|
||||
tools:text="国家邮政局召开部分快递企业专题电话会议。国家邮政局局党组书记、局长马军胜主持召开专题电话会议,向中通、圆通、申通、韵达、百世" />
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/question_images_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<com.gh.common.view.NestedScrollRichEditor
|
||||
android:id="@+id/rich_editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/answer_placeholder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="15dp"
|
||||
android:text="@string/answer_placeholder"
|
||||
android:textColor="@color/hint" />
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/question_images_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:roundedCornerRadius="3dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/video_play"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/community_video_play_icon"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/question_video_status_gradient"
|
||||
android:gravity="center"
|
||||
android:text="继续上传"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/video_duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/question_images_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_weight="1"
|
||||
app:roundedCornerRadius="3dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/question_images_3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:roundedCornerRadius="3dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/question_images_3_mask"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#80000000"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question_images_3_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/all_white"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
<TextView
|
||||
android:id="@+id/editorTextNumTv"
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
android:gravity="end"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginRight="20dp"/>
|
||||
<View
|
||||
android:id="@+id/answer_edit_line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:background="@color/cutting_line" />
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<include layout="@layout/editor_insert_container" />
|
||||
<View
|
||||
android:id="@+id/answer_edit_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/divider" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.gh.common.view.NestedScrollRichEditor
|
||||
android:id="@+id/rich_editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/answer_placeholder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="15dp"
|
||||
android:text="@string/answer_placeholder"
|
||||
android:textColor="@color/hint" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/editorTextNumTv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="end"
|
||||
android:text="0"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/answer_edit_line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/cutting_line"
|
||||
android:background="@color/cutting_line" />
|
||||
|
||||
<include layout="@layout/editor_insert_container" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -1,64 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true">
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.gh.gamecenter.baselist.LoadStatus" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="loadStatus"
|
||||
type="com.gh.gamecenter.baselist.LoadStatus" />
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/game_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/game_refresh"
|
||||
isRefreshing="@{loadStatus}"
|
||||
visibleGone="@{loadStatus == LoadStatus.INIT_FAILED? false: true}"
|
||||
<com.gh.common.view.TouchSlopRecyclerView
|
||||
android:id="@+id/game_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.gh.common.view.TouchSlopRecyclerView
|
||||
android:id="@+id/game_list"
|
||||
visibleGone="@{loadStatus == LoadStatus.INIT_LOADING? false: true}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/reuse_no_connection"
|
||||
layout="@layout/reuse_no_connection"
|
||||
visibleGone="@{loadStatus == LoadStatus.INIT_FAILED? true: false}" />
|
||||
|
||||
<include
|
||||
android:id="@+id/reuse_loading"
|
||||
layout="@layout/reuse_loading"
|
||||
visibleGone="@{loadStatus == LoadStatus.INIT_LOADING? true: false}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true" />
|
||||
android:background="@color/white"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/replace_data_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="14dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:src="@drawable/game_block_refresh_selector"
|
||||
android:visibility="gone" />
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
<include
|
||||
android:id="@+id/reuse_no_connection"
|
||||
layout="@layout/reuse_no_connection" />
|
||||
|
||||
<include
|
||||
android:id="@+id/reuse_loading"
|
||||
layout="@layout/reuse_loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/replace_data_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="14dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:src="@drawable/game_block_refresh_selector"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -1,172 +1,152 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@color/black_alpha_30">
|
||||
|
||||
<data>
|
||||
<import type="android.text.TextUtils" />
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/poster"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:actualImageScaleType="centerCrop"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:viewAspectRatio="1.395" />
|
||||
|
||||
<import type="com.gh.gamecenter.manager.UserManager" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/game_collection_detail_poster_mask"
|
||||
app:layout_constraintDimensionRatio="h,360:258"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<variable
|
||||
name="entity"
|
||||
type="com.gh.gamecenter.entity.GamesCollectionDetailEntity" />
|
||||
|
||||
<variable
|
||||
name="isLogin"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<com.gh.common.view.StatusBarView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@color/black_alpha_30">
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/poster"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="centerCrop"
|
||||
imageUrl="@{entity.cover}"
|
||||
app:actualImageScaleType="centerCrop"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:viewAspectRatio="1.395" />
|
||||
<TextView
|
||||
android:id="@+id/nameTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="94dp"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="2dp"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tagIv"
|
||||
tools:text="MOBA 手游集合,绝不氪金 5V5 公平对战" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/game_collection_detail_poster_mask"
|
||||
app:layout_constraintDimensionRatio="h,360:258"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageView
|
||||
android:id="@+id/tagIv"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginRight="16dp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/nameTv"
|
||||
tools:src="@drawable/ic_official_big" />
|
||||
|
||||
<com.gh.common.view.StatusBarView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/imageItemDesTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/ic_game_collection_des"
|
||||
android:drawablePadding="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white_alpha_80"
|
||||
android:textSize="12sp"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv"
|
||||
app:layout_constraintRight_toRightOf="@+id/nameTv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/nameTv"
|
||||
tools:text="眼花缭乱的众多游戏~" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="94dp"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="2"
|
||||
android:lineSpacingExtra="2dp"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
android:textSize="22sp"
|
||||
android:text="@{entity.title}"
|
||||
tools:text="MOBA 手游集合,绝不氪金 5V5 公平对战"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tagIv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
<LinearLayout
|
||||
android:id="@+id/imageItemUserContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/button_round_black_alpha_60"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="1dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv">
|
||||
|
||||
<ImageView
|
||||
goneIf="@{TextUtils.isEmpty(entity.stamp)}"
|
||||
android:id="@+id/tagIv"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginRight="16dp"
|
||||
tools:src="@drawable/ic_official_big"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/nameTv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/imageItemDesTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="8dp"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:drawableLeft="@drawable/ic_game_collection_des"
|
||||
android:drawablePadding="4dp"
|
||||
android:textColor="@color/white_alpha_80"
|
||||
android:textSize="12sp"
|
||||
tools:text="眼花缭乱的众多游戏~"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv"
|
||||
app:layout_constraintRight_toRightOf="@+id/nameTv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/nameTv" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/imageItemUserContainer"
|
||||
<com.gh.common.view.AvatarBorderView
|
||||
android:id="@+id/userIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingLeft="1dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/button_round_black_alpha_60"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<com.gh.common.view.AvatarBorderView
|
||||
android:id="@+id/userIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:avatar_width="22dp"
|
||||
app:badge_width="8dp"
|
||||
app:border_width="0dp"
|
||||
app:border_ratio="1"
|
||||
tools:layout_height="22dp"
|
||||
tools:layout_width="22dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/white_alpha_80"
|
||||
android:textSize="12sp"
|
||||
android:text="@{entity.user.name}"
|
||||
tools:text="测试用户名" />
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
app:avatar_width="22dp"
|
||||
app:badge_width="8dp"
|
||||
app:border_ratio="1"
|
||||
app:border_width="0dp"
|
||||
tools:layout_height="22dp"
|
||||
tools:layout_width="22dp" />
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/imageItemFollowTv"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/button_round_black_alpha_60"
|
||||
android:id="@+id/userNameTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/white_alpha_80"
|
||||
android:textSize="12sp"
|
||||
android:text="关注"
|
||||
app:layout_constraintLeft_toRightOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageItemUserContainer" />
|
||||
tools:text="测试用户名" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/imageItemFollowedTv"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/button_round_black_alpha_60"
|
||||
android:textColor="@color/white_alpha_40"
|
||||
android:textSize="12sp"
|
||||
android:text="已关注"
|
||||
app:layout_constraintLeft_toRightOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageItemUserContainer" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
<TextView
|
||||
android:id="@+id/imageItemFollowTv"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/button_round_black_alpha_60"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:text="关注"
|
||||
android:textColor="@color/white_alpha_80"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintLeft_toRightOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageItemUserContainer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/imageItemFollowedTv"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@drawable/button_round_black_alpha_60"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:text="已关注"
|
||||
android:textColor="@color/white_alpha_40"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintLeft_toRightOf="@+id/imageItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/imageItemUserContainer" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -1,159 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<data>
|
||||
<import type="android.text.TextUtils" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.gh.gamecenter.gamecollection.detail.GameCollectionVideoView
|
||||
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>
|
||||
|
||||
<import type="com.gh.gamecenter.manager.UserManager" />
|
||||
|
||||
<variable
|
||||
name="entity"
|
||||
type="com.gh.gamecenter.entity.GamesCollectionDetailEntity" />
|
||||
|
||||
<variable
|
||||
name="isLogin"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:background="@drawable/bg_game_collection_video_item">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.gh.gamecenter.gamecollection.detail.GameCollectionVideoView
|
||||
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>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/nameTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:background="@drawable/bg_game_collection_video_item">
|
||||
android:layout_marginLeft="17dp"
|
||||
android:layout_marginRight="29dp"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="2"
|
||||
android:lineSpacingExtra="2dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
tools:text="MOBA 手游集合,绝不氪金 5V5 公平对战"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tagIv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="17dp"
|
||||
android:layout_marginRight="29dp"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="2"
|
||||
android:lineSpacingExtra="2dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textStyle="bold"
|
||||
android:textSize="20sp"
|
||||
android:text="@{entity.title}"
|
||||
tools:text="MOBA 手游集合,绝不氪金 5V5 公平对战"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tagIv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageView
|
||||
android:id="@+id/tagIv"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginRight="16dp"
|
||||
tools:src="@drawable/ic_official_big"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/nameTv" />
|
||||
|
||||
<ImageView
|
||||
goneIf="@{TextUtils.isEmpty(entity.stamp)}"
|
||||
android:id="@+id/tagIv"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginRight="16dp"
|
||||
tools:src="@drawable/ic_official_big"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/nameTv" />
|
||||
<TextView
|
||||
android:id="@+id/videoItemDesTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="12dp"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:drawableLeft="@drawable/ic_game_collection_des_gray"
|
||||
android:drawablePadding="4dp"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
tools:text="眼花缭乱的众多游戏~"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv"
|
||||
app:layout_constraintRight_toRightOf="@+id/nameTv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/nameTv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/videoItemDesTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="12dp"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:drawableLeft="@drawable/ic_game_collection_des_gray"
|
||||
android:drawablePadding="4dp"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
tools:text="眼花缭乱的众多游戏~"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv"
|
||||
app:layout_constraintRight_toRightOf="@+id/nameTv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/nameTv" />
|
||||
<LinearLayout
|
||||
android:id="@+id/videoItemUserContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/videoItemDesTv">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/videoItemUserContainer"
|
||||
<com.gh.common.view.AvatarBorderView
|
||||
android:id="@+id/userIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/nameTv"
|
||||
app:layout_constraintTop_toBottomOf="@+id/videoItemDesTv">
|
||||
|
||||
<com.gh.common.view.AvatarBorderView
|
||||
android:id="@+id/userIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:avatar_width="24dp"
|
||||
app:badge_width="8dp"
|
||||
app:border_width="0dp"
|
||||
app:border_ratio="1"
|
||||
tools:layout_height="24dp"
|
||||
tools:layout_width="24dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="12sp"
|
||||
android:text="@{entity.user.name}"
|
||||
tools:text="测试用户名" />
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
app:avatar_width="24dp"
|
||||
app:badge_width="8dp"
|
||||
app:border_width="0dp"
|
||||
app:border_ratio="1"
|
||||
tools:layout_height="24dp"
|
||||
tools:layout_width="24dp" />
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/videoItemFollowTv"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/button_round_2496ff_alpha_8"
|
||||
android:textColor="@color/theme_font"
|
||||
android:id="@+id/userNameTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/text_subtitle"
|
||||
android:textSize="12sp"
|
||||
android:text="关注"
|
||||
app:layout_constraintLeft_toRightOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/videoItemUserContainer" />
|
||||
tools:text="测试用户名" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/videoItemFollowedTv"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/button_round_black_alpha_5"
|
||||
android:textColor="@color/black_alpha_20"
|
||||
android:textSize="12sp"
|
||||
android:text="已关注"
|
||||
app:layout_constraintLeft_toRightOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/videoItemUserContainer" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/videoItemFollowTv"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/button_round_2496ff_alpha_8"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="12sp"
|
||||
android:text="关注"
|
||||
app:layout_constraintLeft_toRightOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/videoItemUserContainer" />
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/videoItemFollowedTv"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingRight="12dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/button_round_black_alpha_5"
|
||||
android:textColor="@color/black_alpha_20"
|
||||
android:textSize="12sp"
|
||||
android:text="已关注"
|
||||
app:layout_constraintLeft_toRightOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintTop_toTopOf="@+id/videoItemUserContainer"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/videoItemUserContainer" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
@ -1,48 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<data>
|
||||
<import type="android.text.TextUtils" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:background="@drawable/reuse_listview_item_style">
|
||||
|
||||
<variable
|
||||
name="game"
|
||||
type="com.gh.gamecenter.entity.GameEntity" />
|
||||
</data>
|
||||
<include
|
||||
android:id="@+id/game_item_included"
|
||||
layout="@layout/game_item" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/recommendTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:background="@drawable/reuse_listview_item_style">
|
||||
|
||||
<include
|
||||
android:id="@+id/game_item_included"
|
||||
layout="@layout/game_item" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommendTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:includeFontPadding="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="3"
|
||||
android:background="@drawable/bg_shape_f8_radius_8"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
tools:text="跑跑卡丁车的手游版作为一部致敬经典的作品,在人物和地图上都有基本还原端游,但是手感有些区别"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/game_item_included"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
android:layout_marginTop="12dp"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:includeFontPadding="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="3"
|
||||
android:background="@drawable/bg_shape_f8_radius_8"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="12sp"
|
||||
tools:text="跑跑卡丁车的手游版作为一部致敬经典的作品,在人物和地图上都有基本还原端游,但是手感有些区别"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/game_item_included"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -1,114 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fresco="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.text.TextUtils" />
|
||||
|
||||
<variable
|
||||
name="game"
|
||||
type="com.gh.gamecenter.entity.GameEntity" />
|
||||
|
||||
<variable
|
||||
name="traceEvent"
|
||||
type="com.gh.common.exposure.ExposureEvent" />
|
||||
|
||||
<variable
|
||||
name="downloadClickCallBack"
|
||||
type="android.view.View.OnClickListener" />
|
||||
|
||||
<variable
|
||||
name="entrance"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:fresco="http://schemas.android.com/apk/res-auto"
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/game_image_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
fresco:actualImageScaleType="centerCrop"
|
||||
fresco:backgroundImage="@color/placeholder_bg"
|
||||
fresco:fadeDuration="500"
|
||||
fresco:layout_constraintLeft_toLeftOf="parent"
|
||||
fresco:layout_constraintTop_toTopOf="parent"
|
||||
fresco:placeholderImage="@drawable/preload"
|
||||
fresco:pressedStateOverlayImage="@color/pressed_bg"
|
||||
fresco:viewAspectRatio="2.14" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/game_image_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
fresco:actualImageScaleType="centerCrop"
|
||||
fresco:backgroundImage="@color/placeholder_bg"
|
||||
fresco:fadeDuration="500"
|
||||
fresco:layout_constraintLeft_toLeftOf="parent"
|
||||
fresco:layout_constraintTop_toTopOf="parent"
|
||||
fresco:placeholderImage="@drawable/preload"
|
||||
fresco:pressedStateOverlayImage="@color/pressed_bg"
|
||||
fresco:viewAspectRatio="2.14" />
|
||||
<LinearLayout
|
||||
android:id="@+id/game_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
fresco:layout_constraintBottom_toBottomOf="@id/game_image_icon"
|
||||
fresco:layout_constraintRight_toRightOf="parent"
|
||||
fresco:layout_constraintTop_toTopOf="@id/game_image_icon">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/game_container"
|
||||
visibleGone="@{game.type.equals(`game`) && game.apk.size>0}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
fresco:layout_constraintBottom_toBottomOf="@id/game_image_icon"
|
||||
fresco:layout_constraintRight_toRightOf="parent"
|
||||
fresco:layout_constraintTop_toTopOf="@id/game_image_icon">
|
||||
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/game_icon"
|
||||
game="@{game}"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginRight="40dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@{game.name}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:text="@{game.apk.size>0? game.apk.get(0).size:``}"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<com.gh.common.view.DownloadProgressBar
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
clickCallBack="@{downloadClickCallBack}"
|
||||
downloadButton="@{game}"
|
||||
entrance="@{entrance}"
|
||||
location="@{``}"
|
||||
traceEvent="@{traceEvent}"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="7dp"
|
||||
app:downloadStyle="2"
|
||||
app:textSize="11sp" />
|
||||
|
||||
</LinearLayout>
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/game_icon"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginRight="40dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_des"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/game_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/game_image_icon"
|
||||
android:background="@android:color/white"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="13dp"
|
||||
android:paddingBottom="13dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
fresco:layout_constraintLeft_toLeftOf="parent"
|
||||
fresco:layout_constraintRight_toRightOf="parent"
|
||||
fresco:layout_constraintTop_toBottomOf="@id/game_image_icon" />
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
<TextView
|
||||
android:id="@+id/game_size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="1dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<com.gh.common.view.DownloadProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginTop="7dp"
|
||||
app:downloadStyle="2"
|
||||
app:textSize="11sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_des"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/game_image_icon"
|
||||
android:background="@android:color/white"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="13dp"
|
||||
android:paddingBottom="13dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
fresco:layout_constraintLeft_toLeftOf="parent"
|
||||
fresco:layout_constraintRight_toRightOf="parent"
|
||||
fresco:layout_constraintTop_toBottomOf="@id/game_image_icon" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -1,343 +1,303 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/reuse_listview_item_style"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/home_item_padding">
|
||||
|
||||
<data>
|
||||
<TextView
|
||||
android:id="@+id/game_order"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:minWidth="24dp"
|
||||
android:minHeight="24dp"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/selectIv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<import type="android.graphics.Color" />
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/selectIv"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="12dp"
|
||||
android:src="@drawable/selector_ic_simulator"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_order"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameIconView"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<import type="android.text.TextUtils" />
|
||||
<com.gh.common.view.GameIconView
|
||||
android:id="@+id/gameIconView"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginRight="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/selectIv"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<import type="com.gh.common.util.DisplayUtils" />
|
||||
<TextView
|
||||
android:id="@+id/game_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toLeftOf="@+id/recent_played_tag"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameIconView"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="地海争霸:巫妖王再怒" />
|
||||
|
||||
<variable
|
||||
name="briefStyle"
|
||||
type="String" />
|
||||
<TextView
|
||||
android:id="@+id/recent_played_tag"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:background="@drawable/button_round_1affa142"
|
||||
android:gravity="center"
|
||||
android:text="近期玩过"
|
||||
android:textColor="@color/text_F8A142"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_name"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_kaifu_type"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name" />
|
||||
|
||||
<variable
|
||||
name="isShowPlatform"
|
||||
type="Boolean" />
|
||||
<TextView
|
||||
android:id="@+id/game_kaifu_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@color/theme"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingBottom="0.5dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/recent_played_tag"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name" />
|
||||
|
||||
<variable
|
||||
name="isShowSuffix"
|
||||
type="Boolean" />
|
||||
<Space
|
||||
android:id="@+id/gameDesSpace"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="28dp"
|
||||
android:background="@color/black"
|
||||
app:layout_constraintBottom_toTopOf="@+id/label_list"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameIconView"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_btn"
|
||||
app:layout_constraintTop_toBottomOf="@+id/game_name" />
|
||||
|
||||
<variable
|
||||
name="game"
|
||||
type="com.gh.gamecenter.entity.GameEntity" />
|
||||
</data>
|
||||
<TextView
|
||||
android:id="@+id/game_rating"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawablePadding="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_des"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_rating"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace"
|
||||
tools:text="巫妖王再怒霜之哀殤又飢渴" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_speed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_downloading_formattable"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintHorizontal_weight="4"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_percentage"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_percentage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_percentage"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintLeft_toRightOf="@+id/download_speed"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/game_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="download_speed,download_percentage" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/game_progressbar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:max="1000"
|
||||
android:progress="500"
|
||||
android:progressDrawable="@drawable/progressbar_bg_style"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toBottomOf="@+id/download_speed" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/reuse_listview_item_style"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/home_item_padding">
|
||||
android:id="@+id/recommendContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/bg_game_item_recommend"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/recommendIv"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_order"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:gravity="center"
|
||||
android:minWidth="24dp"
|
||||
android:minHeight="24dp"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/selectIv" />
|
||||
|
||||
<com.lightgame.view.CheckableImageView
|
||||
android:id="@+id/selectIv"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="12dp"
|
||||
android:src="@drawable/selector_ic_simulator"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_order"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameIconView" />
|
||||
|
||||
<com.gh.common.view.GameIconView
|
||||
android:layout_marginRight="12dp"
|
||||
android:id="@+id/gameIconView"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
game="@{game}"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/selectIv"
|
||||
app:layout_constraintRight_toLeftOf="@+id/gameDesSpace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_name"
|
||||
isShowPlatform="@{isShowPlatform}"
|
||||
isShowSuffix="@{isShowSuffix}"
|
||||
setGameName="@{game}"
|
||||
android:id="@+id/recommendTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:gravity="center|start"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="地海争霸:巫妖王再怒"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameIconView"
|
||||
app:layout_constraintBottom_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toLeftOf="@+id/recent_played_tag"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recent_played_tag"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:background="@drawable/button_round_1affa142"
|
||||
android:gravity="center"
|
||||
android:text="近期玩过"
|
||||
android:textColor="@color/text_F8A142"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_name"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_kaifu_type" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_kaifu_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:background="@color/theme"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingBottom="0.5dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="@+id/game_name"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/recent_played_tag"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace" />
|
||||
|
||||
<Space
|
||||
android:id="@+id/gameDesSpace"
|
||||
android:background="@color/black"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="28dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/game_name"
|
||||
app:layout_constraintBottom_toTopOf="@+id/label_list"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameIconView"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_btn" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_rating"
|
||||
setTextSize="@{game.commentCount > 3?12F:10F}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableLeft="@{game.commentCount > 3?@drawable/game_horizontal_rating: null}"
|
||||
android:drawablePadding="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingRight="@{game.commentCount > 3?DisplayUtils.dip2px(8F): 0}"
|
||||
android:text="@{game.commentCount > 3?(game.star == 10.0? `10` : game.star + ``): ``}"
|
||||
android:textColor="@{Color.parseColor(game.commentCount > 3?`#1383EB`:`#2496FF`)}"
|
||||
android:textColor="@color/text_FF7C1F"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toLeftOf="@+id/game_des"
|
||||
app:layout_constraintHorizontal_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_des"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:singleLine="true"
|
||||
android:text="@{game.decoratedDes}"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="10sp"
|
||||
tools:text="巫妖王再怒霜之哀殤又飢渴"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintLeft_toRightOf="@+id/game_rating"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_speed"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_downloading_formattable"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toLeftOf="@+id/download_percentage"
|
||||
app:layout_constraintHorizontal_weight="4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_percentage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:text="@string/game_percentage"
|
||||
android:textColor="@color/theme_font"
|
||||
android:textSize="9sp"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintBottom_toTopOf="@+id/game_progressbar"
|
||||
app:layout_constraintLeft_toRightOf="@+id/download_speed"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintHorizontal_weight="1" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/game_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="download_speed,download_percentage" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/game_progressbar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:max="1000"
|
||||
android:progress="500"
|
||||
android:progressDrawable="@drawable/progressbar_bg_style"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/download_speed"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintHorizontal_bias="0" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/recommendContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/bg_game_item_recommend"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintHorizontal_bias="0">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/recommendIv"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommendTv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:gravity="center|start"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_FF7C1F"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/recommendIv"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_goneMarginStart="4dp"
|
||||
tools:text="最新活动火爆来袭" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommendStarPref"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="10sp"
|
||||
android:text="推荐指数:"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gameDesSpace" />
|
||||
|
||||
<com.gh.common.view.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/recommendStar"
|
||||
style="@style/Widget.MaterialRatingBar.RatingBar"
|
||||
android:layout_width="84dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:isIndicator="true"
|
||||
android:minWidth="12dp"
|
||||
android:minHeight="12dp"
|
||||
android:numStars="5"
|
||||
android:rating="@{game.recommendStar}"
|
||||
tools:rating="3"
|
||||
app:mrb_progressTint="@color/theme"
|
||||
app:layout_constraintLeft_toRightOf="@+id/recommendStarPref"
|
||||
app:layout_constraintTop_toTopOf="@+id/recommendStarPref"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/recommendStarPref" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/recommendStarInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="recommendStarPref,recommendStar" />
|
||||
|
||||
<com.gh.common.view.GameTagContainerView
|
||||
android:id="@+id/label_list"
|
||||
setGameTags="@{game}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintTop_toBottomOf="@+id/gameDesSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_btn"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="28.5dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
style="@style/PrimaryGradientButton"
|
||||
android:gravity="center"
|
||||
android:text="@string/download"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/recommendIv"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_goneMarginStart="4dp"
|
||||
tools:text="最新活动火爆来袭" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/recommendStarPref"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:text="推荐指数:"
|
||||
android:textColor="@color/text_subtitleDesc"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gameDesSpace"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toTopOf="@+id/gameDesSpace" />
|
||||
|
||||
<com.gh.common.view.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/recommendStar"
|
||||
style="@style/Widget.MaterialRatingBar.RatingBar"
|
||||
android:layout_width="84dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:isIndicator="true"
|
||||
android:minWidth="12dp"
|
||||
android:minHeight="12dp"
|
||||
android:numStars="5"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/recommendStarPref"
|
||||
app:layout_constraintLeft_toRightOf="@+id/recommendStarPref"
|
||||
app:layout_constraintTop_toTopOf="@+id/recommendStarPref"
|
||||
app:mrb_progressTint="@color/theme"
|
||||
tools:rating="3" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/recommendStarInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="recommendStarPref,recommendStar" />
|
||||
|
||||
<com.gh.common.view.GameTagContainerView
|
||||
android:id="@+id/label_list"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/gameIconView"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintTop_toBottomOf="@+id/gameDesSpace" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_btn"
|
||||
style="@style/PrimaryGradientButton"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="28.5dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/download"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/gameDesSpace"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -1,228 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fresco="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!-- w:h=16:10.5 -->
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.gh.common.constant.Config" />
|
||||
|
||||
<import type="java.util.List" />
|
||||
|
||||
<import type="com.gh.gamecenter.entity.SubjectRecommendEntity" />
|
||||
|
||||
<variable
|
||||
name="clickListener"
|
||||
type="com.gh.base.OnViewClickListener" />
|
||||
|
||||
<variable
|
||||
name="list"
|
||||
type="List<SubjectRecommendEntity>" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fresco="http://schemas.android.com/apk/res-auto"
|
||||
<!-- w:h=16:7 -->
|
||||
<com.lightgame.view.scale.ScaleFrameLayout
|
||||
android:id="@+id/viewpager_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<!-- w:h=16:10.5 -->
|
||||
android:visibility="visible"
|
||||
app:fractionValue="0.4375"
|
||||
app:measureBy="width">
|
||||
|
||||
<!-- w:h=16:7 -->
|
||||
<com.lightgame.view.scale.ScaleFrameLayout
|
||||
android:id="@+id/viewpager_container"
|
||||
<com.gh.common.view.autoscrollviewpager.AutoScrollViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
app:fractionValue="0.4375"
|
||||
app:measureBy="width">
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.gh.common.view.autoscrollviewpager.AutoScrollViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
<LinearLayout
|
||||
android:id="@+id/viewpager_ll_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="6dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewpager_tv_failure"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/tap_to_reload"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</com.lightgame.view.scale.ScaleFrameLayout>
|
||||
|
||||
<!-- 16:3.5 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/entrance_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@android:color/white"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="14dp"
|
||||
android:visibility="visible"
|
||||
app:measureBy="width">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_subject_failure"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="@string/tap_to_reload"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_subject_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/viewpager_ll_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="6dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/viewpager_tv_failure"
|
||||
visibleGone="@{list == null? true: false,default = false}"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/entrance_container1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, null)}"
|
||||
android:text="@string/tap_to_reload"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
android:orientation="vertical">
|
||||
|
||||
</com.lightgame.view.scale.ScaleFrameLayout>
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/entrance_icon1"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<!-- 16:3.5 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/entrance_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@android:color/white"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="14dp"
|
||||
android:visibility="visible"
|
||||
app:measureBy="width">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_subject_failure"
|
||||
visibleGone="@{list == null? true: false,default = false}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, null)}"
|
||||
android:text="@string/tap_to_reload"
|
||||
android:textColor="@color/title"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_subject_ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 0)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
imageUrl="@{list.size > 0?list.get(0).icon:``}"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:text="@{list.size > 0?(Config.isShowPlugin()? list.get(0).name:list.get(0).nameNormal):`推荐入口`}"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 1)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
imageUrl="@{list.size > 1?list.get(1).icon:`插件`}"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:text="@{list.size > 1?(Config.isShowPlugin()? list.get(1).name:list.get(1).nameNormal):`推荐入口`}"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 2)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
imageUrl="@{list.size > 2?list.get(2).icon:``}"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:text="@{list.size > 2?(Config.isShowPlugin()? list.get(2).name:list.get(2).nameNormal):`推荐入口`}"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 3)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
imageUrl="@{list.size > 3?list.get(3).icon:``}"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:text="@{list.size > 3?(Config.isShowPlugin()? list.get(3).name:list.get(3).nameNormal):`推荐入口`}"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/entrance_container5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 4)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/entrance_icon5"
|
||||
imageUrl="@{list.size > 4?list.get(4).icon:``}"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/entrance_name5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:text="@{list.size > 4?(Config.isShowPlugin()? list.get(4).name:list.get(4).nameNormal):`推荐入口`}"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/entrance_name1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/entrance_container2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/entrance_icon2"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/entrance_name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/entrance_container3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/entrance_icon3"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/entrance_name3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/entrance_container4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/entrance_icon4"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/entrance_name4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/entrance_container5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/entrance_icon5"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/home_subject_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/entrance_name5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_3a3a3a"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -1,179 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="java.util.List" />
|
||||
|
||||
<import type="com.gh.gamecenter.entity.HomeRecommend" />
|
||||
|
||||
<variable
|
||||
name="list"
|
||||
type="List<HomeRecommend>" />
|
||||
|
||||
<variable
|
||||
name="clickListener"
|
||||
type="com.gh.base.OnViewClickListener" />
|
||||
</data>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
<LinearLayout
|
||||
android:id="@+id/containerOne"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="12dp">
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
visibleGone="@{list.size > 0}"
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iconIvOne"
|
||||
style="@style/frescoStyle"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTvOne"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 0)}"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
style="@style/frescoStyle"
|
||||
imageUrl="@{list.size > 0?list.get(0).icon:``}"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@{list.size > 0?list.get(0).name:`推荐入口`}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
visibleGone="@{list.size > 1}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
visibleGone="@{list.size > 1}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 1)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
style="@style/frescoStyle"
|
||||
imageUrl="@{list.size > 1?list.get(1).icon:``}"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@{list.size > 1?list.get(1).name:`推荐入口`}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
visibleGone="@{list.size > 2}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
visibleGone="@{list.size > 2}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 2)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
style="@style/frescoStyle"
|
||||
imageUrl="@{list.size > 2?list.get(2).icon:``}"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@{list.size > 2?list.get(2).name:`推荐入口`}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
visibleGone="@{list.size > 3}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
visibleGone="@{list.size > 3}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 3)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
style="@style/frescoStyle"
|
||||
imageUrl="@{list.size > 3?list.get(3).icon:``}"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@{list.size > 3?list.get(3).name:`推荐入口`}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
visibleGone="@{list.size > 4}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
visibleGone="@{list.size > 4}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:onClick="@{(v)->clickListener.onClick(v, 4)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
style="@style/frescoStyle"
|
||||
imageUrl="@{list.size > 4?list.get(4).icon:``}"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@{list.size > 4?list.get(4).name:`推荐入口`}"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
<View
|
||||
android:id="@+id/spaceOne"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/containerTwo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iconIvTwo"
|
||||
style="@style/frescoStyle"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTvTwo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/spaceTwo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/containerThree"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iconIvThree"
|
||||
style="@style/frescoStyle"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTvThree"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/spaceThree"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/containerFour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iconIvFour"
|
||||
style="@style/frescoStyle"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTvFour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/spaceFour"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/containerFive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iconIvFive"
|
||||
style="@style/frescoStyle"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nameTvFive"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/text_title"
|
||||
android:textSize="12sp"
|
||||
tools:text="分类" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -1,107 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="category"
|
||||
type="com.gh.gamecenter.entity.CategoryEntity" />
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
|
||||
<import type="com.gh.common.util.IntentUtils" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/background" />
|
||||
|
||||
<View
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/container_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:background="@color/background"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="37dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_primary_category"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/iconIv"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/categoryName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="#000"
|
||||
android:textSize="12sp"
|
||||
tools:text="不是不能用" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_sub_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/container_primary_category"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_unexpandable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<net.cachapa.expandablelayout.ExpandableLayout
|
||||
android:id="@+id/container_expandable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:el_expanded="false" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="37dp"
|
||||
android:layout_below="@id/container_category">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/container_category"
|
||||
android:layout_width="match_parent"
|
||||
<ImageView
|
||||
android:id="@+id/iv_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="37dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_primary_category"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:onClick="@{() -> IntentUtils.startCategoryListActivity(context, title, category)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
imageIcon="@{category.icon}"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@{category.name}"
|
||||
android:textColor="#000"
|
||||
android:textSize="12sp"
|
||||
tools:text="不是不能用" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_sub_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/container_primary_category"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container_unexpandable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<net.cachapa.expandablelayout.ExpandableLayout
|
||||
android:id="@+id/container_expandable"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:el_expanded="false" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="37dp"
|
||||
android:layout_below="@id/container_category">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_toggle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:src="@drawable/ic_category_arrow_down"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:src="@drawable/ic_category_arrow_down"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
@ -1,50 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/reuse_listview_item_style"
|
||||
android:orientation="vertical">
|
||||
|
||||
<data>
|
||||
<import type="android.text.TextUtils" />
|
||||
<View
|
||||
android:id="@+id/topDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/background"
|
||||
android:visibility="gone" />
|
||||
|
||||
<variable
|
||||
name="game"
|
||||
type="com.gh.gamecenter.entity.GameEntity" />
|
||||
</data>
|
||||
<include
|
||||
android:id="@+id/game_item_included"
|
||||
layout="@layout/game_item" />
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<LinearLayout
|
||||
android:id="@+id/tagContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/reuse_listview_item_style"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="16dp" />
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:id="@+id/topDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/background" />
|
||||
|
||||
<include
|
||||
android:id="@+id/game_item_included"
|
||||
layout="@layout/game_item" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tagContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<View
|
||||
android:visibility="gone"
|
||||
android:id="@+id/bottomDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/background" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<View
|
||||
android:id="@+id/bottomDivider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:background="@color/background"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user