Skip to content

Commit

Permalink
[Feat] 홈화면 수정 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
PIYUJIN authored Nov 29, 2024
2 parents 9567668 + d11049d commit 664d393
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 44 deletions.
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ dependencies {
implementation(libs.material)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
implementation(libs.play.services.maps)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
Expand Down
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
7 changes: 0 additions & 7 deletions app/src/main/res/drawable/background_group.xml

This file was deleted.

6 changes: 0 additions & 6 deletions app/src/main/res/drawable/background_home_menu.xml

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_cart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<include
android:id="@+id/toolbar"
layout="@layout/toolbar_back_title"
layout="@layout/toolbar_back_title_center"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_create_group_categroy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
style="@style/Detail1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/group4"
android:text="@string/group8"
android:textColor="@color/gray_60"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_enter_code_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<include
android:id="@+id/toolbar"
layout="@layout/toolbar_back_title"
layout="@layout/toolbar_back_title_center"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -32,7 +32,7 @@
android:id="@+id/constraintLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/background_group"
android:background="@drawable/background_gray100_round10"
android:padding="20dp"
android:layout_marginTop="30dp"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_enter_group_code.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<include
android:id="@+id/toolbar"
layout="@layout/toolbar_back_title"
layout="@layout/toolbar_back_title_center"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginEnd="20dp"
android:background="@drawable/background_home_menu"
android:background="@drawable/background_gray100_round10"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/button_map"
app:layout_constraintTop_toTopOf="@+id/button_map">
Expand Down Expand Up @@ -157,7 +157,7 @@
android:layout_marginStart="14dp"
android:layout_marginTop="13dp"
android:layout_marginEnd="20dp"
android:background="@drawable/background_home_menu"
android:background="@drawable/background_gray100_round10"
app:layout_constraintBottom_toBottomOf="@+id/button_point"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/button_map"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<include
android:id="@+id/toolbar"
layout="@layout/toolbar_back_title"
layout="@layout/toolbar_back_title_center"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<include
android:id="@+id/toolbar"
layout="@layout/toolbar_back_title"
layout="@layout/toolbar_back_title_center"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_pre_payment_total.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<include
android:id="@+id/toolbar"
layout="@layout/toolbar_back_title"
layout="@layout/toolbar_back_title_center"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/row_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:id="@+id/constraintLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/background_group"
android:background="@drawable/background_gray100_round10"
android:padding="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
59 changes: 43 additions & 16 deletions app/src/main/res/layout/row_home_jangbu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
android:paddingHorizontal="20dp"
android:paddingVertical="15dp"
android:layout_marginRight="10dp"
android:background="@drawable/background_home_jangbu">
android:background="@drawable/background_gray100_round10">


<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_image"
android:id="@+id/imageView_store"
android:layout_width="44dp"
android:layout_height="44dp"
android:src="@drawable/example"
Expand All @@ -29,16 +29,31 @@
android:layout_marginStart="7dp"
android:text="그룹"
android:textColor="@color/gray_10"
app:layout_constraintStart_toEndOf="@+id/profile_image"
app:layout_constraintTop_toTopOf="@+id/profile_image" />
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"
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"
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="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,17 +63,17 @@
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"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/imageView_store"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintTop_toTopOf="@+id/imageView_store"
app:srcCompat="@drawable/ic_arrow_right_gray60" />

<TextView
Expand All @@ -69,7 +84,7 @@
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="15dp"
android:background="@drawable/background_progress_indicator_unselected"
app:layout_constraintTop_toBottomOf="@+id/profile_image" />
app:layout_constraintTop_toBottomOf="@+id/imageView_store" />

<TextView
android:id="@+id/progress_indicator_selected"
Expand All @@ -80,9 +95,21 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/profile_image"
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
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ appcompat = "1.7.0"
material = "1.12.0"
activity = "1.9.3"
constraintlayout = "2.2.0"
playServicesMaps = "19.0.0"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand All @@ -20,7 +19,6 @@ androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
play-services-maps = { group = "com.google.android.gms", name = "play-services-maps", version.ref = "playServicesMaps" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
Expand Down

0 comments on commit 664d393

Please sign in to comment.