Skip to content

Commit

Permalink
[ADD/#98] 친구리스트 프로필 이미지 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchbreeze committed Jan 14, 2024
1 parent 049fff8 commit e881201
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class MyTodoFragment() : BaseFragment<FragmentMyTodoBinding>(R.layout.fragment_m
}

companion object {
const val TAB_UNCOMPLETE = "해야해요"
const val TAB_UNCOMPLETE = "해야 해요"
const val TAB_COMPLETE = "완료했어요"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class OurTodoFragment() : BaseFragment<FragmentOurTodoBinding>(R.layout.fragment
}

companion object {
const val TAB_UNCOMPLETE = "해야해요"
const val TAB_UNCOMPLETE = "해야 해요"
const val TAB_COMPLETE = "완료했어요"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,27 @@ import com.going.domain.entity.response.TripParticipantModel
import com.going.presentation.R
import com.going.presentation.databinding.ItemTodoFriendsBinding

class OurTodoFriendViewHolder(val binding: ItemTodoFriendsBinding) : RecyclerView.ViewHolder(binding.root) {
class OurTodoFriendViewHolder(val binding: ItemTodoFriendsBinding) :
RecyclerView.ViewHolder(binding.root) {

fun onBind(item: TripParticipantModel) {
binding.run {
tvTodoFriend.text = item.name
ivTodoFriend.load(R.drawable.ic_todo_friend) {

val profileImage = when (item.result) {
0 -> R.drawable.img_profile_1
1 -> R.drawable.img_profile_2
2 -> R.drawable.img_profile_3
3 -> R.drawable.img_profile_4
4 -> R.drawable.img_profile_5
5 -> R.drawable.img_profile_6
6 -> R.drawable.img_profile_7
else -> R.drawable.img_profile_8
}
ivTodoFriend.load(profileImage) {
transformations(CircleCropTransformation())
}

}
}

Expand Down
Binary file not shown.
5 changes: 3 additions & 2 deletions presentation/src/main/res/layout/fragment_my_todo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
style="@style/TextAppearance.Doorip.Head1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="-24dp"
app:layout_constraintEnd_toStartOf="@id/iv_my_todo"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -104,8 +105,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:src="@drawable/img_mytodo_main"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
3 changes: 2 additions & 1 deletion presentation/src/main/res/layout/item_todo_friends.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/white_000"
android:paddingStart="1dp"
android:paddingEnd="10dp">
Expand All @@ -11,7 +12,7 @@
android:id="@+id/iv_todo_friend"
android:layout_width="45dp"
android:layout_height="0dp"
android:src="@drawable/ic_todo_friend"
tools:src="@drawable/img_profile_1"
app:layout_constraintDimensionRatio="1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down

0 comments on commit e881201

Please sign in to comment.