Skip to content

Commit

Permalink
#6 mypage_fragment/설정 화면 : 2 닉네임 변경 화면(추가)
Browse files Browse the repository at this point in the history
 - 닉네임 제한 텍스트 불필요한 코드 삭제
  • Loading branch information
likppi10 committed Aug 27, 2022
1 parent b3dcba9 commit 7da9613
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class UpdateNicknameActivity : AppCompatActivity() {
this,
R.layout.activity_update_nick_name
).apply {
lifecycleOwner = this@UpdateNicknameActivity
viewModel = this@UpdateNicknameActivity.viewModel
}

Expand All @@ -49,13 +50,6 @@ class UpdateNicknameActivity : AppCompatActivity() {
}

fun observe() {
lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
viewModel.nickname.collect {
binding.lengthTextview.text = getString(R.string.written_nickname_length, it.length)
}
}
}
lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
viewModel.event.collect { event ->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_update_nick_name.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
android:layout_height="wrap_content"
android:fontFamily="@font/pretendard_regular"
android:textSize="@dimen/sp_size_12"
android:text="@{@string/written_nickname_length(viewModel.nickname.length())}"
android:textColor="@color/gray_400"
android:layout_marginTop="@dimen/dp_size_8"
app:layout_constraintEnd_toEndOf="@+id/nickname_edittext"
app:layout_constraintTop_toBottomOf="@+id/nickname_edittext"
tools:text="3/20 자"
/>


<com.ftw.hometerview.design.MainButton
android:id="@+id/update_nickname_button"
android:layout_width="0dp"
Expand Down

0 comments on commit 7da9613

Please sign in to comment.