feat(home): 최근 데뷔 크리에이터 카드를 정리한다
This commit is contained in:
@@ -20,7 +20,7 @@ class HomeRecentDebutCreatorAdapter : RecyclerView.Adapter<HomeRecentDebutCreato
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CreatorViewHolder {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_home_recent_debut_creator, parent, false)
|
||||
view.layoutParams = recyclerItemLayoutParams(parent)
|
||||
view.layoutParams = recentDebutItemLayoutParams(parent)
|
||||
return CreatorViewHolder(view)
|
||||
}
|
||||
|
||||
@@ -39,4 +39,11 @@ class HomeRecentDebutCreatorAdapter : RecyclerView.Adapter<HomeRecentDebutCreato
|
||||
nicknameText.text = item.nickname
|
||||
}
|
||||
}
|
||||
|
||||
private fun recentDebutItemLayoutParams(parent: ViewGroup): RecyclerView.LayoutParams {
|
||||
return RecyclerView.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
).apply { marginEnd = parent.resources.getDimensionPixelSize(R.dimen.spacing_4) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user