-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#34 [feat] 홈 화면 기능 구현
- Loading branch information
Showing
42 changed files
with
792 additions
and
438 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/umc/coumo/data/remote/model/request/RequestLocationModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.umc.coumo.data.remote.model.request | ||
|
||
data class RequestLocationModel( | ||
val longitude: Double = 127.028194, | ||
val latitude: Double = 37.498085 | ||
) |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/umc/coumo/data/remote/model/response/ResponsePopularStoreModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.umc.coumo.data.remote.model.response | ||
|
||
data class ResponsePopularStoreModel( | ||
val storeId: Int, | ||
val name: String, | ||
val location: String, | ||
val description: String, | ||
val storeImage: String | ||
) |
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/umc/coumo/domain/model/ImageViewPagerModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.umc.coumo.domain.model | ||
|
||
import android.net.Uri | ||
|
||
data class ImageViewPagerModel( | ||
val image: Uri, | ||
) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/umc/coumo/domain/model/StoreInfoItemModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.umc.coumo.domain.model | ||
|
||
import android.net.Uri | ||
|
||
data class StoreInfoItemModel( | ||
val id : Int, | ||
val image: Uri? = null, | ||
val name: String, | ||
val address: String, | ||
val description: String, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/umc/coumo/domain/type/CategoryType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.umc.coumo.domain.type | ||
|
||
enum class CategoryType(val title: String) { | ||
CAFE("카페/디저트"), | ||
RETAIL1("리테일"), | ||
FOOD("요식업"), | ||
RETAIL2("리테일"), | ||
BEAUTY("뷰티/살롱"), | ||
CLASS("학원/클래스"), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.umc.coumo.domain.type | ||
|
||
enum class Status { | ||
SUCCESS, | ||
ERROR, | ||
LOADING | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
app/src/main/java/com/umc/coumo/presentation/adapter/ImageViewPagerAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.umc.coumo.presentation.adapter | ||
|
||
import android.content.Context | ||
import android.net.Uri | ||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.ListAdapter | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.umc.coumo.databinding.ItemImageViewpagerBinding | ||
import com.umc.coumo.utils.ItemDiffCallback | ||
|
||
class ImageViewPagerAdapter(val context: Context): ListAdapter<Uri, RecyclerView.ViewHolder>( | ||
ItemDiffCallback<Uri>( | ||
onContentsTheSame = {old, new -> old == new}, | ||
onItemsTheSame = {old, new -> old == new} | ||
) | ||
){ | ||
inner class ItemViewHolder( | ||
private val binding: ItemImageViewpagerBinding | ||
): RecyclerView.ViewHolder(binding.root) { | ||
fun bind(item: Uri) { | ||
binding.item = item | ||
} | ||
} | ||
|
||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { | ||
val inflater = LayoutInflater.from(parent.context) | ||
return ItemViewHolder(ItemImageViewpagerBinding.inflate(inflater, parent, false)) | ||
} | ||
|
||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { | ||
val item = getItem(position) | ||
|
||
when (holder) { | ||
is ItemViewHolder -> { | ||
holder.bind(item) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.