From 6de36a88c04363a4669b62fbec0c7b8a3f2b64c3 Mon Sep 17 00:00:00 2001 From: inorichi Date: Fri, 13 Apr 2018 16:28:09 +0200 Subject: [PATCH] Fix tracking search layout --- .../ui/manga/track/TrackSearchDialog.kt | 10 +-- .../main/res/layout/track_search_dialog.xml | 86 +++++++++---------- app/src/main/res/layout/track_search_item.xml | 3 +- 3 files changed, 47 insertions(+), 52 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt index 691800058..9856ce2e5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchDialog.kt @@ -8,9 +8,9 @@ import com.jakewharton.rxbinding.widget.itemClicks import com.jakewharton.rxbinding.widget.textChanges import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Track -import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.data.track.TrackService +import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.ui.base.controller.DialogController import eu.kanade.tachiyomi.util.plusAssign import kotlinx.android.synthetic.main.track_search_dialog.view.* @@ -114,14 +114,14 @@ class TrackSearchDialog : DialogController { private fun search(query: String) { val view = dialogView ?: return view.progress.visibility = View.VISIBLE - view.track_search_list.visibility = View.GONE + view.track_search_list.visibility = View.INVISIBLE trackController.presenter.search(query, service) } fun onSearchResults(results: List) { selectedItem = null val view = dialogView ?: return - view.progress.visibility = View.GONE + view.progress.visibility = View.INVISIBLE view.track_search_list.visibility = View.VISIBLE adapter?.setItems(results) } @@ -129,7 +129,7 @@ class TrackSearchDialog : DialogController { fun onSearchResultsError() { val view = dialogView ?: return view.progress.visibility = View.VISIBLE - view.track_search_list.visibility = View.GONE + view.track_search_list.visibility = View.INVISIBLE adapter?.setItems(emptyList()) } @@ -141,4 +141,4 @@ class TrackSearchDialog : DialogController { const val KEY_SERVICE = "service_id" } -} \ No newline at end of file +} diff --git a/app/src/main/res/layout/track_search_dialog.xml b/app/src/main/res/layout/track_search_dialog.xml index 84f9a3d54..0c9d8191e 100644 --- a/app/src/main/res/layout/track_search_dialog.xml +++ b/app/src/main/res/layout/track_search_dialog.xml @@ -1,10 +1,9 @@ - + android:inputType="text" + android:maxLines="1"/> - - - + android:layout_height="0dp" + android:layout_weight="1"> + + + + + + + android:background="?android:attr/divider"/> - \ No newline at end of file + diff --git a/app/src/main/res/layout/track_search_item.xml b/app/src/main/res/layout/track_search_item.xml index 2c5c7c7ee..acab56c21 100644 --- a/app/src/main/res/layout/track_search_item.xml +++ b/app/src/main/res/layout/track_search_item.xml @@ -12,7 +12,6 @@ android:layout_height="216dp" android:background="?attr/selectable_list_drawable" android:orientation="horizontal"> - > - \ No newline at end of file +