Skip to content

Commit

Permalink
ui: 불필요한 TextView, 바인딩 어댑터, stringRes 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
s6m1n committed Dec 8, 2024
1 parent a8445a3 commit 8374921
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ fun TextView.setIsMemoryCandidatesEmptyVisibility(memoryCandidates: MemoryCandid
isGone = !memoryCandidates?.memoryCandidate.isNullOrEmpty()
}

@BindingAdapter("isMemoryEmpty")
fun TextView.setIsMemoryEmptyVisibility(items: List<Int>?) {
isGone = !items.isNullOrEmpty()
}

@BindingAdapter("visitedAtHistory")
fun TextView.formatVisitedAtHistory(visitedAt: LocalDateTime?) {
text = visitedAt?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_visited_at_selection_title"
bind:dateTimeWithAmPm="@{viewModel.selectedVisitedAt}"
bind:memoryCandidates="@{viewModel.memoryCandidates}" />
bind:dateTimeWithAmPm="@{viewModel.selectedVisitedAt}" />

<TextView
android:id="@+id/tv_memory_selection_title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_visited_at_selection_title"
bind:dateTimeWithAmPm="@{viewModel.selectedVisitedAt}"
bind:memoryCandidates="@{viewModel.memoryCandidates}" />
bind:dateTimeWithAmPm="@{viewModel.selectedVisitedAt}" />

<TextView
android:id="@+id/tv_memory_selection_title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_memory_is_empty"
style="@style/Typography.Body2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginVertical="50dp"
android:gravity="center"
android:text="@string/staccato_creation_unselected_memory"
app:layout_constraintBottom_toTopOf="@id/btn_visited_at_confirm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_visited_at_title"
bind:isMemoryEmpty="@{years}" />

<NumberPicker
android:id="@+id/picker_year"
android:layout_width="0dp"
Expand Down
1 change: 0 additions & 1 deletion android/Staccato_AN/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
<string name="staccato_creation_memory_selection">추억 선택</string>
<string name="staccato_creation_no_memory_in_this_date">선택하신 날짜에는 추억이 없어요</string>
<string name="staccato_creation_no_memory">스타카토를 남길 수 있는 추억이 없어요</string>
<string name="staccato_creation_unselected_memory">추억을 먼저 선택해 주세요</string>
<string name="staccato_creation_toolbar_subtitle">기억하고 싶은 순간을 남겨 보세요!</string>
<string name="staccato_creation_toolbar_title">스타카토 기록하기</string>
<string name="staccato_creation_not_found_address">주소를 찾지 못했습니다</string>
Expand Down

0 comments on commit 8374921

Please sign in to comment.