Skip to content

Commit

Permalink
[Feat] #35 홈화면 UI 및 API 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
PIYUJIN committed Nov 29, 2024
1 parent 98499e8 commit d11049d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ data class GetHomeDataResponse(
data class Team(
val teamId: Int,
val storeId: Int,
val dDay: Int,
val storeImgUrl: String,
val isLikedAtStore: Boolean,
val teamName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class TeamAdapter(
holder.storeName.text = teamList[position].storeName
holder.myPoint.text = "${teamList[position].currentAmount.toString()}"
holder.totalPoint.text = "/ ${teamList[position].totalAmount.toString()}"
holder.dDay.text = "D-${teamList[position].dDay}"

Glide.with(activity).load(teamList[position].storeImgUrl).into(holder.storeImage)

Expand All @@ -77,7 +78,8 @@ class TeamAdapter(
RecyclerView.ViewHolder(binding.root) {
val groupName = binding.textViewGroupName
val storeName = binding.textViewStoreName
val storeImage = binding.profileImage
val storeImage = binding.imageViewStore
val dDay = binding.textViewDday
val myPoint= binding.textViewMyPoint
val layoutPoint = binding.progressIndicatorSelected
val totalPoint= binding.textViewTotalPoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class HomeViewModel : ViewModel() {
for (i in 0 until result?.data?.teams?.size!!) {
var teamId = result.data.teams[i].teamId
var storeId = result.data.teams[i].storeId
var dDay = result.data.teams[i].dDay
var storeImage = result.data.teams[i].storeImgUrl
var isLike = result.data.teams[i].isLikedAtStore
var teamName = result.data.teams[i].teamName
Expand All @@ -68,6 +69,7 @@ class HomeViewModel : ViewModel() {
var t1 = Team(
teamId,
storeId,
dDay,
storeImage,
isLike,
teamName,
Expand Down
42 changes: 35 additions & 7 deletions app/src/main/res/layout/row_home_jangbu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,28 @@
app:layout_constraintStart_toEndOf="@+id/imageView_store"
app:layout_constraintTop_toTopOf="@+id/imageView_store" />

<ImageView
android:id="@+id/imageView_star"
<TextView
android:id="@+id/textView_dday"
style="@style/body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="@+id/textView_group_name"
app:layout_constraintTop_toBottomOf="@+id/textView_group_name"
app:srcCompat="@drawable/ic_star_selected" />
android:layout_marginStart="7dp"
android:text="D-00"
android:textColor="@color/main_orange"
app:layout_constraintStart_toEndOf="@+id/imageView_store"
app:layout_constraintTop_toBottomOf="@+id/textView_group_name" />

<TextView
android:id="@+id/divider"
style="@style/body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:text="|"
android:textColor="@color/gray_70"
app:layout_constraintStart_toEndOf="@+id/textView_dday"
app:layout_constraintTop_toTopOf="@+id/textView_dday"
app:layout_constraintBottom_toBottomOf="@+id/textView_dday"/>

<TextView
android:id="@+id/textView_store_name"
Expand All @@ -48,8 +63,9 @@
android:layout_marginStart="2dp"
android:text="매장명"
android:textColor="@color/gray_40"
app:layout_constraintStart_toEndOf="@+id/imageView_star"
app:layout_constraintTop_toBottomOf="@+id/textView_group_name" />
app:layout_constraintStart_toEndOf="@+id/divider"
app:layout_constraintTop_toTopOf="@+id/divider"
app:layout_constraintBottom_toBottomOf="@+id/divider" />

<ImageView
android:id="@+id/button_open"
Expand Down Expand Up @@ -82,6 +98,18 @@
app:layout_constraintTop_toBottomOf="@+id/imageView_store"
app:layout_constraintWidth_percent="0.5" />

<TextView
android:id="@+id/textView_point_title"
style="@style/body3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginRight="8dp"
android:text="사용 가능한 금액"
android:textColor="@color/gray_60"
app:layout_constraintEnd_toStartOf="@+id/textView_my_point"
app:layout_constraintTop_toBottomOf="@+id/progress_indicator" />

<TextView
android:id="@+id/textView_my_point"
style="@style/Detail2"
Expand Down

0 comments on commit d11049d

Please sign in to comment.