From fc81d44b63619e5c6af982b733b86799b774cadd Mon Sep 17 00:00:00 2001 From: Choisehyeon <50761690+Choisehyeon@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:12:39 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=B9=88=20=EA=B2=80=EC=83=89?= =?UTF-8?q?=EC=96=B4=EA=B0=80=20=EC=9E=85=EB=A0=A5=EB=90=98=EC=97=88?= =?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20=EB=AC=B8=EA=B5=AC=EA=B0=80=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/main/search/SearchFragment.kt | 2 +- android/app/src/main/res/layout/fragment_search.xml | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/android/app/src/main/java/com/app/edonymyeon/presentation/ui/main/search/SearchFragment.kt b/android/app/src/main/java/com/app/edonymyeon/presentation/ui/main/search/SearchFragment.kt index d81172272..61032e19d 100644 --- a/android/app/src/main/java/com/app/edonymyeon/presentation/ui/main/search/SearchFragment.kt +++ b/android/app/src/main/java/com/app/edonymyeon/presentation/ui/main/search/SearchFragment.kt @@ -20,7 +20,6 @@ class SearchFragment : BaseFragment({ }) { override val viewModel: SearchViewModel by viewModels() override val inflater: LayoutInflater by lazy { LayoutInflater.from(context) } - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, @@ -66,6 +65,7 @@ class SearchFragment : BaseFragment({ } override fun onQueryTextChange(newText: String?): Boolean { + if (newText == "") binding.tvEmptyPost.isVisible = false return true } }) diff --git a/android/app/src/main/res/layout/fragment_search.xml b/android/app/src/main/res/layout/fragment_search.xml index bbe726530..5ce24a741 100644 --- a/android/app/src/main/res/layout/fragment_search.xml +++ b/android/app/src/main/res/layout/fragment_search.xml @@ -73,13 +73,14 @@ android:id="@+id/tv_empty_post" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="32sp" + android:text="@string/search_empty" android:textColor="@color/black_434343" - app:layout_constraintTop_toTopOf="parent" + android:textSize="32sp" + android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - android:text="@string/search_empty"/> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" />