Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX/#252] QA사항 구현 #260

Merged
merged 16 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
<activity
android:name="com.going.presentation.onboarding.signup.SignUpActivity"
android:exported="false"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿 요런 기능이 있단 걸 오늘 배웠숩니닥!


<activity
android:name="com.going.presentation.tendency.splash.TendencySplashActivity"
Expand Down Expand Up @@ -157,8 +158,8 @@
<activity
android:name="com.going.presentation.profile.edit.ProfileEditActivity"
android:exported="false"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" />

<activity
android:name="com.going.presentation.profile.participant.ParticipantProfileActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import android.content.res.TypedArray
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View.OnFocusChangeListener
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.isVisible
Expand Down Expand Up @@ -56,7 +57,11 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) :
set(value) {
field = value

binding.btnDeleteText.isVisible = value != EditTextState.EMPTY
binding.run {
btnDeleteText.isVisible =
(value != EditTextState.EMPTY) && etEmojiCounterEtContent.hasFocus()
}

editTextStateMap[field]?.let { setEditTextState(it) }
}

Expand All @@ -70,6 +75,7 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) :

initDeleteBtnClickListener()
setBindingContent(typedArray)
initEtFocusChangeListener()

typedArray.recycle()

Expand All @@ -84,7 +90,6 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) :

