Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
UserAdaprter: remove harcoded colors
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilababayeva committed May 22, 2022
1 parent 1c9474b commit 650a526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class UserProfileAdapter constructor(
*/
fun bind(user: User, position: Int) {
itemView.findViewById<TextView>(R.id.search_user_username).text = user.username
if(position %2 == 0) itemView.setBackgroundColor(Color.parseColor("#FFFDF0D7"))
if(position %2 == 0) itemView.setBackgroundColor(itemView.resources.getColor(R.color.darker_floral_white))

imageGetter.fetchImage("profileImg/${user.uid}", this::setImage)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class UserScoreboardAdapter(
itemView.findViewById<TextView>(R.id.tv_name).text = player.username
itemView.findViewById<TextView>(R.id.tv_score).text = setScore(player).toString()
itemView.findViewById<ImageView>(R.id.iv_photo).loadImg(player.image)
if(position %2 == 0) itemView.setBackgroundColor(Color.parseColor("#FFFDF0D7"))

if(position %2 == 0) itemView.setBackgroundColor(itemView.resources.getColor(R.color.darker_floral_white))
}

init {
Expand Down

0 comments on commit 650a526

Please sign in to comment.