diff --git a/app/src/main/java/co/orange/ddanzi/di/DataSourceModule.kt b/app/src/main/java/co/orange/ddanzi/di/DataSourceModule.kt index ff476a64..e298f2b9 100644 --- a/app/src/main/java/co/orange/ddanzi/di/DataSourceModule.kt +++ b/app/src/main/java/co/orange/ddanzi/di/DataSourceModule.kt @@ -1,7 +1,9 @@ package co.orange.ddanzi.di import co.orange.data.dataSource.AuthDataSource +import co.orange.data.dataSource.HomeDataSource import co.orange.data.dataSourceImpl.AuthDataSourceImpl +import co.orange.data.dataSourceImpl.HomeDataSourceImpl import dagger.Module import dagger.Provides import dagger.hilt.InstallIn @@ -14,4 +16,8 @@ object DataSourceModule { @Provides @Singleton fun provideAuthDataSource(authDataSourceImpl: AuthDataSourceImpl): AuthDataSource = authDataSourceImpl + + @Provides + @Singleton + fun provideHomeDataSource(homeDataSourceImpl: HomeDataSourceImpl): HomeDataSource = homeDataSourceImpl } diff --git a/app/src/main/java/co/orange/ddanzi/di/RepositoryModule.kt b/app/src/main/java/co/orange/ddanzi/di/RepositoryModule.kt index 9cabf0b9..90793ece 100644 --- a/app/src/main/java/co/orange/ddanzi/di/RepositoryModule.kt +++ b/app/src/main/java/co/orange/ddanzi/di/RepositoryModule.kt @@ -1,7 +1,9 @@ package co.orange.ddanzi.di import co.orange.data.repositoryImpl.AuthRepositoryImpl +import co.orange.data.repositoryImpl.HomeRepositoryImpl import co.orange.domain.repository.AuthRepository +import co.orange.domain.repository.HomeRepository import dagger.Module import dagger.Provides import dagger.hilt.InstallIn @@ -14,4 +16,8 @@ object RepositoryModule { @Provides @Singleton fun provideAuthRepository(authRepositoryImpl: AuthRepositoryImpl): AuthRepository = authRepositoryImpl + + @Provides + @Singleton + fun provideHomeRepository(homeRepositoryImpl: HomeRepositoryImpl): HomeRepository = homeRepositoryImpl } diff --git a/app/src/main/java/co/orange/ddanzi/di/ServiceModule.kt b/app/src/main/java/co/orange/ddanzi/di/ServiceModule.kt index 057e3353..7d6bd679 100644 --- a/app/src/main/java/co/orange/ddanzi/di/ServiceModule.kt +++ b/app/src/main/java/co/orange/ddanzi/di/ServiceModule.kt @@ -1,6 +1,7 @@ package co.orange.ddanzi.di import co.orange.data.service.AuthService +import co.orange.data.service.HomeService import dagger.Module import dagger.Provides import dagger.hilt.InstallIn @@ -16,4 +17,11 @@ object ServiceModule { fun provideAuthService( @RetrofitQualifier.NOTOKEN retrofit: Retrofit, ): AuthService = retrofit.create(AuthService::class.java) + + // TODO 추후 수정 + @Provides + @Singleton + fun provideHomeService( + @RetrofitQualifier.NOTOKEN retrofit: Retrofit, + ): HomeService = retrofit.create(HomeService::class.java) } diff --git a/data/src/main/java/co/orange/data/dataSource/HomeDataSource.kt b/data/src/main/java/co/orange/data/dataSource/HomeDataSource.kt new file mode 100644 index 00000000..a4576928 --- /dev/null +++ b/data/src/main/java/co/orange/data/dataSource/HomeDataSource.kt @@ -0,0 +1,8 @@ +package co.orange.data.dataSource + +import co.orange.data.dto.BaseResponse +import co.orange.data.dto.response.HomeDto + +interface HomeDataSource { + suspend fun getHomeData(): BaseResponse +} diff --git a/data/src/main/java/co/orange/data/dataSourceImpl/HomeDataSourceImpl.kt b/data/src/main/java/co/orange/data/dataSourceImpl/HomeDataSourceImpl.kt new file mode 100644 index 00000000..7bb8f24a --- /dev/null +++ b/data/src/main/java/co/orange/data/dataSourceImpl/HomeDataSourceImpl.kt @@ -0,0 +1,15 @@ +package co.orange.data.dataSourceImpl + +import co.orange.data.dataSource.HomeDataSource +import co.orange.data.dto.BaseResponse +import co.orange.data.dto.response.HomeDto +import co.orange.data.service.HomeService +import javax.inject.Inject + +data class HomeDataSourceImpl + @Inject + constructor( + private val homeService: HomeService, + ) : HomeDataSource { + override suspend fun getHomeData(): BaseResponse = homeService.getHomeData() + } diff --git a/data/src/main/java/co/orange/data/dto/BaseResponse.kt b/data/src/main/java/co/orange/data/dto/BaseResponse.kt index dbb732e4..7953df8e 100644 --- a/data/src/main/java/co/orange/data/dto/BaseResponse.kt +++ b/data/src/main/java/co/orange/data/dto/BaseResponse.kt @@ -5,14 +5,14 @@ import kotlinx.serialization.Serializable @Serializable data class BaseResponse( - @SerialName("success") - val success: Boolean, - @SerialName("response") - val response: T, - @SerialName("code") - val code: String, - @SerialName("message") - val message: String, @SerialName("status") val status: Int, + @SerialName("message") + val message: String, + @SerialName("timestamp") + val timestamp: String, + @SerialName("path") + val path: String, + @SerialName("data") + val data: T, ) diff --git a/data/src/main/java/co/orange/data/dto/NonDataBaseResponse.kt b/data/src/main/java/co/orange/data/dto/NonDataBaseResponse.kt deleted file mode 100644 index 60876e19..00000000 --- a/data/src/main/java/co/orange/data/dto/NonDataBaseResponse.kt +++ /dev/null @@ -1,14 +0,0 @@ -package co.orange.data.dto - -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable - -@Serializable -data class NonDataBaseResponse( - @SerialName("success") - val success: Boolean, - @SerialName("errorCode") - val errorCode: String?, - @SerialName("errorMessage") - val errorMessage: String?, -) diff --git a/data/src/main/java/co/orange/data/dto/response/HomeDto.kt b/data/src/main/java/co/orange/data/dto/response/HomeDto.kt new file mode 100644 index 00000000..f0a84d41 --- /dev/null +++ b/data/src/main/java/co/orange/data/dto/response/HomeDto.kt @@ -0,0 +1,15 @@ +package co.orange.data.dto.response + +import co.orange.domain.entity.response.HomeModel +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class HomeDto( + @SerialName("homeImgUrl") + val homeImgUrl: String, + @SerialName("productList") + val productList: List, +) { + fun toModel() = HomeModel(homeImgUrl, productList.map { it.toModel() }) +} diff --git a/data/src/main/java/co/orange/data/dto/response/ProductDto.kt b/data/src/main/java/co/orange/data/dto/response/ProductDto.kt new file mode 100644 index 00000000..35f71abf --- /dev/null +++ b/data/src/main/java/co/orange/data/dto/response/ProductDto.kt @@ -0,0 +1,25 @@ +package co.orange.data.dto.response + +import co.orange.domain.entity.response.ProductModel +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class ProductDto( + @SerialName("productId") + val productId: String, + @SerialName("kakaoProductId") + val kakaoProductId: Long, + @SerialName("name") + val name: String, + @SerialName("imgUrl") + val imgUrl: String, + @SerialName("originPrice") + val originPrice: Int, + @SerialName("salePrice") + val salePrice: Int, + @SerialName("interestCount") + val interestCount: Int, +) { + fun toModel() = ProductModel(productId, kakaoProductId, name, imgUrl, originPrice, salePrice, interestCount) +} diff --git a/data/src/main/java/co/orange/data/repositoryImpl/AuthRepositoryImpl.kt b/data/src/main/java/co/orange/data/repositoryImpl/AuthRepositoryImpl.kt index 84d6876d..3a11ab2b 100644 --- a/data/src/main/java/co/orange/data/repositoryImpl/AuthRepositoryImpl.kt +++ b/data/src/main/java/co/orange/data/repositoryImpl/AuthRepositoryImpl.kt @@ -20,6 +20,6 @@ class AuthRepositoryImpl authDataSource.postReissueTokens( authorization, request.toDto(), - ).response.toModel() + ).data.toModel() } } diff --git a/data/src/main/java/co/orange/data/repositoryImpl/HomeRepositoryImpl.kt b/data/src/main/java/co/orange/data/repositoryImpl/HomeRepositoryImpl.kt new file mode 100644 index 00000000..d7c8f36d --- /dev/null +++ b/data/src/main/java/co/orange/data/repositoryImpl/HomeRepositoryImpl.kt @@ -0,0 +1,14 @@ +package co.orange.data.repositoryImpl + +import co.orange.data.dataSource.HomeDataSource +import co.orange.domain.entity.response.HomeModel +import co.orange.domain.repository.HomeRepository +import javax.inject.Inject + +class HomeRepositoryImpl + @Inject + constructor( + private val homeDataSource: HomeDataSource, + ) : HomeRepository { + override suspend fun getHomeData(): Result = runCatching { homeDataSource.getHomeData().data.toModel() } + } diff --git a/data/src/main/java/co/orange/data/service/HomeService.kt b/data/src/main/java/co/orange/data/service/HomeService.kt new file mode 100644 index 00000000..1d4fcc30 --- /dev/null +++ b/data/src/main/java/co/orange/data/service/HomeService.kt @@ -0,0 +1,10 @@ +package co.orange.data.service + +import co.orange.data.dto.BaseResponse +import co.orange.data.dto.response.HomeDto +import retrofit2.http.GET + +interface HomeService { + @GET("/api/v1/home") + suspend fun getHomeData(): BaseResponse +} diff --git a/domain/src/main/kotlin/co/orange/domain/entity/response/HomeModel.kt b/domain/src/main/kotlin/co/orange/domain/entity/response/HomeModel.kt new file mode 100644 index 00000000..7dae330b --- /dev/null +++ b/domain/src/main/kotlin/co/orange/domain/entity/response/HomeModel.kt @@ -0,0 +1,6 @@ +package co.orange.domain.entity.response + +data class HomeModel( + val homeImgUrl: String, + val productList: List, +) diff --git a/domain/src/main/kotlin/co/orange/domain/entity/response/ProductModel.kt b/domain/src/main/kotlin/co/orange/domain/entity/response/ProductModel.kt index 25c0ba3e..36e5d45f 100644 --- a/domain/src/main/kotlin/co/orange/domain/entity/response/ProductModel.kt +++ b/domain/src/main/kotlin/co/orange/domain/entity/response/ProductModel.kt @@ -1,10 +1,11 @@ package co.orange.domain.entity.response data class ProductModel( - val productId: Long, + val productId: String, + val kakaoProductId: Long, val name: String, val imgUrl: String, val originPrice: Int, val salePrice: Int, val interestCount: Int, -) \ No newline at end of file +) diff --git a/domain/src/main/kotlin/co/orange/domain/repository/HomeRepository.kt b/domain/src/main/kotlin/co/orange/domain/repository/HomeRepository.kt new file mode 100644 index 00000000..a5c25899 --- /dev/null +++ b/domain/src/main/kotlin/co/orange/domain/repository/HomeRepository.kt @@ -0,0 +1,7 @@ +package co.orange.domain.repository + +import co.orange.domain.entity.response.HomeModel + +interface HomeRepository { + suspend fun getHomeData(): Result +} diff --git a/presentation/src/main/ic_launcher-playstore.png b/presentation/src/main/ic_launcher-playstore.png index 8c76e945..12b63fd9 100644 Binary files a/presentation/src/main/ic_launcher-playstore.png and b/presentation/src/main/ic_launcher-playstore.png differ diff --git a/presentation/src/main/java/co/orange/presentation/detail/DetailActivity.kt b/presentation/src/main/java/co/orange/presentation/detail/DetailActivity.kt index 6b8bb98e..be68f3c5 100644 --- a/presentation/src/main/java/co/orange/presentation/detail/DetailActivity.kt +++ b/presentation/src/main/java/co/orange/presentation/detail/DetailActivity.kt @@ -107,7 +107,7 @@ class DetailActivity : BaseActivity(R.layout.activity_det @JvmStatic fun createIntent( context: Context, - productId: Long, + productId: String, productUrl: String, originPrice: Int, salePrice: Int, diff --git a/presentation/src/main/java/co/orange/presentation/main/home/HomeAdapter.kt b/presentation/src/main/java/co/orange/presentation/main/home/HomeAdapter.kt index c39797b9..77761fbc 100644 --- a/presentation/src/main/java/co/orange/presentation/main/home/HomeAdapter.kt +++ b/presentation/src/main/java/co/orange/presentation/main/home/HomeAdapter.kt @@ -16,6 +16,7 @@ class HomeAdapter( private val likeClick: (Unit) -> (Unit), ) : ListAdapter(diffUtil) { private var itemList = mutableListOf() + private var bannerItem: String? = null override fun onCreateViewHolder( parent: ViewGroup, @@ -52,7 +53,7 @@ class HomeAdapter( ) { when (holder) { is HomeBannerViewHolder -> { - holder.onBind() + bannerItem?.let { holder.onBind(it) } } is HomeProductViewHolder -> { @@ -73,8 +74,8 @@ class HomeAdapter( else -> VIEW_TYPE_PRODUCT } - fun addItemList(newItems: List) { - this.itemList.addAll(newItems) + fun addBannerItem(bannerUrl: String) { + this.bannerItem = bannerUrl notifyDataSetChanged() } @@ -83,14 +84,6 @@ class HomeAdapter( notifyDataSetChanged() } - fun removeItem(position: Int) { - if (this.itemList.isNotEmpty()) { - this.itemList.removeAt(position) - notifyItemRemoved(position + HEADER_COUNT) - notifyItemRangeChanged(position + HEADER_COUNT, itemCount) - } - } - companion object { private val diffUtil = ItemDiffCallback( diff --git a/presentation/src/main/java/co/orange/presentation/main/home/HomeBannerViewHolder.kt b/presentation/src/main/java/co/orange/presentation/main/home/HomeBannerViewHolder.kt index e66e9f61..57c9ebfd 100644 --- a/presentation/src/main/java/co/orange/presentation/main/home/HomeBannerViewHolder.kt +++ b/presentation/src/main/java/co/orange/presentation/main/home/HomeBannerViewHolder.kt @@ -2,6 +2,7 @@ package co.orange.presentation.main.home import androidx.recyclerview.widget.RecyclerView import co.orange.core.extension.setOnSingleClickListener +import coil.load import kr.genti.presentation.databinding.ItemHomeBannerBinding class HomeBannerViewHolder( @@ -9,9 +10,12 @@ class HomeBannerViewHolder( val bannerClick: (Unit) -> (Unit), ) : RecyclerView.ViewHolder(binding.root) { - fun onBind() { - binding.root.setOnSingleClickListener { - bannerClick + fun onBind(item: String) { + with(binding) { + ivHomeBanner.load(item) + root.setOnSingleClickListener { + bannerClick + } } } } diff --git a/presentation/src/main/java/co/orange/presentation/main/home/HomeFragment.kt b/presentation/src/main/java/co/orange/presentation/main/home/HomeFragment.kt index 1a3138e1..9396ab1a 100644 --- a/presentation/src/main/java/co/orange/presentation/main/home/HomeFragment.kt +++ b/presentation/src/main/java/co/orange/presentation/main/home/HomeFragment.kt @@ -14,6 +14,9 @@ import co.orange.core.base.BaseFragment import co.orange.core.extension.dpToPx import co.orange.core.extension.initOnBackPressedListener import co.orange.core.extension.setOnSingleClickListener +import co.orange.core.extension.stringOf +import co.orange.core.extension.toast +import co.orange.core.state.UiState import co.orange.domain.entity.response.ProductModel import co.orange.presentation.auth.login.LoginActivity import co.orange.presentation.detail.DetailActivity @@ -51,8 +54,8 @@ class HomeFragment() : BaseFragment(R.layout.fragment_home) searchSellProduct() setGridRecyclerView() setRecyclerViewDeco() - setItemList() observeCheckedAgainState() + observeGetHomeDataState() } private fun initView() { @@ -145,10 +148,6 @@ class HomeFragment() : BaseFragment(R.layout.fragment_home) ) } - private fun setItemList() { - adapter.setItemList(viewModel.mockItemList) - } - private fun observeCheckedAgainState() { viewModel.isCheckedAgain.flowWithLifecycle(lifecycle).onEach { isChecked -> if (isChecked) { @@ -158,6 +157,20 @@ class HomeFragment() : BaseFragment(R.layout.fragment_home) }.launchIn(lifecycleScope) } + private fun observeGetHomeDataState() { + viewModel.getHomeDataState.flowWithLifecycle(lifecycle).onEach { state -> + when (state) { + is UiState.Success -> { + adapter.addBannerItem(state.data.homeImgUrl) + adapter.setItemList(state.data.productList) + } + + is UiState.Failure -> toast(stringOf(R.string.error_msg)) + else -> return@onEach + } + }.launchIn(lifecycleScope) + } + override fun onDestroyView() { super.onDestroyView() _adapter = null diff --git a/presentation/src/main/java/co/orange/presentation/main/home/HomeViewModel.kt b/presentation/src/main/java/co/orange/presentation/main/home/HomeViewModel.kt index 615c8bb4..76ed12c6 100644 --- a/presentation/src/main/java/co/orange/presentation/main/home/HomeViewModel.kt +++ b/presentation/src/main/java/co/orange/presentation/main/home/HomeViewModel.kt @@ -3,10 +3,14 @@ package co.orange.presentation.main.home import android.net.Uri import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import co.orange.domain.entity.response.ProductModel +import co.orange.core.state.UiState +import co.orange.domain.entity.response.HomeModel +import co.orange.domain.repository.HomeRepository import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharedFlow +import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.launch import javax.inject.Inject @@ -14,92 +18,35 @@ import javax.inject.Inject class HomeViewModel @Inject constructor( - // private val feedRepository: FeedRepository, + private val homeRepository: HomeRepository, ) : ViewModel() { + init { + getHomeDataFromServer() + } + var selectedImageUri = Uri.EMPTY private val _isCheckedAgain = MutableSharedFlow() val isCheckedAgain: SharedFlow = _isCheckedAgain + private val _getHomeDataState = MutableStateFlow>(UiState.Empty) + val getHomeDataState: StateFlow> = _getHomeDataState + fun setCheckedState(state: Boolean) { viewModelScope.launch { _isCheckedAgain.emit(state) } } - val mockItemList = - listOf( - ProductModel( - 1, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 12, - ), - ProductModel( - 2, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 34, - ), - ProductModel( - 3, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 56, - ), - ProductModel( - 4, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 78, - ), - ProductModel( - 5, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 910, - ), - ProductModel( - 6, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 112, - ), - ProductModel( - 7, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 1234, - ), - ProductModel( - 8, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 1234, - ), - ProductModel( - 9, - "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", - "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", - 54000, - 48900, - 1234, - ), - ) + private fun getHomeDataFromServer() { + viewModelScope.launch { + homeRepository.getHomeData() + .onSuccess { + _getHomeDataState.value = UiState.Success(it) + } + .onFailure { + _getHomeDataState.value = UiState.Failure(it.message.toString()) + } + } + } } diff --git a/presentation/src/main/java/co/orange/presentation/search/SearchViewModel.kt b/presentation/src/main/java/co/orange/presentation/search/SearchViewModel.kt index 6dd83aac..5ff5f31f 100644 --- a/presentation/src/main/java/co/orange/presentation/search/SearchViewModel.kt +++ b/presentation/src/main/java/co/orange/presentation/search/SearchViewModel.kt @@ -17,7 +17,8 @@ class SearchViewModel listOf("향수", "이승준", "곰인형", "성년의 날 선물", "멀티비타민"), listOf( ProductModel( - 1, + "1", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -25,7 +26,8 @@ class SearchViewModel 12, ), ProductModel( - 2, + "2", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -38,7 +40,8 @@ class SearchViewModel val mockItemList = listOf( ProductModel( - 1, + "1", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -46,7 +49,8 @@ class SearchViewModel 12, ), ProductModel( - 2, + "2", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -54,7 +58,8 @@ class SearchViewModel 34, ), ProductModel( - 3, + "3", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -62,7 +67,8 @@ class SearchViewModel 56, ), ProductModel( - 4, + "4", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -70,7 +76,8 @@ class SearchViewModel 78, ), ProductModel( - 5, + "5", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -78,7 +85,8 @@ class SearchViewModel 910, ), ProductModel( - 6, + "6", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, @@ -86,7 +94,8 @@ class SearchViewModel 112, ), ProductModel( - 7, + "7", + 0, "퓨어 오일 퍼퓸 10 ml 긴제목테스트트트트트", "https://github.com/Marchbreeze/Marchbreeze/assets/97405341/cd2c0454-92b4-41e7-ae2f-319f83e2426f", 54000, diff --git a/presentation/src/main/res/drawable/ic_add.xml b/presentation/src/main/res/drawable/ic_add.xml index 48186de8..da346c72 100644 --- a/presentation/src/main/res/drawable/ic_add.xml +++ b/presentation/src/main/res/drawable/ic_add.xml @@ -7,10 +7,10 @@ android:pathData="M0,5.7L12,5.7" android:strokeWidth="0.6" android:fillColor="#00000000" - android:strokeColor="#ffffff"/> + android:strokeColor="#000000"/> + android:strokeColor="#000000"/> diff --git a/presentation/src/main/res/drawable/img_logo_text.xml b/presentation/src/main/res/drawable/img_logo_text.xml new file mode 100644 index 00000000..5aee64d2 --- /dev/null +++ b/presentation/src/main/res/drawable/img_logo_text.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/presentation/src/main/res/drawable/mock_ic_logo.png b/presentation/src/main/res/drawable/mock_ic_logo.png deleted file mode 100644 index cfd088cb..00000000 Binary files a/presentation/src/main/res/drawable/mock_ic_logo.png and /dev/null differ diff --git a/presentation/src/main/res/drawable/shape_blue_fill_100_rect.xml b/presentation/src/main/res/drawable/shape_yellow_fill_100_rect.xml similarity index 76% rename from presentation/src/main/res/drawable/shape_blue_fill_100_rect.xml rename to presentation/src/main/res/drawable/shape_yellow_fill_100_rect.xml index b7856afb..5a3ca3ce 100644 --- a/presentation/src/main/res/drawable/shape_blue_fill_100_rect.xml +++ b/presentation/src/main/res/drawable/shape_yellow_fill_100_rect.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/presentation/src/main/res/layout/fragment_home.xml b/presentation/src/main/res/layout/fragment_home.xml index 2a76cfca..6e03e9e1 100644 --- a/presentation/src/main/res/layout/fragment_home.xml +++ b/presentation/src/main/res/layout/fragment_home.xml @@ -32,11 +32,11 @@ @@ -73,7 +73,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="20dp" android:layout_marginBottom="37dp" - android:background="@drawable/shape_blue_fill_100_rect" + android:background="@drawable/shape_yellow_fill_100_rect" android:orientation="horizontal" android:padding="15dp" app:layout_constraintBottom_toBottomOf="parent" @@ -91,8 +91,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingEnd="3dp" - android:text="@string/home_btn_sell" - android:textColor="@color/white" /> + android:text="@string/home_btn_sell"/> diff --git a/presentation/src/main/res/layout/item_home_product.xml b/presentation/src/main/res/layout/item_home_product.xml index 62ff8ceb..5dcdfc0c 100644 --- a/presentation/src/main/res/layout/item_home_product.xml +++ b/presentation/src/main/res/layout/item_home_product.xml @@ -95,7 +95,7 @@ android:fontFamily="@font/font_pretendard_medium" android:textColor="@color/black" android:textSize="10sp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/tv_home_item_now_price" app:layout_constraintEnd_toEndOf="parent" tools:text="@string/ex_item_like" /> diff --git a/presentation/src/main/res/mipmap-hdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-hdpi/ic_launcher.webp index 74988242..3a803f83 100644 Binary files a/presentation/src/main/res/mipmap-hdpi/ic_launcher.webp and b/presentation/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/presentation/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/presentation/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp index 81386102..3412ee54 100644 Binary files a/presentation/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp and b/presentation/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ diff --git a/presentation/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-hdpi/ic_launcher_round.webp index 5a07a20b..46ffd21a 100644 Binary files a/presentation/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/presentation/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/presentation/src/main/res/mipmap-mdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-mdpi/ic_launcher.webp index f1bb0472..5178faa1 100644 Binary files a/presentation/src/main/res/mipmap-mdpi/ic_launcher.webp and b/presentation/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/presentation/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/presentation/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp index fe800147..88b68ac4 100644 Binary files a/presentation/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp and b/presentation/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ diff --git a/presentation/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-mdpi/ic_launcher_round.webp index 0599bc50..fb97548a 100644 Binary files a/presentation/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/presentation/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/presentation/src/main/res/mipmap-xhdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-xhdpi/ic_launcher.webp index d7905875..dd7f68b5 100644 Binary files a/presentation/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/presentation/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/presentation/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/presentation/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp index d474f168..34eb9f5f 100644 Binary files a/presentation/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp and b/presentation/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ diff --git a/presentation/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-xhdpi/ic_launcher_round.webp index 4504e110..02850ef8 100644 Binary files a/presentation/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/presentation/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/presentation/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher.webp index d3d5d685..bac2ecde 100644 Binary files a/presentation/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp index 408454a1..a290d4f6 100644 Binary files a/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp and b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ diff --git a/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp index 14ca9080..2aa4bb63 100644 Binary files a/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/presentation/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher.webp index cae59776..1f885e67 100644 Binary files a/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp index 062676a4..e4ccb138 100644 Binary files a/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp and b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ diff --git a/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp index 18ab3468..63cc1504 100644 Binary files a/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/presentation/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/presentation/src/main/res/values/colors.xml b/presentation/src/main/res/values/colors.xml index dc771dab..05698528 100644 --- a/presentation/src/main/res/values/colors.xml +++ b/presentation/src/main/res/values/colors.xml @@ -11,6 +11,7 @@ #57CBE4 + #FFE500 #034EE1 #3527D7 #FF6C6C