private fun setBindingContent(typedArray: TypedArray) {
with(binding) {
btnDeleteText.isVisible = state != EditTextState.EMPTY
tvEmojiCounterEtTitle.text =
typedArray.getString(R.styleable.EmojiCounterEditText_title)
etEmojiCounterEtContent.hint =
Expand All @@ -96,6 +101,13 @@ class EmojiCounterEditText(context: Context, attrs: AttributeSet) :
canBlankError = typedArray.getBoolean(R.styleable.EmojiCounterEditText_canBlankError, false)
}

private fun initEtFocusChangeListener() {
binding.etEmojiCounterEtContent.onFocusChangeListener =
OnFocusChangeListener { _, hasFocus ->
binding.btnDeleteText.isVisible = hasFocus && (state != EditTextState.EMPTY)
}
}

private fun checkTextAvailable() {
binding.etEmojiCounterEtContent.doAfterTextChanged { text ->
val len = text.toString().getGraphemeLength()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import androidx.lifecycle.flowWithLifecycle
import androidx.lifecycle.lifecycleScope
import com.going.domain.entity.AuthState
import com.going.presentation.R
import com.going.presentation.dashboard.DashBoardActivity
import com.going.presentation.databinding.ActivitySignUpBinding
import com.going.presentation.tendency.splash.TendencySplashActivity
import com.going.presentation.util.initOnBackPressedListener
import com.going.presentation.util.navigateToScreenClear
import com.going.ui.base.BaseActivity
import com.going.ui.extension.setOnSingleClickListener
import com.going.ui.extension.toast
Expand Down Expand Up @@ -83,8 +81,12 @@ class SignUpActivity :
TendencySplashActivity.createIntent(
this,
TendencySplashActivity.TENDENCY
).apply { startActivity(this) }
).apply {
startActivity(this)
finish()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿 굿 조아요!

}
}

AuthState.FAILURE -> toast(getString(R.string.server_error))
AuthState.OTHER_PAGE -> return@onEach
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ProfileEditViewModel @Inject constructor(

private fun checkIsValueChanged() {
_isValueChanged.value =
nowName.length <= getMaxNameLen() && nowInfo.length <= getMaxInfoLen() && (isInfoChanged || isNameChanged)
nowName.isNotBlank() && nowName.length <= getMaxNameLen() && nowInfo.isNotBlank() && nowInfo.length <= getMaxInfoLen() && (isInfoChanged || isNameChanged)
}

fun patchUserInfo() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class ProfileActivity :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

getUserInfo()
observeUserInfoState()
initBackBtnClickListener()
initSaveImgBtnClickListener()
Expand All @@ -46,6 +45,7 @@ class ProfileActivity :
override fun onResume() {
super.onResume()
getUserInfo()
setFragmentHeight()
scrollTop()
}

Expand Down Expand Up @@ -80,6 +80,7 @@ class ProfileActivity :

if (profileViewModel.profileId.value != -1) {
viewProfileEmpty.isVisible = false
viewProfile.isVisible = true
UserTendencyResultList[number].apply {
ivProfile.load(profileImage) {
transformations(CircleCropTransformation())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,7 @@ class ParticipantProfileActivity :
btnTripProfileDownload.isVisible = this && profile.result != -1
btnProfileEdit.isVisible = this

if (!this) tvTripProfileTitle.setText(
getString(
R.string.participant_profile_friend_title,
profile.name
)
)
if (!this) tvTripProfileTitle.text = getString(R.string.participant_profile_friend_title)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import com.going.presentation.designsystem.textview.ChartTextView
import com.going.presentation.profile.participant.ParticipantProfileViewModel
import com.going.presentation.tendency.result.UserTendencyResultList
import com.going.presentation.tendency.splash.TendencySplashActivity
import com.going.presentation.util.navigateToScreenClear
import com.going.ui.base.BaseFragment
import com.going.ui.extension.setOnSingleClickListener
import com.going.ui.extension.toast
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.launchIn
Expand All @@ -32,6 +32,7 @@ class ParticipantProfileCharacterFragment :

setViewModel()
btnParticipantProfileEmptyOwnerClickListener()
btnTripProfileRestartClickListener()
}

private fun setViewModel() {
Expand All @@ -53,6 +54,9 @@ class ParticipantProfileCharacterFragment :
UserTendencyResultList[result].run {
ivTripProfileBig.load(resultImage)

tvTripProfileType.text = profileTitle
tvTripProfileSubType.text = profileSubTitle

tvTripProfileTag1.text = getString(R.string.tag, tags[0])
tvTripProfileTag2.text = getString(R.string.tag, tags[1])
tvTripProfileTag3.text = getString(R.string.tag, tags[2])
Expand All @@ -73,7 +77,19 @@ class ParticipantProfileCharacterFragment :

private fun btnParticipantProfileEmptyOwnerClickListener() {
binding.btnParticipantProfileEmptyOwner.setOnClickListener {
requireActivity().navigateToScreenClear<TendencySplashActivity>()
TendencySplashActivity.createIntent(
requireActivity(),
TendencySplashActivity.PROFILE
).apply { startActivity(this) }
}
}

private fun btnTripProfileRestartClickListener() {
binding.btnTripProfileRestart.setOnSingleClickListener {
TendencySplashActivity.createIntent(
requireActivity(),
TendencySplashActivity.PROFILE
).apply { startActivity(this) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class CheckFriendsViewHolder(
4 -> R.drawable.img_profile_8
5 -> R.drawable.img_profile_5
6 -> R.drawable.img_profile_7
else -> R.drawable.img_profile_3
7 -> R.drawable.img_profile_3
else -> R.drawable.img_profile_guest
Comment on lines +29 to +30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 감사합니다!!!!

}
ivTodoFriend.load(profileImage) {
transformations(CircleCropTransformation())
Expand Down
22 changes: 11 additions & 11 deletions presentation/src/main/res/layout/activity_participant_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,34 +89,34 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="24dp"
android:layout_marginTop="23dp"
android:src="@drawable/img_profile_guest"
app:civ_border_color="@color/gray_100"
app:civ_border_width="1dp"
app:layout_constraintBottom_toTopOf="@id/view_gray"
app:layout_constraintDimensionRatio="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="@id/tv_profile_name"
app:layout_constraintBottom_toBottomOf="@id/tv_profile_one_line"/>

<TextView
android:id="@+id/tv_profile_name"
style="@style/TextAppearance.Doorip.Body1.Bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="4dp"
android:layout_marginStart="16dp"
android:layout_marginTop="29dp"
android:textColor="@color/gray_500"
app:layout_constraintStart_toEndOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/tv_profile_one_line"
tools:text="@string/profile_tv_name" />

<TextView
android:id="@+id/tv_profile_one_line"
style="@style/TextAppearance.Doorip.Detail1.Regular"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:gravity="center"
android:gravity="start"
android:layout_marginTop="3dp"
android:textColor="@color/gray_500"
app:layout_constraintStart_toStartOf="@id/tv_profile_name"
app:layout_constraintTop_toBottomOf="@id/tv_profile_name"
Expand All @@ -133,7 +133,6 @@
android:paddingVertical="2dp"
android:text="@string/profile_tv_edit"
android:textColor="@color/gray_400"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@id/iv_profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_profile" />
Expand All @@ -142,11 +141,12 @@
android:id="@+id/view_gray"
android:layout_width="wrap_content"
android:layout_height="8dp"
android:layout_marginTop="22dp"
android:layout_marginTop="26dp"
android:background="@color/gray_50"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_profile" />
app:layout_constraintTop_toBottomOf="@id/tv_profile_one_line"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

</com.google.android.material.appbar.CollapsingToolbarLayout>
Expand Down
Loading
Loading