diff --git a/app/src/main/java/com/polzzak_android/presentation/common/util/GlideUtil.kt b/app/src/main/java/com/polzzak_android/presentation/common/util/GlideUtil.kt index 6b8a66a0..e9fb9755 100644 --- a/app/src/main/java/com/polzzak_android/presentation/common/util/GlideUtil.kt +++ b/app/src/main/java/com/polzzak_android/presentation/common/util/GlideUtil.kt @@ -2,25 +2,34 @@ package com.polzzak_android.presentation.common.util import android.widget.ImageView import androidx.annotation.DrawableRes -import androidx.databinding.BindingAdapter import com.bumptech.glide.Glide -@BindingAdapter("imageUrl") -fun ImageView.loadImageUrl(imageUrl: String?) { - Glide.with(this.context).load(imageUrl).into(this) +fun ImageView.loadImageUrl(imageUrl: String?, @DrawableRes placeHolderRes: Int? = null) { + Glide.with(this.context).load(imageUrl).run { + placeHolderRes?.let { placeholder(placeHolderRes) } ?: this + }.into(this) } -@BindingAdapter("imageDrawableRes") -fun ImageView.loadImageDrawableRes(@DrawableRes drawableRes: Int) { - Glide.with(this.context).load(drawableRes).into(this) +fun ImageView.loadImageDrawableRes( + @DrawableRes drawableRes: Int, + @DrawableRes placeHolderRes: Int? = null +) { + Glide.with(this.context).load(drawableRes).run { + placeHolderRes?.let { placeholder(placeHolderRes) } ?: this + }.into(this) } -@BindingAdapter("imageUrlCircleCrop") -fun ImageView.loadCircleImageUrl(imageUrl: String?) { - Glide.with(this.context).load(imageUrl).circleCrop().into(this) +fun ImageView.loadCircleImageUrl(imageUrl: String?, @DrawableRes placeHolderRes: Int? = null) { + Glide.with(this.context).load(imageUrl).circleCrop().run { + placeHolderRes?.let { placeholder(placeHolderRes) } ?: this + }.into(this) } -@BindingAdapter("imageDrawableResCircleCrop") -fun ImageView.loadCircleImageDrawableRes(@DrawableRes drawableRes: Int) { - Glide.with(this.context).load(drawableRes).circleCrop().into(this) +fun ImageView.loadCircleImageDrawableRes( + @DrawableRes drawableRes: Int, + @DrawableRes placeHolderRes: Int? = null +) { + Glide.with(this.context).load(drawableRes).circleCrop().run { + placeHolderRes?.let { placeholder(placeHolderRes) } ?: this + }.into(this) } \ No newline at end of file diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginFragment.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginFragment.kt index 1857b65d..fd12288d 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginFragment.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginFragment.kt @@ -22,7 +22,7 @@ import com.polzzak_android.presentation.common.util.getSocialLoginManager import com.polzzak_android.presentation.common.util.shotBackPressed import com.polzzak_android.presentation.component.PolzzakSnackBar import com.polzzak_android.presentation.component.errorOf -import com.polzzak_android.presentation.feature.auth.login.model.LoginInfoUiModel +import com.polzzak_android.presentation.feature.auth.login.model.LoginInfoModel import com.polzzak_android.presentation.feature.auth.model.SocialLoginType import com.polzzak_android.presentation.feature.auth.signup.SignUpFragment import com.polzzak_android.presentation.feature.root.MainViewModel @@ -124,8 +124,8 @@ class LoginFragment : BaseFragment() { is ModelState.Loading -> binding.clLoading.isVisible = true is ModelState.Success -> { when (it.data) { - is LoginInfoUiModel.SignUp -> signUp(model = it.data) - is LoginInfoUiModel.Login -> login(model = it.data) + is LoginInfoModel.SignUp -> signUp(model = it.data) + is LoginInfoModel.Login -> login(model = it.data) } binding.clLoading.isVisible = false @@ -145,7 +145,7 @@ class LoginFragment : BaseFragment() { } } - private fun signUp(model: LoginInfoUiModel.SignUp) { + private fun signUp(model: LoginInfoModel.SignUp) { val signUpBundle = Bundle().apply { putString(SignUpFragment.ARGUMENT_USER_ID_KEY, model.userName) putParcelable( @@ -164,7 +164,7 @@ class LoginFragment : BaseFragment() { ) } - private fun login(model: LoginInfoUiModel.Login) { + private fun login(model: LoginInfoModel.Login) { mainViewModel.accessToken = model.accessToken lastSocialLoginViewModel.saveLastSocialLoginType(model.socialType) val navAction = when (model.memberType) { diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginViewModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginViewModel.kt index 5205cb89..10f8a8cb 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginViewModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/LoginViewModel.kt @@ -12,7 +12,7 @@ import com.polzzak_android.data.repository.MemberTypeRepository import com.polzzak_android.data.repository.UserRepository import com.polzzak_android.presentation.common.model.ModelState import com.polzzak_android.presentation.common.model.asMemberTypeOrNull -import com.polzzak_android.presentation.feature.auth.login.model.LoginInfoUiModel +import com.polzzak_android.presentation.feature.auth.login.model.LoginInfoModel import com.polzzak_android.presentation.feature.auth.model.MemberTypeDetail import com.polzzak_android.presentation.feature.auth.model.SocialLoginType import com.polzzak_android.presentation.feature.auth.model.asMemberTypeDetail @@ -29,8 +29,8 @@ class LoginViewModel @Inject constructor( private val memberTypeRepository: MemberTypeRepository, private val userRepository: UserRepository ) : ViewModel() { - private val _loginInfoLiveData = MutableLiveData>>() - val loginInfoLiveData: LiveData>> = _loginInfoLiveData + private val _loginInfoLiveData = MutableLiveData>>() + val loginInfoLiveData: LiveData>> = _loginInfoLiveData private var loginJob: Job? = null @@ -89,13 +89,13 @@ class LoginViewModel @Inject constructor( setLoginResultError() return@onSuccess } - val loginInfoUiModel = - LoginInfoUiModel.Login( + val loginInfoModel = + LoginInfoModel.Login( accessToken = accessToken, memberType = memberType, socialType = socialType ) - setLoginResultSuccess(data = loginInfoUiModel) + setLoginResultSuccess(data = loginInfoModel) }.onError { exception, _ -> setLoginResultError(exception = exception) } @@ -106,13 +106,13 @@ class LoginViewModel @Inject constructor( val parentTypes = it?.memberTypeDetailList?.map { responseData -> asMemberTypeDetail(memberTypeDetailResponseData = responseData) }?.filterIsInstance() ?: emptyList() - val loginInfoUiModel = - LoginInfoUiModel.SignUp( + val loginInfoModel = + LoginInfoModel.SignUp( userName = userName, socialType = socialType, parentTypes = parentTypes ) - setLoginResultSuccess(data = loginInfoUiModel) + setLoginResultSuccess(data = loginInfoModel) }.onError { exception, _ -> setLoginResultError(exception = exception) } @@ -122,7 +122,7 @@ class LoginViewModel @Inject constructor( _loginInfoLiveData.value = EventWrapper(ModelState.Loading()) } - private fun setLoginResultSuccess(data: LoginInfoUiModel) { + private fun setLoginResultSuccess(data: LoginInfoModel) { _loginInfoLiveData.value = EventWrapper(ModelState.Success(data = data)) } diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/model/LoginInfoUiModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/model/LoginInfoModel.kt similarity index 86% rename from app/src/main/java/com/polzzak_android/presentation/feature/auth/login/model/LoginInfoUiModel.kt rename to app/src/main/java/com/polzzak_android/presentation/feature/auth/login/model/LoginInfoModel.kt index e5c6d908..b5c8b696 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/model/LoginInfoUiModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/login/model/LoginInfoModel.kt @@ -4,16 +4,16 @@ import com.polzzak_android.presentation.feature.auth.model.SocialLoginType import com.polzzak_android.presentation.feature.auth.model.MemberTypeDetail import com.polzzak_android.presentation.common.model.MemberType -sealed interface LoginInfoUiModel { +sealed interface LoginInfoModel { data class Login( val accessToken: String, val memberType: MemberType, val socialType: SocialLoginType - ) : LoginInfoUiModel + ) : LoginInfoModel data class SignUp( val userName: String, val socialType: SocialLoginType, val parentTypes: List - ) : LoginInfoUiModel + ) : LoginInfoModel } diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpFragment.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpFragment.kt index 7b6cbec4..ba5f5492 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpFragment.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpFragment.kt @@ -33,7 +33,8 @@ import com.polzzak_android.presentation.component.errorOf import com.polzzak_android.presentation.feature.auth.model.MemberTypeDetail import com.polzzak_android.presentation.feature.auth.model.SocialLoginType import com.polzzak_android.presentation.feature.auth.signup.adapter.ParentTypeRollableAdapter -import com.polzzak_android.presentation.feature.auth.signup.model.NickNameUiModel +import com.polzzak_android.presentation.feature.auth.signup.model.MemberTypeModel +import com.polzzak_android.presentation.feature.auth.signup.model.NickNameModel import com.polzzak_android.presentation.feature.auth.signup.model.NickNameValidationState import com.polzzak_android.presentation.feature.auth.signup.model.SignUpPage import com.polzzak_android.presentation.feature.auth.signup.model.SignUpTermsOfServiceModel @@ -226,7 +227,7 @@ class SignUpFragment : BaseFragment() { } }) etInput.setOnFocusChangeListener { _, isFocused -> - val textUiModel = signUpViewModel.nickNameLiveData.value ?: NickNameUiModel() + val textUiModel = signUpViewModel.nickNameLiveData.value ?: NickNameModel() etInput.isSelected = true setNickNameResultTextView(isFocused = isFocused, uiModel = textUiModel) } @@ -367,6 +368,9 @@ class SignUpFragment : BaseFragment() { clSelectParentCard.isSelected = (it.isParent()) clSelectKidCard.isSelected = (it.isKid()) } + val profileDrawableRes = + if (it.isParent()) R.drawable.ic_sign_up_parent_select_image else R.drawable.ic_sign_up_kid_select_image + binding.inSelectProfileImage.ivImage.loadCircleImageDrawableRes(profileDrawableRes) refreshNextButton() } @@ -407,11 +411,17 @@ class SignUpFragment : BaseFragment() { private fun observeProfileImageLiveData() { signUpViewModel.profileImageLiveData.observe(viewLifecycleOwner) { + val imageRes = when (signUpViewModel.memberTypeLiveData.value?.selectedType) { + MemberTypeModel.Type.PARENT -> R.drawable.ic_sign_up_parent_select_image + MemberTypeModel.Type.KID -> R.drawable.ic_sign_up_kid_select_image + else -> null + } with(binding.inSelectProfileImage) { it.path?.let { path -> - ivImage.loadCircleImageUrl(imageUrl = path) - } ?: run { - ivImage.loadCircleImageDrawableRes(drawableRes = R.drawable.ic_launcher_background) + ivImage.loadCircleImageUrl( + imageUrl = path, + placeHolderRes = imageRes + ) } } } @@ -458,7 +468,7 @@ class SignUpFragment : BaseFragment() { }) } - private fun setNickNameResultTextView(isFocused: Boolean, uiModel: NickNameUiModel) { + private fun setNickNameResultTextView(isFocused: Boolean, uiModel: NickNameModel) { with(binding.inSetNickName) { tvCheckDuplicatedResult.text = createDuplicatedResultText( isFocused = isFocused, @@ -493,7 +503,7 @@ class SignUpFragment : BaseFragment() { private fun createDuplicatedResultText( isFocused: Boolean, isSelected: Boolean, - uiModel: NickNameUiModel + uiModel: NickNameModel ): String { return when { !isSelected -> "" @@ -511,7 +521,7 @@ class SignUpFragment : BaseFragment() { private fun createDuplicatedEditTextBackgroundResId( isFocused: Boolean, isSelected: Boolean, - uiModel: NickNameUiModel + uiModel: NickNameModel ): Int { return when { !isSelected -> R.drawable.shape_rectangle_white_stroke_gray_300_r8 diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpViewModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpViewModel.kt index b5eeb9dc..03630d24 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpViewModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/SignUpViewModel.kt @@ -12,12 +12,12 @@ import com.polzzak_android.data.repository.SignUpRepository import com.polzzak_android.presentation.common.model.ModelState import com.polzzak_android.presentation.feature.auth.model.MemberTypeDetail.Companion.KID_TYPE_ID import com.polzzak_android.presentation.feature.auth.model.SocialLoginType -import com.polzzak_android.presentation.feature.auth.signup.model.MemberTypeUiModel -import com.polzzak_android.presentation.feature.auth.signup.model.NickNameUiModel +import com.polzzak_android.presentation.feature.auth.signup.model.MemberTypeModel +import com.polzzak_android.presentation.feature.auth.signup.model.NickNameModel import com.polzzak_android.presentation.feature.auth.signup.model.NickNameValidationState -import com.polzzak_android.presentation.feature.auth.signup.model.ProfileImageUiModel +import com.polzzak_android.presentation.feature.auth.signup.model.ProfileImageModel import com.polzzak_android.presentation.feature.auth.signup.model.SignUpPage -import com.polzzak_android.presentation.feature.auth.signup.model.SignUpResultUiModel +import com.polzzak_android.presentation.feature.auth.signup.model.SignUpResultModel import com.polzzak_android.presentation.feature.auth.signup.model.SignUpTermsOfServiceModel import dagger.assisted.Assisted import dagger.assisted.AssistedFactory @@ -32,18 +32,18 @@ class SignUpViewModel @AssistedInject constructor( private val _pageLiveData = MutableLiveData() val pageLiveData: LiveData = _pageLiveData - private val _nickNameLiveData = MutableLiveData() - val nickNameLiveData: LiveData = _nickNameLiveData + private val _nickNameLiveData = MutableLiveData() + val nickNameLiveData: LiveData = _nickNameLiveData - private val _memberTypeLiveData = MutableLiveData() - val memberTypeLiveData: LiveData = _memberTypeLiveData + private val _memberTypeLiveData = MutableLiveData() + val memberTypeLiveData: LiveData = _memberTypeLiveData - private val _profileImageLiveData = MutableLiveData(ProfileImageUiModel()) - val profileImageLiveData: LiveData = _profileImageLiveData + private val _profileImageLiveData = MutableLiveData(ProfileImageModel()) + val profileImageLiveData: LiveData = _profileImageLiveData private val _signUpResultLiveData = - MutableLiveData>>() - val signUpResultLiveData: LiveData>> = + MutableLiveData>>() + val signUpResultLiveData: LiveData>> = _signUpResultLiveData private val _termsOfServiceLiveData = MutableLiveData() @@ -106,34 +106,34 @@ class SignUpViewModel @AssistedInject constructor( fun selectTypeParent() { if (memberTypeLiveData.value?.isParent() == true) return - _memberTypeLiveData.value = MemberTypeUiModel(selectedType = MemberTypeUiModel.Type.PARENT) + _memberTypeLiveData.value = MemberTypeModel(selectedType = MemberTypeModel.Type.PARENT) } fun selectTypeKid() { if (memberTypeLiveData.value?.isKid() == true) return _memberTypeLiveData.value = - MemberTypeUiModel( - selectedType = MemberTypeUiModel.Type.KID, + MemberTypeModel( + selectedType = MemberTypeModel.Type.KID, selectedTypeId = KID_TYPE_ID ) } fun selectParentType(selectedTypeId: Int?) { - val memberTypeUiModel = memberTypeLiveData.value ?: MemberTypeUiModel() - _memberTypeLiveData.value = memberTypeUiModel.copy(selectedTypeId = selectedTypeId) + val memberTypeModel = memberTypeLiveData.value ?: MemberTypeModel() + _memberTypeLiveData.value = memberTypeModel.copy(selectedTypeId = selectedTypeId) } fun setNickNameValue(nickName: String) { checkNickNameValidationJob?.cancel() - val prevData = _nickNameLiveData.value ?: NickNameUiModel() - _nickNameLiveData.value = NickNameUiModel( + val prevData = _nickNameLiveData.value ?: NickNameModel() + _nickNameLiveData.value = NickNameModel( nickName = nickName, isEdited = prevData.isEdited || nickName.isNotEmpty() ) } fun setProfileImagePath(path: String?) { - _profileImageLiveData.value = ProfileImageUiModel(path = path) + _profileImageLiveData.value = ProfileImageModel(path = path) } fun requestCheckNickNameValidation() { @@ -184,9 +184,9 @@ class SignUpViewModel @AssistedInject constructor( profileImagePath = profileImageLiveData.value?.path ).onSuccess { signUpResponseData -> signUpResponseData?.accessToken?.let { - val signUpResultUiModel = - SignUpResultUiModel(accessToken = it, memberTypeId = memberTypeId) - setSignUpResultSuccess(data = signUpResultUiModel) + val signUpResultModel = + SignUpResultModel(accessToken = it, memberTypeId = memberTypeId) + setSignUpResultSuccess(data = signUpResultModel) } ?: run { setSignUpResultError() } @@ -216,7 +216,7 @@ class SignUpViewModel @AssistedInject constructor( _signUpResultLiveData.value = EventWrapper(ModelState.Loading()) } - private fun setSignUpResultSuccess(data: SignUpResultUiModel) { + private fun setSignUpResultSuccess(data: SignUpResultModel) { _signUpResultLiveData.value = EventWrapper(ModelState.Success(data = data)) } diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/MemberTypeUiModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/MemberTypeModel.kt similarity index 90% rename from app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/MemberTypeUiModel.kt rename to app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/MemberTypeModel.kt index ac4af46c..377ed030 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/MemberTypeUiModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/MemberTypeModel.kt @@ -1,6 +1,6 @@ package com.polzzak_android.presentation.feature.auth.signup.model -data class MemberTypeUiModel( +data class MemberTypeModel( val selectedType: Type? = null, val selectedTypeId: Int? = null ) { diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/NickNameUiModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/NickNameModel.kt similarity index 88% rename from app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/NickNameUiModel.kt rename to app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/NickNameModel.kt index 25c3d0c1..9b484d0b 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/NickNameUiModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/NickNameModel.kt @@ -1,6 +1,6 @@ package com.polzzak_android.presentation.feature.auth.signup.model -data class NickNameUiModel( +data class NickNameModel( val nickName: String? = null, val nickNameState: NickNameValidationState = NickNameValidationState.Unchecked, val isEdited: Boolean = false diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/ProfileImageUiModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/ProfileImageModel.kt similarity index 75% rename from app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/ProfileImageUiModel.kt rename to app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/ProfileImageModel.kt index 3131163a..436f1aa2 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/ProfileImageUiModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/ProfileImageModel.kt @@ -1,5 +1,5 @@ package com.polzzak_android.presentation.feature.auth.signup.model -data class ProfileImageUiModel( +data class ProfileImageModel( val path: String? = null ) \ No newline at end of file diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/SignUpResultUiModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/SignUpResultModel.kt similarity index 79% rename from app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/SignUpResultUiModel.kt rename to app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/SignUpResultModel.kt index 9ea5d323..f5e8aa6d 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/SignUpResultUiModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/auth/signup/model/SignUpResultModel.kt @@ -1,6 +1,6 @@ package com.polzzak_android.presentation.feature.auth.signup.model -data class SignUpResultUiModel( +data class SignUpResultModel( val accessToken: String, val memberTypeId: Int ) diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/link/management/base/BaseLinkManagementFragment.kt b/app/src/main/java/com/polzzak_android/presentation/feature/link/management/base/BaseLinkManagementFragment.kt index 28ec63ab..285030d8 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/link/management/base/BaseLinkManagementFragment.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/link/management/base/BaseLinkManagementFragment.kt @@ -274,7 +274,16 @@ abstract class BaseLinkManagementFragment : BaseFragment R.drawable.ic_search_option_menu_kid + LinkMemberType.PROTECTOR -> R.drawable.ic_search_option_menu_parent + } + listOf( + LinkManagementMainEmptyItem( + imageDrawableRes = imageDrawableRes, + content = content + ) + ) } items.addAll(linkedUserItems) } @@ -309,7 +318,12 @@ abstract class BaseLinkManagementFragment : BaseFragment() { override val layoutRes: Int = R.layout.item_link_management_main_empty @@ -12,9 +16,10 @@ class LinkManagementMainEmptyItem(private val content: String) : other is LinkManagementMainEmptyItem override fun areContentsTheSame(other: BindableItem<*>): Boolean = - other is LinkManagementMainEmptyItem && this.content == other.content + other is LinkManagementMainEmptyItem && this.content == other.content && this.imageDrawableRes == other.imageDrawableRes override fun bind(binding: ItemLinkManagementMainEmptyBinding, position: Int) { binding.tvContent.text = content + binding.ivIcon.setImageResource(imageDrawableRes) } } diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/link/search/kid/KidSearchOptionMenuFragment.kt b/app/src/main/java/com/polzzak_android/presentation/feature/link/search/kid/KidSearchOptionMenuFragment.kt index 399c848d..20001925 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/link/search/kid/KidSearchOptionMenuFragment.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/link/search/kid/KidSearchOptionMenuFragment.kt @@ -4,8 +4,7 @@ import com.polzzak_android.R import com.polzzak_android.presentation.feature.link.search.base.BaseSearchOptionMenuFragment class KidSearchOptionMenuFragment : BaseSearchOptionMenuFragment() { - //TODO 임시 drawable -> 디자인가이드 적용 필요 - override val iconDrawableRes: Int = R.drawable.logo_first + override val iconDrawableRes: Int = R.drawable.ic_search_option_menu_kid override val contentStringRes: Int = R.string.search_main_kid_content override val actionNavigateHostFragment: Int = diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/link/search/protector/ProtectorSearchOptionMenuFragment.kt b/app/src/main/java/com/polzzak_android/presentation/feature/link/search/protector/ProtectorSearchOptionMenuFragment.kt index d86a9f9a..05ad270b 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/link/search/protector/ProtectorSearchOptionMenuFragment.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/link/search/protector/ProtectorSearchOptionMenuFragment.kt @@ -4,8 +4,7 @@ import com.polzzak_android.R import com.polzzak_android.presentation.feature.link.search.base.BaseSearchOptionMenuFragment class ProtectorSearchOptionMenuFragment : BaseSearchOptionMenuFragment() { - //TODO 임시 drawable -> 디자인가이드 적용 필요 - override val iconDrawableRes: Int = R.drawable.logo_third + override val iconDrawableRes: Int = R.drawable.ic_search_option_menu_parent override val contentStringRes: Int = R.string.search_main_parent_content override val actionNavigateHostFragment: Int = diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/item/OnBoardingPageItem.kt b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/item/OnBoardingPageItem.kt index 632fa7d3..68dfcfb8 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/item/OnBoardingPageItem.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/item/OnBoardingPageItem.kt @@ -20,6 +20,7 @@ class OnBoardingPageItem( with(binding) { tvTitle.text = binding.root.context.getString(model.titleStringRes) tvContent.text = binding.root.context.getString(model.contentStringRes) + ivIcon.setImageResource(model.imageDrawableRes) } } } \ No newline at end of file diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/kid/KidOnBoardingFragment.kt b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/kid/KidOnBoardingFragment.kt index 8d8ac35a..36333a84 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/kid/KidOnBoardingFragment.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/kid/KidOnBoardingFragment.kt @@ -19,10 +19,19 @@ class KidOnBoardingFragment : BaseOnBoardingFragment() { R.string.on_boarding_kid_fourth_content, R.string.on_boarding_kid_fifth_content ) + private val imageDrawableResList = listOf( + R.drawable.ic_onboarding_first, + R.drawable.ic_onboarding_second, + R.drawable.ic_onboarding_third, + R.drawable.ic_onboarding_kid_fourth, + R.drawable.ic_onboarding_kid_fifth + ) + override val pageData = List(5) { OnBoardingPageModel( titleStringRes = titleStringResList[it], contentStringRes = contentStringResList[it], + imageDrawableRes = imageDrawableResList[it], progress = it + 1, maxCount = 5 ) diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/model/OnBoardingPageModel.kt b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/model/OnBoardingPageModel.kt index ebc68689..cf8d0842 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/model/OnBoardingPageModel.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/model/OnBoardingPageModel.kt @@ -1,10 +1,12 @@ package com.polzzak_android.presentation.feature.onboarding.model +import androidx.annotation.DrawableRes import androidx.annotation.StringRes data class OnBoardingPageModel( @StringRes val titleStringRes: Int, @StringRes val contentStringRes: Int, + @DrawableRes val imageDrawableRes: Int, val progress: Int, val maxCount: Int ) diff --git a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/protector/ProtectorOnBoardingFragment.kt b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/protector/ProtectorOnBoardingFragment.kt index 1f2671ea..d34d9043 100644 --- a/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/protector/ProtectorOnBoardingFragment.kt +++ b/app/src/main/java/com/polzzak_android/presentation/feature/onboarding/protector/ProtectorOnBoardingFragment.kt @@ -19,10 +19,19 @@ class ProtectorOnBoardingFragment : BaseOnBoardingFragment() { R.string.on_boarding_parent_fourth_content, R.string.on_boarding_parent_fifth_content ) + private val imageDrawableResList = listOf( + R.drawable.ic_onboarding_first, + R.drawable.ic_onboarding_second, + R.drawable.ic_onboarding_third, + R.drawable.ic_onboarding_parent_fourth, + R.drawable.ic_onboarding_parent_fifth + ) + override val pageData = List(5) { OnBoardingPageModel( titleStringRes = titleStringResList[it], contentStringRes = contentStringResList[it], + imageDrawableRes = imageDrawableResList[it], progress = it + 1, maxCount = 5 ) diff --git a/app/src/main/res/drawable-nodpi/ic_login_logo.png b/app/src/main/res/drawable-nodpi/ic_login_logo.png new file mode 100644 index 00000000..9786ff3f Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_login_logo.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_onboarding_first.png b/app/src/main/res/drawable-nodpi/ic_onboarding_first.png new file mode 100644 index 00000000..b4afc534 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_onboarding_first.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_onboarding_kid_fifth.png b/app/src/main/res/drawable-nodpi/ic_onboarding_kid_fifth.png new file mode 100644 index 00000000..b5dae038 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_onboarding_kid_fifth.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_onboarding_kid_fourth.png b/app/src/main/res/drawable-nodpi/ic_onboarding_kid_fourth.png new file mode 100644 index 00000000..0b5b2f0e Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_onboarding_kid_fourth.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_onboarding_parent_fifth.png b/app/src/main/res/drawable-nodpi/ic_onboarding_parent_fifth.png new file mode 100644 index 00000000..84124975 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_onboarding_parent_fifth.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_onboarding_parent_fourth.png b/app/src/main/res/drawable-nodpi/ic_onboarding_parent_fourth.png new file mode 100644 index 00000000..fdcef7b9 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_onboarding_parent_fourth.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_onboarding_second.png b/app/src/main/res/drawable-nodpi/ic_onboarding_second.png new file mode 100644 index 00000000..d6069f79 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_onboarding_second.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_onboarding_third.png b/app/src/main/res/drawable-nodpi/ic_onboarding_third.png new file mode 100644 index 00000000..b73bc91a Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_onboarding_third.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_search_option_menu_kid.png b/app/src/main/res/drawable-nodpi/ic_search_option_menu_kid.png new file mode 100644 index 00000000..092ef9a9 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_search_option_menu_kid.png differ diff --git a/app/src/main/res/drawable-nodpi/ic_search_option_menu_parent.png b/app/src/main/res/drawable-nodpi/ic_search_option_menu_parent.png new file mode 100644 index 00000000..52bc4370 Binary files /dev/null and b/app/src/main/res/drawable-nodpi/ic_search_option_menu_parent.png differ diff --git a/app/src/main/res/drawable/ic_link_request_empty.xml b/app/src/main/res/drawable/ic_link_request_empty.xml new file mode 100644 index 00000000..16673f37 --- /dev/null +++ b/app/src/main/res/drawable/ic_link_request_empty.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_link_request_guide.xml b/app/src/main/res/drawable/ic_link_request_guide.xml new file mode 100644 index 00000000..4d7b832b --- /dev/null +++ b/app/src/main/res/drawable/ic_link_request_guide.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/ic_my_delete_account.xml b/app/src/main/res/drawable/ic_my_delete_account.xml new file mode 100644 index 00000000..c99518df --- /dev/null +++ b/app/src/main/res/drawable/ic_my_delete_account.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_sign_up_kid_select_image.xml b/app/src/main/res/drawable/ic_sign_up_kid_select_image.xml new file mode 100644 index 00000000..1bbe24df --- /dev/null +++ b/app/src/main/res/drawable/ic_sign_up_kid_select_image.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_sign_up_parent_select_image.xml b/app/src/main/res/drawable/ic_sign_up_parent_select_image.xml new file mode 100644 index 00000000..713468f9 --- /dev/null +++ b/app/src/main/res/drawable/ic_sign_up_parent_select_image.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_sign_up_select_kid.xml b/app/src/main/res/drawable/ic_sign_up_select_kid.xml new file mode 100644 index 00000000..d904ec84 --- /dev/null +++ b/app/src/main/res/drawable/ic_sign_up_select_kid.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_sign_up_select_parent.xml b/app/src/main/res/drawable/ic_sign_up_select_parent.xml new file mode 100644 index 00000000..66d57a0b --- /dev/null +++ b/app/src/main/res/drawable/ic_sign_up_select_parent.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_login_logo.png b/app/src/main/res/drawable/img_login_logo.png deleted file mode 100644 index 33e0e39d..00000000 Binary files a/app/src/main/res/drawable/img_login_logo.png and /dev/null differ diff --git a/app/src/main/res/drawable/shape_rectangle_gray_100_r12.xml b/app/src/main/res/drawable/shape_rectangle_gray_100_r12.xml new file mode 100644 index 00000000..2e23407e --- /dev/null +++ b/app/src/main/res/drawable/shape_rectangle_gray_100_r12.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_kid_notification.xml b/app/src/main/res/layout/fragment_kid_notification.xml deleted file mode 100644 index e361bdf6..00000000 --- a/app/src/main/res/layout/fragment_kid_notification.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_login.xml b/app/src/main/res/layout/fragment_login.xml index 9178cc94..398b1a0f 100644 --- a/app/src/main/res/layout/fragment_login.xml +++ b/app/src/main/res/layout/fragment_login.xml @@ -15,9 +15,9 @@ + android:layout_height="match_parent" + android:background="@color/white"> - - + app:layout_constraintTop_toBottomOf="@id/tvTitle"> + + + + + app:layout_constraintTop_toBottomOf="@id/clImageBackground" /> - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_search_option_menu.xml b/app/src/main/res/layout/fragment_search_option_menu.xml index ae7cfce9..6c82be33 100644 --- a/app/src/main/res/layout/fragment_search_option_menu.xml +++ b/app/src/main/res/layout/fragment_search_option_menu.xml @@ -23,7 +23,6 @@ android:id="@+id/ivIcon" android:layout_width="256dp" android:layout_height="256dp" - app:layout_constraintBottom_toTopOf="@id/tvContent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -75,7 +74,6 @@ app:layout_constraintTop_toTopOf="parent" tools:text="아이 찾기" /> - - + app:layout_constraintVertical_chainStyle="packed" + tools:background="@drawable/ic_link_request_empty" /> - - - - - + @@ -12,12 +12,12 @@ android:layout_width="256dp" android:layout_height="256dp" android:layout_marginTop="90dp" - android:background="@drawable/ic_launcher_background" app:layout_constraintBottom_toTopOf="@id/tvTitle" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_chainStyle="packed" /> + app:layout_constraintVertical_chainStyle="packed" + tools:background="@drawable/ic_onboarding_first" /> + android:fillViewport="true" + android:scrollbars="none"> - - - - \ No newline at end of file diff --git a/app/src/main/res/navigation/protector_nav_graph.xml b/app/src/main/res/navigation/protector_nav_graph.xml index 73d55720..a8d648a7 100644 --- a/app/src/main/res/navigation/protector_nav_graph.xml +++ b/app/src/main/res/navigation/protector_nav_graph.xml @@ -59,7 +59,7 @@ android:id="@+id/protectorNotificationFragment" android:name="com.polzzak_android.presentation.feature.notification.list.protector.ProtectorNotificationListFragment" android:label="ProtectorNotificationFragment" - tools:layout="@layout/fragment_protector_notification"> + tools:layout="@layout/fragment_notification_list">