From 60b30360377bab1891d3e15f386038d45ae96dff Mon Sep 17 00:00:00 2001 From: len Date: Mon, 22 Aug 2016 12:55:31 +0200 Subject: [PATCH] Rename fragment to view --- .../java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt | 6 +++--- .../kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt | 2 +- .../{LibraryCategoryFragment.kt => LibraryCategoryView.kt} | 2 +- app/src/main/res/layout/item_library_category.xml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename app/src/main/java/eu/kanade/tachiyomi/ui/library/{LibraryCategoryFragment.kt => LibraryCategoryView.kt} (98%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt index 8519a3279..7b98e5b99 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryAdapter.kt @@ -32,7 +32,7 @@ class LibraryAdapter(private val fragment: LibraryFragment) : RecyclerViewPagerA * @return a new view. */ override fun createView(container: ViewGroup): View { - val view = container.inflate(R.layout.item_library_category) as LibraryCategoryFragment + val view = container.inflate(R.layout.item_library_category) as LibraryCategoryView view.onCreate(fragment) return view } @@ -44,7 +44,7 @@ class LibraryAdapter(private val fragment: LibraryFragment) : RecyclerViewPagerA * @param position the position in the adapter. */ override fun bindView(view: View, position: Int) { - (view as LibraryCategoryFragment).onBind(categories[position]) + (view as LibraryCategoryView).onBind(categories[position]) } /** @@ -54,7 +54,7 @@ class LibraryAdapter(private val fragment: LibraryFragment) : RecyclerViewPagerA * @param position the position in the adapter. */ override fun recycleView(view: View, position: Int) { - (view as LibraryCategoryFragment).onRecycle() + (view as LibraryCategoryView).onRecycle() } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt index 18e31a65b..1a67ee3a3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryAdapter.kt @@ -17,7 +17,7 @@ import java.util.* * * @param fragment the fragment containing this adapter. */ -class LibraryCategoryAdapter(val fragment: LibraryCategoryFragment) : +class LibraryCategoryAdapter(val fragment: LibraryCategoryView) : FlexibleAdapter() { /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryFragment.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt similarity index 98% rename from app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryFragment.kt rename to app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt index 6f2778398..fd042ef45 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryFragment.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt @@ -25,7 +25,7 @@ import uy.kohesive.injekt.injectLazy * Fragment containing the library manga for a certain category. * Uses R.layout.fragment_library_category. */ -class LibraryCategoryFragment @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) +class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs), FlexibleViewHolder.OnListItemClickListener { /** diff --git a/app/src/main/res/layout/item_library_category.xml b/app/src/main/res/layout/item_library_category.xml index 8c0e1c974..df6b7ce5a 100644 --- a/app/src/main/res/layout/item_library_category.xml +++ b/app/src/main/res/layout/item_library_category.xml @@ -1,5 +1,5 @@ - @@ -11,4 +11,4 @@ - \ No newline at end of file + \ No newline at end of file