From e24ddb910693163e8a932e7fa89c2a26afc56bff Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 28 Apr 2020 23:03:30 -0400 Subject: [PATCH] Use same header layout for sources/extensions/migration --- .../ui/browse/extension/ExtensionGroupHolder.kt | 2 +- .../ui/browse/extension/ExtensionGroupItem.kt | 2 +- .../tachiyomi/ui/browse/source/LangHolder.kt | 2 +- .../tachiyomi/ui/browse/source/LangItem.kt | 2 +- .../tachiyomi/ui/migration/SelectionHeader.kt | 4 ++-- .../main/res/layout/extension_controller.xml | 2 +- .../main/res/layout/source_main_controller.xml | 2 +- .../res/layout/source_main_controller_card.xml | 17 ----------------- ...l => source_main_controller_card_header.xml} | 0 9 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 app/src/main/res/layout/source_main_controller_card.xml rename app/src/main/res/layout/{extension_card_header.xml => source_main_controller_card_header.xml} (100%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupHolder.kt index fdea101574..2712a4ee17 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupHolder.kt @@ -4,7 +4,7 @@ import android.annotation.SuppressLint import android.view.View import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder -import kotlinx.android.synthetic.main.extension_card_header.title +import kotlinx.android.synthetic.main.source_main_controller_card_header.title class ExtensionGroupHolder(view: View, adapter: FlexibleAdapter<*>) : BaseFlexibleViewHolder(view, adapter) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupItem.kt index 8c65ea2259..6e235f91c9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionGroupItem.kt @@ -19,7 +19,7 @@ data class ExtensionGroupItem(val name: String, val size: Int, val showSize: Boo * Returns the layout resource of this item. */ override fun getLayoutRes(): Int { - return R.layout.extension_card_header + return R.layout.source_main_controller_card_header } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangHolder.kt index c0da896c3c..d62ccd6014 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangHolder.kt @@ -4,7 +4,7 @@ import android.view.View import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.util.system.LocaleHelper -import kotlinx.android.synthetic.main.source_main_controller_card.title +import kotlinx.android.synthetic.main.source_main_controller_card_header.title class LangHolder(view: View, adapter: FlexibleAdapter<*>) : BaseFlexibleViewHolder(view, adapter) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt index fe0e6b389d..189c1c41d9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/LangItem.kt @@ -18,7 +18,7 @@ data class LangItem(val code: String) : AbstractHeaderItem() { * Returns the layout resource of this item. */ override fun getLayoutRes(): Int { - return R.layout.source_main_controller_card + return R.layout.source_main_controller_card_header } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt index 196cfb1ca2..9530c68bc7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/SelectionHeader.kt @@ -7,7 +7,7 @@ import eu.davidea.flexibleadapter.items.AbstractHeaderItem import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder -import kotlinx.android.synthetic.main.source_main_controller_card.title +import kotlinx.android.synthetic.main.source_main_controller_card_header.title /** * Item that contains the selection header. @@ -18,7 +18,7 @@ class SelectionHeader : AbstractHeaderItem() { * Returns the layout resource of this item. */ override fun getLayoutRes(): Int { - return R.layout.source_main_controller_card + return R.layout.source_main_controller_card_header } /** diff --git a/app/src/main/res/layout/extension_controller.xml b/app/src/main/res/layout/extension_controller.xml index 348b616c39..eedf561d93 100644 --- a/app/src/main/res/layout/extension_controller.xml +++ b/app/src/main/res/layout/extension_controller.xml @@ -14,7 +14,7 @@ android:id="@+id/ext_recycler" android:layout_width="match_parent" android:layout_height="wrap_content" - tools:listitem="@layout/extension_card_header" /> + tools:listitem="@layout/source_main_controller_card_header" /> diff --git a/app/src/main/res/layout/source_main_controller.xml b/app/src/main/res/layout/source_main_controller.xml index 24eac66242..7ce5a61408 100644 --- a/app/src/main/res/layout/source_main_controller.xml +++ b/app/src/main/res/layout/source_main_controller.xml @@ -9,7 +9,7 @@ android:id="@+id/recycler" android:layout_width="match_parent" android:layout_height="wrap_content" - tools:listitem="@layout/source_main_controller_card" /> + tools:listitem="@layout/source_main_controller_card_header" /> - - - - - diff --git a/app/src/main/res/layout/extension_card_header.xml b/app/src/main/res/layout/source_main_controller_card_header.xml similarity index 100% rename from app/src/main/res/layout/extension_card_header.xml rename to app/src/main/res/layout/source_main_controller_card_header.xml