diff --git a/core/src/main/java/kr/genti/core/extension/ViewExt.kt b/core/src/main/java/kr/genti/core/extension/ViewExt.kt index aa0f008d..1ead55e2 100644 --- a/core/src/main/java/kr/genti/core/extension/ViewExt.kt +++ b/core/src/main/java/kr/genti/core/extension/ViewExt.kt @@ -4,6 +4,9 @@ import android.graphics.LinearGradient import android.graphics.RenderEffect import android.graphics.Shader import android.os.Build +import android.text.Spannable +import android.text.SpannableString +import android.text.style.ImageSpan import android.view.View import android.widget.TextView @@ -44,3 +47,10 @@ fun TextView.setGradientText(startColor: Int, endColor: Int) { Shader.TileMode.CLAMP ) } + +fun TextView.setTextWithImage(text: String, imageResId: Int) { + val spannableString = SpannableString(" $text") + val imageSpan = ImageSpan(context, imageResId, ImageSpan.ALIGN_BOTTOM) + spannableString.setSpan(imageSpan, 0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE) + this.text = spannableString +} \ No newline at end of file diff --git a/data/src/main/java/kr/genti/data/dto/request/CreateRequestDto.kt b/data/src/main/java/kr/genti/data/dto/request/CreateRequestDto.kt index f50f5795..c5d78d6a 100644 --- a/data/src/main/java/kr/genti/data/dto/request/CreateRequestDto.kt +++ b/data/src/main/java/kr/genti/data/dto/request/CreateRequestDto.kt @@ -12,14 +12,8 @@ import kr.genti.domain.enums.ShotCoverage data class CreateRequestDto( @SerialName("prompt") val prompt: String, - @SerialName("posePicture") - val posePicture: KeyRequestDto?, @SerialName("facePictureList") val facePictureList: List, - @SerialName("cameraAngle") - val cameraAngle: CameraAngle, - @SerialName("shotCoverage") - val shotCoverage: ShotCoverage, @SerialName("pictureRatio") val pictureRatio: PictureRatio, ) { @@ -27,10 +21,7 @@ data class CreateRequestDto( fun CreateRequestModel.toDto() = CreateRequestDto( prompt, - posePicture?.toDto(), facePictureList.map { it.toDto() }, - cameraAngle, - shotCoverage, pictureRatio, ) } diff --git a/domain/src/main/kotlin/kr/genti/domain/entity/request/CreateRequestModel.kt b/domain/src/main/kotlin/kr/genti/domain/entity/request/CreateRequestModel.kt index 742e7ae3..bcac2fff 100644 --- a/domain/src/main/kotlin/kr/genti/domain/entity/request/CreateRequestModel.kt +++ b/domain/src/main/kotlin/kr/genti/domain/entity/request/CreateRequestModel.kt @@ -6,9 +6,6 @@ import kr.genti.domain.enums.ShotCoverage data class CreateRequestModel( val prompt: String, - val posePicture: KeyRequestModel?, val facePictureList: List, - val cameraAngle: CameraAngle, - val shotCoverage: ShotCoverage, val pictureRatio: PictureRatio, ) diff --git a/presentation/src/main/java/kr/genti/presentation/create/CreateViewModel.kt b/presentation/src/main/java/kr/genti/presentation/create/CreateViewModel.kt index 0361c65b..10f59550 100644 --- a/presentation/src/main/java/kr/genti/presentation/create/CreateViewModel.kt +++ b/presentation/src/main/java/kr/genti/presentation/create/CreateViewModel.kt @@ -14,16 +14,12 @@ import kr.genti.domain.entity.request.CreateRequestModel import kr.genti.domain.entity.request.KeyRequestModel import kr.genti.domain.entity.request.S3RequestModel import kr.genti.domain.entity.response.ImageFileModel -import kr.genti.domain.entity.response.ImageFileModel.Companion.emptyImageFileModel import kr.genti.domain.entity.response.S3PresignedUrlModel -import kr.genti.domain.enums.CameraAngle import kr.genti.domain.enums.FileType import kr.genti.domain.enums.PictureRatio -import kr.genti.domain.enums.ShotCoverage import kr.genti.domain.repository.CreateRepository import kr.genti.domain.repository.UploadRepository import javax.inject.Inject -import kotlin.random.Random @HiltViewModel class CreateViewModel @@ -33,12 +29,9 @@ constructor( private val uploadRepository: UploadRepository, ) : ViewModel() { val prompt = MutableLiveData() - var plusImage = emptyImageFileModel() val isWritten = MutableLiveData(false) val selectedRatio = MutableLiveData() - val selectedAngle = MutableLiveData() - val selectedCoverage = MutableLiveData() val isSelected = MutableLiveData(false) var imageList = listOf() @@ -47,12 +40,9 @@ constructor( private val _currentPercent = MutableStateFlow(33) val currentPercent: StateFlow = _currentPercent - private var currentPrompt: String = "" - private val _totalGeneratingState = MutableStateFlow>(UiState.Empty) val totalGeneratingState: StateFlow> = _totalGeneratingState - private var plusImageS3Key = KeyRequestModel(null) private var imageS3KeyList = listOf() fun modCurrentPercent(amount: Int) { @@ -65,32 +55,14 @@ constructor( fun selectRatio(item: PictureRatio) { selectedRatio.value = item - checkSelected() - } - - fun selectAngle(item: CameraAngle) { - selectedAngle.value = item - checkSelected() - } - - fun selectFrame(item: ShotCoverage) { - selectedCoverage.value = item - checkSelected() - } - - private fun checkSelected() { - isSelected.value = - selectedRatio.value != null && selectedAngle.value != null && selectedCoverage.value != null + isSelected.value = selectedRatio.value != null } fun startSendingImages() { _totalGeneratingState.value = UiState.Loading viewModelScope.launch { runCatching { - listOfNotNull( - if (plusImage.id != (-1).toLong()) async { getSingleS3Url() } else null, - async { getMultiS3Urls() }, - ).awaitAll() + getMultiS3Urls() }.onSuccess { postToGenerateImage() }.onFailure { @@ -99,18 +71,6 @@ constructor( } } - private suspend fun getSingleS3Url() { - createRepository.getS3SingleUrl( - S3RequestModel(FileType.USER_UPLOADED_IMAGE, plusImage.name), - ) - .onSuccess { uriModel -> - plusImageS3Key = KeyRequestModel(uriModel.s3Key) - postSingleImage(uriModel) - }.onFailure { - _totalGeneratingState.value = UiState.Failure(it.message.toString()) - } - } - private suspend fun getMultiS3Urls() { createRepository.getS3MultiUrl( listOf( @@ -126,13 +86,6 @@ constructor( } } - private suspend fun postSingleImage(urlModel: S3PresignedUrlModel) { - uploadRepository.uploadImage(urlModel.url, plusImage.url) - .onFailure { - _totalGeneratingState.value = UiState.Failure(it.message.toString()) - } - } - private suspend fun postMultiImage(urlModelList: List) { urlModelList.mapIndexed { i, urlModel -> viewModelScope.async { @@ -149,10 +102,7 @@ constructor( createRepository.postToCreate( CreateRequestModel( prompt.value ?: return@launch, - plusImageS3Key, imageS3KeyList, - selectedAngle.value ?: return@launch, - selectedCoverage.value ?: return@launch, selectedRatio.value ?: return@launch, ), ) @@ -168,12 +118,6 @@ constructor( _totalGeneratingState.value = UiState.Empty } - fun getRandomPrompt(): String { - val randomPrompt = promptList[Random.nextInt(promptList.size)] - if (randomPrompt != currentPrompt) currentPrompt = randomPrompt - return currentPrompt - } - companion object { val promptList = listOf( diff --git a/presentation/src/main/java/kr/genti/presentation/create/DefineFragment.kt b/presentation/src/main/java/kr/genti/presentation/create/DefineFragment.kt index 71b6fe68..a43ae559 100644 --- a/presentation/src/main/java/kr/genti/presentation/create/DefineFragment.kt +++ b/presentation/src/main/java/kr/genti/presentation/create/DefineFragment.kt @@ -8,6 +8,8 @@ import androidx.viewpager2.widget.ViewPager2 import dagger.hilt.android.AndroidEntryPoint import kr.genti.core.base.BaseFragment import kr.genti.core.extension.setOnSingleClickListener +import kr.genti.core.extension.setTextWithImage +import kr.genti.core.extension.stringOf import kr.genti.presentation.R import kr.genti.presentation.create.CreateViewModel.Companion.promptList import kr.genti.presentation.databinding.FragmentDefineBinding @@ -37,7 +39,17 @@ class DefineFragment() : BaseFragment(R.layout.fragment_d } private fun initView() { - binding.vm = viewModel + with(binding) { + vm = viewModel + tvCreateScriptSubtitle1.setTextWithImage( + stringOf(R.string.create_tv_script_subtitle_1), + R.drawable.ic_check, + ) + tvCreateScriptSubtitle2.setTextWithImage( + stringOf(R.string.create_tv_script_subtitle_2), + R.drawable.ic_check, + ) + } } private fun initCreateBtnListener() { diff --git a/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt b/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt index 543358bc..b75617ec 100644 --- a/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt +++ b/presentation/src/main/java/kr/genti/presentation/create/SelfieFragment.kt @@ -5,10 +5,6 @@ import android.app.Activity.RESULT_OK import android.content.Intent import android.net.Uri import android.os.Bundle -import android.text.SpannableString -import android.text.SpannableStringBuilder -import android.text.Spanned -import android.text.style.BulletSpan import android.view.View import androidx.activity.OnBackPressedCallback import androidx.activity.result.ActivityResultLauncher @@ -27,6 +23,7 @@ import kotlinx.coroutines.flow.onEach import kr.genti.core.base.BaseFragment import kr.genti.core.extension.getFileName import kr.genti.core.extension.setOnSingleClickListener +import kr.genti.core.extension.setTextWithImage import kr.genti.core.extension.stringOf import kr.genti.core.extension.toast import kr.genti.core.state.UiState @@ -39,7 +36,6 @@ import kr.genti.presentation.util.AmplitudeManager import kr.genti.presentation.util.AmplitudeManager.EVENT_CLICK_BTN import kr.genti.presentation.util.AmplitudeManager.PROPERTY_BTN import kr.genti.presentation.util.AmplitudeManager.PROPERTY_PAGE -import kotlin.math.max @AndroidEntryPoint class SelfieFragment : BaseFragment(R.layout.fragment_selfie) { @@ -61,8 +57,6 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel initRequestCreateBtnListener() setGalleryImageWithPhotoPicker() setGalleryImageWithGalleryPicker() - setBulletPointList() - setGuideListBlur() initWaitingResult() observeGeneratingState() } @@ -74,7 +68,21 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel } private fun initView() { - binding.vm = viewModel + with(binding) { + vm = viewModel + tvSelfieGuide1.setTextWithImage( + stringOf(R.string.selfie_tv_guide_1), + R.drawable.ic_check, + ) + tvSelfieGuide2.setTextWithImage( + stringOf(R.string.selfie_tv_guide_2), + R.drawable.ic_check, + ) + tvSelfieGuide3.setTextWithImage( + stringOf(R.string.selfie_tv_guide_3), + R.drawable.ic_check, + ) + } } private fun initBackPressedListener() { @@ -89,28 +97,18 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel } private fun initAddImageBtnListener() { - with(binding) { - btnSelfieAdd.setOnSingleClickListener { - AmplitudeManager.trackEvent( - EVENT_CLICK_BTN, - mapOf(PROPERTY_PAGE to "create3"), - mapOf(PROPERTY_BTN to "selectpic"), - ) - checkAndGetImages() - } - layoutAddedImage.setOnSingleClickListener { - AmplitudeManager.trackEvent( - EVENT_CLICK_BTN, - mapOf(PROPERTY_PAGE to "create3"), - mapOf(PROPERTY_BTN to "reselectpic"), - ) - checkAndGetImages() - } + binding.btnSelfieAdd.setOnSingleClickListener { + AmplitudeManager.trackEvent( + EVENT_CLICK_BTN, + mapOf(PROPERTY_PAGE to "create3"), + mapOf(PROPERTY_BTN to "selectpic"), + ) + checkAndGetImages() } } private fun initRequestCreateBtnListener() { - binding.btnSelfieNext.setOnSingleClickListener { + binding.btnCreate.setOnSingleClickListener { AmplitudeManager.trackEvent( EVENT_CLICK_BTN, mapOf(PROPERTY_PAGE to "create3"), @@ -177,62 +175,22 @@ class SelfieFragment : BaseFragment(R.layout.fragment_sel } isCompleted.value = uris.size == 3 } - with(binding) { - listOf(ivAddedImage1, ivAddedImage2, ivAddedImage3).apply { - forEach { it.setImageDrawable(null) } - uris.take(size).forEachIndexed { index, uri -> - this[index].load(uri) - } - } - } - binding.layoutAddedImage.isVisible = uris.isNotEmpty() + setSavedImages() } private fun setSavedImages() { - if (viewModel.imageList.isNotEmpty()) { - val imageViews = - with(binding) { listOf(ivAddedImage1, ivAddedImage2, ivAddedImage3) } - imageViews.forEach { it.setImageDrawable(null) } - viewModel.imageList - .take(3) - .forEachIndexed { index, imageFile -> imageViews[index].load(imageFile.url) } - binding.layoutAddedImage.isVisible = true - } - } - - private fun setBulletPointList() { - val points = - listOf( - stringOf(R.string.selfie_tv_guide_one), - stringOf(R.string.selfie_tv_guide_two), - stringOf(R.string.selfie_tv_guide_three), - stringOf(R.string.selfie_tv_guide_four), - ) - val spannableStringBuilder = SpannableStringBuilder() - points.forEach { point -> - val spannableString = - SpannableString(point).apply { - setSpan( - BulletSpan(15), - 0, - point.length, - Spanned.SPAN_EXCLUSIVE_EXCLUSIVE, - ) - } - with(spannableStringBuilder) { - append(spannableString) - append("\n") - } - } - binding.tvSelfieGuideBody.text = spannableStringBuilder - } - - private fun setGuideListBlur() { with(binding) { - svSelfieGuide.setOnScrollChangeListener { _, _, scrollY, _, _ -> - ivSelfieBlurBottom.alpha = max(0.0, (1 - scrollY / 500f).toDouble()).toFloat() - ivSelfieBlurTop.alpha = 1 - max(0.0, (1 - scrollY / 100f).toDouble()).toFloat() + listOf(ivAddedImage1, ivAddedImage2, ivAddedImage3).apply { + forEach { it.setImageDrawable(null) } + viewModel.imageList.take(size).forEachIndexed { index, file -> + this[index].load(file.url) + } } + layoutAddedImage.isVisible = viewModel.imageList.isNotEmpty() + layoutExampleImage.isVisible = viewModel.imageList.isEmpty() + btnSelfieAdd.text = + if (viewModel.imageList.isEmpty()) stringOf(R.string.selfie_tv_btn_select) + else stringOf(R.string.selfie_tv_btn_reselect) } } diff --git a/presentation/src/main/res/drawable/ic_check.xml b/presentation/src/main/res/drawable/ic_check.xml new file mode 100644 index 00000000..e8f62be3 --- /dev/null +++ b/presentation/src/main/res/drawable/ic_check.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/presentation/src/main/res/drawable/img_angle_high.xml b/presentation/src/main/res/drawable/img_angle_high.xml deleted file mode 100644 index 17eed1fc..00000000 --- a/presentation/src/main/res/drawable/img_angle_high.xml +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/presentation/src/main/res/drawable/img_angle_low.xml b/presentation/src/main/res/drawable/img_angle_low.xml deleted file mode 100644 index 4cfbb1d6..00000000 --- a/presentation/src/main/res/drawable/img_angle_low.xml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/presentation/src/main/res/drawable/img_angle_middle.xml b/presentation/src/main/res/drawable/img_angle_middle.xml deleted file mode 100644 index ab921dab..00000000 --- a/presentation/src/main/res/drawable/img_angle_middle.xml +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/presentation/src/main/res/drawable/img_blur_bottom.png b/presentation/src/main/res/drawable/img_blur_bottom.png deleted file mode 100644 index b406c9f0..00000000 Binary files a/presentation/src/main/res/drawable/img_blur_bottom.png and /dev/null differ diff --git a/presentation/src/main/res/drawable/img_blur_top.png b/presentation/src/main/res/drawable/img_blur_top.png deleted file mode 100644 index 206a4d0d..00000000 Binary files a/presentation/src/main/res/drawable/img_blur_top.png and /dev/null differ diff --git a/presentation/src/main/res/drawable/img_frame_full.xml b/presentation/src/main/res/drawable/img_frame_full.xml deleted file mode 100644 index 41de0845..00000000 --- a/presentation/src/main/res/drawable/img_frame_full.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/presentation/src/main/res/drawable/img_frame_knee.xml b/presentation/src/main/res/drawable/img_frame_knee.xml deleted file mode 100644 index 50078074..00000000 --- a/presentation/src/main/res/drawable/img_frame_knee.xml +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/presentation/src/main/res/drawable/img_frame_upper.xml b/presentation/src/main/res/drawable/img_frame_upper.xml deleted file mode 100644 index cf10705f..00000000 --- a/presentation/src/main/res/drawable/img_frame_upper.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/presentation/src/main/res/drawable/img_ratio_2_3.xml b/presentation/src/main/res/drawable/img_ratio_2_3.xml index a5f0065c..e500087b 100644 --- a/presentation/src/main/res/drawable/img_ratio_2_3.xml +++ b/presentation/src/main/res/drawable/img_ratio_2_3.xml @@ -1,237 +1,20 @@ + android:width="61dp" + android:height="61dp" + android:viewportWidth="61" + android:viewportHeight="61"> - - - - - - - - - - - - - - - - - - - - - - - - - + android:pathData="M4.618,10.723L56.618,10.723A4,4 0,0 1,60.618 14.723L60.618,46.723A4,4 0,0 1,56.618 50.723L4.618,50.723A4,4 0,0 1,0.618 46.723L0.618,14.723A4,4 0,0 1,4.618 10.723z" + android:fillColor="#ffffff" + android:fillAlpha="0.1"/> + android:strokeColor="#ffffff"/> - - - - - - - - - - - - + android:pathData="M30.618,30.222C29.518,30.222 28.576,29.83 27.793,29.047C27.01,28.264 26.618,27.322 26.618,26.222C26.618,25.122 27.01,24.181 27.793,23.397C28.576,22.614 29.518,22.222 30.618,22.222C31.718,22.222 32.66,22.614 33.443,23.397C34.227,24.181 34.618,25.122 34.618,26.222C34.618,27.322 34.227,28.264 33.443,29.047C32.66,29.83 31.718,30.222 30.618,30.222ZM22.618,38.222V35.422C22.618,34.855 22.764,34.335 23.056,33.86C23.347,33.385 23.735,33.022 24.218,32.772C25.251,32.256 26.302,31.868 27.368,31.61C28.435,31.351 29.518,31.222 30.618,31.222C31.718,31.222 32.801,31.351 33.868,31.61C34.935,31.868 35.985,32.256 37.018,32.772C37.501,33.022 37.889,33.385 38.181,33.86C38.472,34.335 38.618,34.855 38.618,35.422V38.222H22.618Z" + android:fillColor="#ffffff" + android:fillAlpha="0.8"/> diff --git a/presentation/src/main/res/drawable/img_ratio_3_2.xml b/presentation/src/main/res/drawable/img_ratio_3_2.xml index c51006ad..11fc4425 100644 --- a/presentation/src/main/res/drawable/img_ratio_3_2.xml +++ b/presentation/src/main/res/drawable/img_ratio_3_2.xml @@ -1,237 +1,20 @@ + android:width="61dp" + android:height="61dp" + android:viewportWidth="61" + android:viewportHeight="61"> - - - - - - - - - - - - - - - - - - - - - - - - - + android:pathData="M14.618,0.723L46.618,0.723A4,4 0,0 1,50.618 4.723L50.618,56.723A4,4 0,0 1,46.618 60.723L14.618,60.723A4,4 0,0 1,10.618 56.723L10.618,4.723A4,4 0,0 1,14.618 0.723z" + android:fillColor="#ffffff" + android:fillAlpha="0.1"/> + android:strokeColor="#ffffff"/> - - - - - - - - - - - - + android:pathData="M30.69,30.222C29.59,30.222 28.648,29.83 27.865,29.047C27.081,28.264 26.69,27.322 26.69,26.222C26.69,25.122 27.081,24.181 27.865,23.397C28.648,22.614 29.59,22.222 30.69,22.222C31.789,22.222 32.731,22.614 33.514,23.397C34.298,24.181 34.689,25.122 34.689,26.222C34.689,27.322 34.298,28.264 33.514,29.047C32.731,29.83 31.789,30.222 30.69,30.222ZM22.69,38.222V35.422C22.69,34.855 22.835,34.335 23.127,33.86C23.419,33.385 23.806,33.022 24.289,32.772C25.323,32.256 26.373,31.868 27.44,31.61C28.506,31.351 29.59,31.222 30.69,31.222C31.789,31.222 32.873,31.351 33.939,31.61C35.006,31.868 36.056,32.256 37.09,32.772C37.573,33.022 37.96,33.385 38.252,33.86C38.544,34.335 38.689,34.855 38.689,35.422V38.222H22.69Z" + android:fillColor="#ffffff" + android:fillAlpha="0.8"/> diff --git a/presentation/src/main/res/drawable/img_selfie_ai_one.png b/presentation/src/main/res/drawable/img_selfie_ai_one.png deleted file mode 100644 index be442773..00000000 Binary files a/presentation/src/main/res/drawable/img_selfie_ai_one.png and /dev/null differ diff --git a/presentation/src/main/res/drawable/img_selfie_ai_two.png b/presentation/src/main/res/drawable/img_selfie_ai_two.png deleted file mode 100644 index 0d2449d7..00000000 Binary files a/presentation/src/main/res/drawable/img_selfie_ai_two.png and /dev/null differ diff --git a/presentation/src/main/res/drawable/img_selfie_ex_one.png b/presentation/src/main/res/drawable/img_selfie_ex_one.png deleted file mode 100644 index f264ffdd..00000000 Binary files a/presentation/src/main/res/drawable/img_selfie_ex_one.png and /dev/null differ diff --git a/presentation/src/main/res/drawable/img_selfie_ex_two.png b/presentation/src/main/res/drawable/img_selfie_ex_two.png deleted file mode 100644 index 5d6c6401..00000000 Binary files a/presentation/src/main/res/drawable/img_selfie_ex_two.png and /dev/null differ diff --git a/presentation/src/main/res/drawable/img_selfie_one.png b/presentation/src/main/res/drawable/img_selfie_one.png index fe8da81d..e795d233 100644 Binary files a/presentation/src/main/res/drawable/img_selfie_one.png and b/presentation/src/main/res/drawable/img_selfie_one.png differ diff --git a/presentation/src/main/res/drawable/img_selfie_three.png b/presentation/src/main/res/drawable/img_selfie_three.png index 23e3fae8..1b3e3dc8 100644 Binary files a/presentation/src/main/res/drawable/img_selfie_three.png and b/presentation/src/main/res/drawable/img_selfie_three.png differ diff --git a/presentation/src/main/res/drawable/img_selfie_two.png b/presentation/src/main/res/drawable/img_selfie_two.png index b1900543..765945e0 100644 Binary files a/presentation/src/main/res/drawable/img_selfie_two.png and b/presentation/src/main/res/drawable/img_selfie_two.png differ diff --git a/presentation/src/main/res/drawable/shape_bg_fill_grey7_line_rect.xml b/presentation/src/main/res/drawable/shape_bg_fill_grey7_line_rect.xml deleted file mode 100644 index 737d4775..00000000 --- a/presentation/src/main/res/drawable/shape_bg_fill_grey7_line_rect.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/presentation/src/main/res/drawable/shape_gray_fill_6_rect.xml b/presentation/src/main/res/drawable/shape_gray_fill_6_rect.xml new file mode 100644 index 00000000..08d00065 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_fill_6_rect.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/drawable/shape_gray_fill_green_line_rect.xml b/presentation/src/main/res/drawable/shape_gray_fill_green_line_rect.xml new file mode 100644 index 00000000..606ea5b4 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_fill_green_line_rect.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/drawable/shape_gray_green_fill_6_rect.xml b/presentation/src/main/res/drawable/shape_gray_green_fill_6_rect.xml new file mode 100644 index 00000000..23c8f531 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_green_fill_6_rect.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/drawable/shape_green_gradation_6_rect.xml b/presentation/src/main/res/drawable/shape_green_gradation_6_rect.xml new file mode 100644 index 00000000..971d644b --- /dev/null +++ b/presentation/src/main/res/drawable/shape_green_gradation_6_rect.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/fragment_define.xml b/presentation/src/main/res/layout/fragment_define.xml index 65126633..b9765dcf 100644 --- a/presentation/src/main/res/layout/fragment_define.xml +++ b/presentation/src/main/res/layout/fragment_define.xml @@ -1,7 +1,6 @@ + xmlns:app="http://schemas.android.com/apk/res-auto"> @@ -93,10 +92,10 @@ android:layout_height="16dp" app:ci_drawable="@drawable/ic_indicator_green" app:ci_drawable_unselected="@drawable/ic_indicator_white_30" - app:layout_constraintTop_toBottomOf="@id/vp_create_random" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/vp_create_random" /> diff --git a/presentation/src/main/res/layout/fragment_pose.xml b/presentation/src/main/res/layout/fragment_pose.xml index e38505bf..8f297f40 100644 --- a/presentation/src/main/res/layout/fragment_pose.xml +++ b/presentation/src/main/res/layout/fragment_pose.xml @@ -13,386 +13,175 @@ - - - - + android:background="@color/black"> - - + + + - + - - - - - - + android:layout_marginTop="16dp" + app:layout_constraintTop_toTopOf="parent"/> - - - - - - - - - - - - - - - - - - + app:layout_constraintVertical_chainStyle="packed" + app:layout_constraintTop_toBottomOf="@id/iv_ratio_3_2"/> - - - - + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_ratio_3_2_title"/> - + - + - + + app:layout_constraintEnd_toEndOf="parent" + android:layout_marginTop="16dp" + app:layout_constraintTop_toTopOf="parent"/> - - + style="@style/TextAppearance.Genti.Body_14_Bold" + android:text="@string/pose_btn_garo_title" + android:id="@+id/tv_ratio_2_3_title" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintBottom_toTopOf="@id/tv_ratio_2_3_subitle" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintVertical_chainStyle="packed" + app:layout_constraintTop_toBottomOf="@id/iv_ratio_2_3"/> - - - - + app:layout_constraintTop_toBottomOf="@id/tv_ratio_2_3_title"/> - + diff --git a/presentation/src/main/res/layout/fragment_selfie.xml b/presentation/src/main/res/layout/fragment_selfie.xml index 7d094068..f8b04c95 100644 --- a/presentation/src/main/res/layout/fragment_selfie.xml +++ b/presentation/src/main/res/layout/fragment_selfie.xml @@ -15,354 +15,263 @@ - - - - + android:background="@color/black"> + app:layout_constraintTop_toTopOf="parent"> - - - - - - - - + - + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_selfie_guide_1" /> - + - + - - + android:layout_marginHorizontal="16dp" + android:layout_marginTop="34dp" + android:elevation="2dp" + android:visibility="gone" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_selfie_warning" + tools:visibility="visible"> - + android:layout_height="0dp" + android:layout_margin="1dp" + android:elevation="1dp" + android:scaleType="centerCrop" + app:layout_constraintBottom_toBottomOf="@id/iv_added_image_bg_1" + app:layout_constraintDimensionRatio="1" + app:layout_constraintEnd_toEndOf="@id/iv_added_image_bg_1" + app:layout_constraintStart_toStartOf="@id/iv_added_image_bg_1" + app:layout_constraintTop_toTopOf="@id/iv_added_image_bg_1" + tools:src="@drawable/mock_img_3_2" /> - + app:layout_constraintTop_toTopOf="parent" /> + android:layout_height="0dp" + android:layout_margin="1dp" + android:elevation="1dp" + android:scaleType="centerCrop" + app:layout_constraintBottom_toBottomOf="@id/iv_added_image_bg_2" + app:layout_constraintDimensionRatio="1" + app:layout_constraintEnd_toEndOf="@id/iv_added_image_bg_2" + app:layout_constraintStart_toStartOf="@id/iv_added_image_bg_2" + app:layout_constraintTop_toTopOf="@id/iv_added_image_bg_2" + tools:src="@drawable/mock_img_3_2" /> + android:background="@drawable/shape_gray_fill_green_line_rect" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintDimensionRatio="1" + app:layout_constraintEnd_toStartOf="@id/iv_added_image_bg_3" + app:layout_constraintStart_toEndOf="@id/iv_added_image_bg_1" + app:layout_constraintTop_toTopOf="parent" /> + android:layout_height="0dp" + android:layout_margin="1dp" + android:elevation="1dp" + android:scaleType="centerCrop" + app:layout_constraintBottom_toBottomOf="@id/iv_added_image_bg_3" + app:layout_constraintDimensionRatio="1" + app:layout_constraintEnd_toEndOf="@id/iv_added_image_bg_3" + app:layout_constraintStart_toStartOf="@id/iv_added_image_bg_3" + app:layout_constraintTop_toTopOf="@id/iv_added_image_bg_3" + tools:src="@drawable/mock_img_3_2" /> - + app:layout_constraintStart_toEndOf="@id/iv_added_image_bg_2" + app:layout_constraintTop_toTopOf="parent" /> + + + + + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@id/tv_selfie_input_title" /> - - - - + app:layout_constraintEnd_toStartOf="@id/iv_ex_image_3" + app:layout_constraintStart_toEndOf="@id/iv_ex_image_1" + app:layout_constraintTop_toBottomOf="@id/tv_selfie_input_title" /> - - + app:layout_constraintStart_toEndOf="@id/iv_ex_image_2" + app:layout_constraintTop_toBottomOf="@id/tv_selfie_input_title" /> - - - + - diff --git a/presentation/src/main/res/layout/item_profile_image.xml b/presentation/src/main/res/layout/item_profile_image.xml index 53a60db3..0c8d37b5 100644 --- a/presentation/src/main/res/layout/item_profile_image.xml +++ b/presentation/src/main/res/layout/item_profile_image.xml @@ -23,7 +23,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - tools:src="@drawable/img_selfie_ex_one" /> + tools:src="@drawable/img_selfie_one" /> \ No newline at end of file diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index d955fd48..b5c65264 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -47,23 +47,22 @@ 이런 사진은 어때요? 프랑스 야경을 즐기는 모습을 그려주세요. 항공점퍼를 입고 테라스에 서 있는 모습이에요. - 사진의 비율을 선택해주세요 📷 - 비율은 자유롭게 맡길래요 - 카메라 앵글을 선택해주세요 📷 - 앵글은 자유롭게 맡길래요 - 원하는 프레임을 선택해주세요 📷 - 프레임은 자유롭게 맡길래요 - 3:2 비율\n(세로로 긴 사진) - 2:3 비율\n(가로로 긴 사진) - - 사진 생성에 이용할 얼굴 3장을 업로드해주세요 - 💡얼굴은 이런 사진을 사용해주세요! - 모자, 악세사리 등으로 얼굴이 잘 안보이는 사진을 사용하면 얼굴이 잘 안나올 수 있어요 - 사진은 정면사진을 포함하여 오른쪽, 왼쪽 등 다양한 각도일수록 얼굴 생성에 도움이 돼요 - 만들고자 하는 사진의 포즈와 비슷한 각도의 얼굴 사진을 사용하면 얼굴이 더욱 정확하게 반영돼요 - 본인의 사진만 업로드해주세요. 타인의 사진을 이용할 경우 서비스 이용이 차단되며 법적인 제재를 받을 수도 있어요! - ]]> - 💡\n사진의 각도가 다양할수록 생성된 얼굴이 자연스러워져요! + 사진의 비율을 선택해주세요. + 세로 사진 + 3:2 비율 + 가로 사진 + 2:3 비율 + + 사진 생성에 사용할\n얼굴 사진 3장을 선택해주세요. + 정면을 포함하여 사진의 각도가 다양할수록 좋아요. + 모자, 악세사리 등으로 얼굴이 가려진 사진은 안돼요. + 얼굴 표정이 다양할 수록 더 실감나는 사진을 만들 수 있어요. + 타인의 사진을 도용하면 서비스 이용이 정지되고,\n법적인 처벌을 받을 수 있습니다. + 이런 사진이 좋아요 + 사진 선택하기 + 다시 선택하기 + 사진 생성하기 + 3장의 이미지를 선택해 주세요 갤러리 이미지를 가져오는 과정에서 오류가 발생했습니다.