diff --git a/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailActivity.kt b/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailActivity.kt index 59d17ed7..293e5e8a 100644 --- a/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailActivity.kt +++ b/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailActivity.kt @@ -118,7 +118,6 @@ class TodoDetailActivity : with(binding) { tvTodoCreateMemoTitle.isVisible = true etTodoCreateMemo.isVisible = true - tvTodoMemoCounter.isVisible = true } if (state.data.memo.isBlank()) { @@ -127,7 +126,6 @@ class TodoDetailActivity : drawableOf(R.drawable.shape_rect_4_gray200_line) etTodoCreateMemo.text = stringOf(R.string.my_todo_create_tv_memo_hint) etTodoCreateMemo.setTextColor(colorOf(R.color.gray_200)) - tvTodoMemoCounter.isVisible = false } } } diff --git a/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailViewModel.kt b/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailViewModel.kt index 8e5b783b..17c21df3 100644 --- a/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/todo/detail/TodoDetailViewModel.kt @@ -60,10 +60,4 @@ class TodoDetailViewModel @Inject constructor( } } } - - companion object { - const val MAX_TODO_LEN = 15 - const val MAX_MEMO_LEN = 1000 - } - } \ No newline at end of file diff --git a/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripActivity.kt b/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripActivity.kt index ab33a6ba..95192468 100644 --- a/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripActivity.kt +++ b/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripActivity.kt @@ -37,7 +37,7 @@ class EditTripActivity : } private fun initBindingViewModel() { - binding.viewModel = viewModel + binding.vm = viewModel } private fun getIntentData() { @@ -50,10 +50,9 @@ class EditTripActivity : when (state) { is UiState.Success -> { with(binding) { - tvEditTripName.text = viewModel?.title - tvEditTripInfoStartDate.text = viewModel?.startDate - tvEditTripInfoEndDate.text = viewModel?.endDate - viewModel?.gettitleLength() + tvEditTripName.text = viewModel.title + tvEditTripInfoStartDate.text = viewModel.startDate + tvEditTripInfoEndDate.text = viewModel.endDate } } diff --git a/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripViewModel.kt b/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripViewModel.kt index 7e3fd8e9..3443e6a8 100644 --- a/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/todo/edittrip/edit/EditTripViewModel.kt @@ -19,7 +19,6 @@ import javax.inject.Inject class EditTripViewModel @Inject constructor( private val editTripRepository: EditTripRepository ) : ViewModel() { - val titleLength = MutableLiveData(0) val startYear = MutableLiveData() val startMonth = MutableLiveData() @@ -41,10 +40,6 @@ class EditTripViewModel @Inject constructor( private val _quittripState = MutableSharedFlow() val quittripState: SharedFlow = _quittripState - fun gettitleLength(){ - titleLength.value = title.getGraphemeLength() - } - fun getTripInfoFromServer(tripId: Long) { _tripInfoState.value = UiState.Loading viewModelScope.launch { @@ -74,9 +69,4 @@ class EditTripViewModel @Inject constructor( } } } - - companion object { - const val MAX_TRIP_LEN = 15 - } - } diff --git a/presentation/src/main/res/layout/activity_edit_trip.xml b/presentation/src/main/res/layout/activity_edit_trip.xml index aa694c43..47566efd 100644 --- a/presentation/src/main/res/layout/activity_edit_trip.xml +++ b/presentation/src/main/res/layout/activity_edit_trip.xml @@ -6,7 +6,7 @@ @@ -61,16 +61,17 @@ @@ -80,13 +81,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4dp" - android:textAppearance="@style/TextAppearance.Doorip.Detail3.Regular" - android:text="@{@string/counter(viewModel.titleLength, viewModel.MAX_TRIP_LEN)}" - android:textColor="@color/gray_400" + android:text="@string/empty_string" + style="@style/TextAppearance.Doorip.Detail3.Regular" + android:textColor="@color/white_000" app:layout_constraintEnd_toEndOf="@id/tv_edit_trip_name" app:layout_constraintTop_toBottomOf="@id/tv_edit_trip_name" /> - diff --git a/presentation/src/main/res/layout/activity_todo_detail.xml b/presentation/src/main/res/layout/activity_todo_detail.xml index 5d51086e..e9ba46e4 100644 --- a/presentation/src/main/res/layout/activity_todo_detail.xml +++ b/presentation/src/main/res/layout/activity_todo_detail.xml @@ -89,7 +89,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginHorizontal="24dp" - android:layout_marginTop="6dp" + android:layout_marginTop="8dp" android:background="@drawable/shape_rect_4_gray700_line" android:paddingVertical="20dp" android:paddingStart="16dp" @@ -107,11 +107,10 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:layout_marginEnd="4dp" - android:text="@{@string/counter(vm.todo.length, vm.MAX_TODO_LEN)}" - android:textColor="@color/gray_400" + android:text="@string/empty_string" + android:textColor="@color/white_000" app:layout_constraintEnd_toEndOf="@id/et_todo_detail_todo" - app:layout_constraintTop_toBottomOf="@id/et_todo_detail_todo" - tools:text="0/15" /> + app:layout_constraintTop_toBottomOf="@id/et_todo_detail_todo" /> - - diff --git a/presentation/src/main/res/layout/fragment_my_todo.xml b/presentation/src/main/res/layout/fragment_my_todo.xml index 57cd69e2..72c8ade2 100644 --- a/presentation/src/main/res/layout/fragment_my_todo.xml +++ b/presentation/src/main/res/layout/fragment_my_todo.xml @@ -38,7 +38,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="18dp" - android:layout_marginEnd="10dp" + android:layout_marginEnd="12dp" android:layout_marginBottom="4dp" android:src="@drawable/ic_trip_info" app:layout_constraintBottom_toBottomOf="parent" diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index ca019eef..81ece3ce 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -5,6 +5,7 @@ Adapter is not initialized %s Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + 서버 통신에 실패했어요 닉네임에는 공백만 입력할 수 없어요