From ca2236958a3c06663c042d904c446763cfd18d43 Mon Sep 17 00:00:00 2001 From: inorichi Date: Thu, 25 May 2017 12:16:58 +0200 Subject: [PATCH] Reorganize layouts by feature --- .../ui/catalogue/CatalogueController.kt | 13 +++--- .../ui/catalogue/CatalogueGridHolder.kt | 2 +- .../tachiyomi/ui/catalogue/CatalogueItem.kt | 8 ++-- .../ui/catalogue/CatalogueListHolder.kt | 2 +- .../tachiyomi/ui/catalogue/ProgressItem.kt | 2 +- .../ui/catalogue/filter/SelectItem.kt | 2 +- .../tachiyomi/ui/category/CategoryHolder.kt | 2 +- .../tachiyomi/ui/category/CategoryItem.kt | 2 +- .../tachiyomi/ui/download/DownloadAdapter.kt | 2 +- .../ui/download/DownloadController.kt | 4 +- .../tachiyomi/ui/download/DownloadHolder.kt | 4 +- .../tachiyomi/ui/library/LibraryAdapter.kt | 2 +- .../ui/library/LibraryCategoryView.kt | 3 +- .../tachiyomi/ui/library/LibraryController.kt | 2 +- .../tachiyomi/ui/library/LibraryGridHolder.kt | 2 +- .../tachiyomi/ui/library/LibraryItem.kt | 8 ++-- .../tachiyomi/ui/library/LibraryListHolder.kt | 2 +- .../kanade/tachiyomi/ui/main/MainActivity.kt | 5 +-- .../tachiyomi/ui/manga/MangaController.kt | 2 +- .../ui/manga/chapter/ChapterHolder.kt | 2 +- .../tachiyomi/ui/manga/chapter/ChapterItem.kt | 2 +- .../ui/manga/chapter/ChaptersController.kt | 4 +- .../ui/manga/info/MangaInfoController.kt | 6 +-- .../ui/manga/track/SetTrackChaptersDialog.kt | 2 +- .../ui/manga/track/SetTrackScoreDialog.kt | 2 +- .../tachiyomi/ui/manga/track/TrackAdapter.kt | 2 +- .../ui/manga/track/TrackController.kt | 4 +- .../tachiyomi/ui/manga/track/TrackHolder.kt | 2 +- .../ui/manga/track/TrackSearchAdapter.kt | 6 +-- .../ui/manga/track/TrackSearchDialog.kt | 4 +- .../tachiyomi/ui/reader/ReaderActivity.kt | 4 +- .../ui/reader/ReaderCustomFilterDialog.kt | 4 +- .../ui/reader/ReaderSettingsDialog.kt | 4 +- .../viewer/base/PageDecodeErrorLayout.kt | 2 +- .../ui/reader/viewer/pager/PageView.kt | 5 +-- .../reader/viewer/pager/PagerReaderAdapter.kt | 2 +- .../reader/viewer/webtoon/WebtoonAdapter.kt | 2 +- .../ui/reader/viewer/webtoon/WebtoonHolder.kt | 7 ++-- .../tachiyomi/ui/recent_updates/DateItem.kt | 2 +- .../ui/recent_updates/RecentChapterHolder.kt | 2 +- .../ui/recent_updates/RecentChapterItem.kt | 2 +- .../RecentChaptersController.kt | 6 +-- .../recently_read/RecentlyReadController.kt | 4 +- .../ui/recently_read/RecentlyReadHolder.kt | 2 +- .../ui/recently_read/RecentlyReadItem.kt | 2 +- .../tachiyomi/widget/CustomLayoutPicker.kt | 2 +- .../tachiyomi/widget/DialogCheckboxView.kt | 4 +- .../eu/kanade/tachiyomi/widget/EmptyView.kt | 4 +- .../widget/preference/LoginPreference.kt | 4 +- ...nga_info.xml => manga_info_controller.xml} | 0 .../res/layout/activity_edit_categories.xml | 18 -------- app/src/main/res/layout/activity_manga.xml | 42 ------------------- .../main/res/layout/activity_preferences.xml | 33 --------------- ...catalogue.xml => catalogue_controller.xml} | 0 ...logue_grid.xml => catalogue_grid_item.xml} | 0 ...logue_list.xml => catalogue_list_item.xml} | 0 ...s_item.xml => catalogue_progress_item.xml} | 0 ...fit.xml => catalogue_recycler_autofit.xml} | 2 +- .../main/res/layout/categories_controller.xml | 2 +- ...dit_categories.xml => categories_item.xml} | 0 app/src/main/res/layout/chapter_image.xml | 6 --- ...a_chapters.xml => chapters_controller.xml} | 2 +- .../{item_chapter.xml => chapters_item.xml} | 0 ...ox.xml => common_dialog_with_checkbox.xml} | 0 ...stitem_dir.xml => common_listitem_dir.xml} | 0 ...inner_item.xml => common_spinner_item.xml} | 0 .../{view_empty.xml => common_view_empty.xml} | 0 ...ad_manager.xml => download_controller.xml} | 2 +- .../{item_download.xml => download_item.xml} | 0 app/src/main/res/layout/fragment_backup.xml | 21 ---------- .../res/layout/fragment_download_queue.xml | 16 ------- app/src/main/res/layout/fragment_library.xml | 11 ----- .../res/layout/fragment_library_category.xml | 14 ------- .../res/layout/item_library_category2.xml | 14 ------- ...rary_category.xml => library_category.xml} | 0 .../main/res/layout/library_grid_recycler.xml | 2 +- .../main/res/layout/library_list_recycler.xml | 2 +- .../{activity_main.xml => main_activity.xml} | 8 +++- ...nga_info.xml => manga_info_controller.xml} | 0 ...mageview.xml => pref_widget_imageview.xml} | 0 ...ctivity_reader.xml => reader_activity.xml} | 0 ...er.xml => reader_custom_filter_dialog.xml} | 0 ...error.xml => reader_page_decode_error.xml} | 0 ...pager_reader.xml => reader_pager_item.xml} | 5 ++- ...ettings.xml => reader_settings_dialog.xml} | 0 ...oon_reader.xml => reader_webtoon_item.xml} | 6 ++- ...ers.xml => recent_chapters_controller.xml} | 2 +- ..._chapters.xml => recent_chapters_item.xml} | 0 ...n.xml => recent_chapters_section_item.xml} | 0 ..._read.xml => recently_read_controller.xml} | 2 +- ...cently_read.xml => recently_read_item.xml} | 0 app/src/main/res/layout/toolbar.xml | 8 ---- ...chapters.xml => track_chapters_dialog.xml} | 0 ...ragment_track.xml => track_controller.xml} | 2 +- .../layout/{item_track.xml => track_item.xml} | 0 ...track_score.xml => track_score_dialog.xml} | 0 ...ack_search.xml => track_search_dialog.xml} | 0 ...track_search.xml => track_search_item.xml} | 0 98 files changed, 107 insertions(+), 282 deletions(-) rename app/src/main/res/layout-land/{fragment_manga_info.xml => manga_info_controller.xml} (100%) delete mode 100644 app/src/main/res/layout/activity_edit_categories.xml delete mode 100644 app/src/main/res/layout/activity_manga.xml delete mode 100644 app/src/main/res/layout/activity_preferences.xml rename app/src/main/res/layout/{fragment_catalogue.xml => catalogue_controller.xml} (100%) rename app/src/main/res/layout/{item_catalogue_grid.xml => catalogue_grid_item.xml} (100%) rename app/src/main/res/layout/{item_catalogue_list.xml => catalogue_list_item.xml} (100%) rename app/src/main/res/layout/{progress_item.xml => catalogue_progress_item.xml} (100%) rename app/src/main/res/layout/{recycler_autofit.xml => catalogue_recycler_autofit.xml} (88%) rename app/src/main/res/layout/{item_edit_categories.xml => categories_item.xml} (100%) delete mode 100644 app/src/main/res/layout/chapter_image.xml rename app/src/main/res/layout/{fragment_manga_chapters.xml => chapters_controller.xml} (97%) rename app/src/main/res/layout/{item_chapter.xml => chapters_item.xml} (100%) rename app/src/main/res/layout/{dialog_with_checkbox.xml => common_dialog_with_checkbox.xml} (100%) rename app/src/main/res/layout/{listitem_dir.xml => common_listitem_dir.xml} (100%) rename app/src/main/res/layout/{spinner_item.xml => common_spinner_item.xml} (100%) rename app/src/main/res/layout/{view_empty.xml => common_view_empty.xml} (100%) rename app/src/main/res/layout/{activity_download_manager.xml => download_controller.xml} (93%) rename app/src/main/res/layout/{item_download.xml => download_item.xml} (100%) delete mode 100644 app/src/main/res/layout/fragment_backup.xml delete mode 100644 app/src/main/res/layout/fragment_download_queue.xml delete mode 100644 app/src/main/res/layout/fragment_library.xml delete mode 100644 app/src/main/res/layout/fragment_library_category.xml delete mode 100644 app/src/main/res/layout/item_library_category2.xml rename app/src/main/res/layout/{item_library_category.xml => library_category.xml} (100%) rename app/src/main/res/layout/{activity_main.xml => main_activity.xml} (83%) rename app/src/main/res/layout/{fragment_manga_info.xml => manga_info_controller.xml} (100%) rename app/src/main/res/layout/{preference_widget_imageview.xml => pref_widget_imageview.xml} (100%) rename app/src/main/res/layout/{activity_reader.xml => reader_activity.xml} (100%) rename app/src/main/res/layout/{dialog_reader_custom_filter.xml => reader_custom_filter_dialog.xml} (100%) rename app/src/main/res/layout/{page_decode_error.xml => reader_page_decode_error.xml} (100%) rename app/src/main/res/layout/{item_pager_reader.xml => reader_pager_item.xml} (88%) rename app/src/main/res/layout/{dialog_reader_settings.xml => reader_settings_dialog.xml} (100%) rename app/src/main/res/layout/{item_webtoon_reader.xml => reader_webtoon_item.xml} (86%) rename app/src/main/res/layout/{fragment_recent_chapters.xml => recent_chapters_controller.xml} (94%) rename app/src/main/res/layout/{item_recent_chapters.xml => recent_chapters_item.xml} (100%) rename app/src/main/res/layout/{item_recent_chapter_section.xml => recent_chapters_section_item.xml} (100%) rename app/src/main/res/layout/{fragment_recently_read.xml => recently_read_controller.xml} (94%) rename app/src/main/res/layout/{item_recently_read.xml => recently_read_item.xml} (100%) delete mode 100644 app/src/main/res/layout/toolbar.xml rename app/src/main/res/layout/{dialog_track_chapters.xml => track_chapters_dialog.xml} (100%) rename app/src/main/res/layout/{fragment_track.xml => track_controller.xml} (94%) rename app/src/main/res/layout/{item_track.xml => track_item.xml} (100%) rename app/src/main/res/layout/{dialog_track_score.xml => track_score_dialog.xml} (100%) rename app/src/main/res/layout/{dialog_track_search.xml => track_search_dialog.xml} (100%) rename app/src/main/res/layout/{item_track_search.xml => track_search_item.xml} (100%) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt index 1d5e50e237..b1d3c3cdd9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueController.kt @@ -30,9 +30,8 @@ import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.util.* import eu.kanade.tachiyomi.widget.AutofitRecyclerView import eu.kanade.tachiyomi.widget.DrawerSwipeCloseListener -import kotlinx.android.synthetic.main.activity_main.* -import kotlinx.android.synthetic.main.fragment_catalogue.view.* -import kotlinx.android.synthetic.main.toolbar.* +import kotlinx.android.synthetic.main.main_activity.* +import kotlinx.android.synthetic.main.catalogue_controller.view.* import rx.Observable import rx.Subscription import rx.android.schedulers.AndroidSchedulers @@ -117,7 +116,7 @@ open class CatalogueController(bundle: Bundle? = null) : } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { - return inflater.inflate(R.layout.fragment_catalogue, container, false) + return inflater.inflate(R.layout.catalogue_controller, container, false) } override fun onViewCreated(view: View, savedViewState: Bundle?) { @@ -133,7 +132,7 @@ open class CatalogueController(bundle: Bundle? = null) : val spinnerAdapter = ArrayAdapter(themedContext, android.R.layout.simple_spinner_item, presenter.sources) - spinnerAdapter.setDropDownViewResource(R.layout.spinner_item) + spinnerAdapter.setDropDownViewResource(R.layout.common_spinner_item) val onItemSelected: (Int) -> Unit = { position -> val source = spinnerAdapter.getItem(position) @@ -232,7 +231,7 @@ open class CatalogueController(bundle: Bundle? = null) : addItemDecoration(DividerItemDecoration(context, DividerItemDecoration.VERTICAL)) } } else { - (view.catalogue_view.inflate(R.layout.recycler_autofit) as AutofitRecyclerView).apply { + (view.catalogue_view.inflate(R.layout.catalogue_recycler_autofit) as AutofitRecyclerView).apply { numColumnsSubscription = getColumnsPreferenceForCurrentOrientation().asObservable() .doOnNext { spanCount = it } .skip(1) @@ -242,7 +241,7 @@ open class CatalogueController(bundle: Bundle? = null) : (layoutManager as GridLayoutManager).spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() { override fun getSpanSize(position: Int): Int { return when (adapter?.getItemViewType(position)) { - R.layout.item_catalogue_grid, null -> 1 + R.layout.catalogue_grid_item, null -> 1 else -> spanCount } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt index 08ce9336b9..4cd6554fa1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueGridHolder.kt @@ -6,7 +6,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.widget.StateImageViewTarget -import kotlinx.android.synthetic.main.item_catalogue_grid.view.* +import kotlinx.android.synthetic.main.catalogue_grid_item.view.* /** * Class used to hold the displayed data of a manga in the catalogue, like the cover or the title. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueItem.kt index eb00270596..b6207b8a17 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueItem.kt @@ -11,12 +11,12 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.util.inflate import eu.kanade.tachiyomi.widget.AutofitRecyclerView -import kotlinx.android.synthetic.main.item_catalogue_grid.view.* +import kotlinx.android.synthetic.main.catalogue_grid_item.view.* class CatalogueItem(val manga: Manga) : AbstractFlexibleItem() { override fun getLayoutRes(): Int { - return R.layout.item_catalogue_grid + return R.layout.catalogue_grid_item } override fun createViewHolder(adapter: FlexibleAdapter<*>, @@ -24,7 +24,7 @@ class CatalogueItem(val manga: Manga) : AbstractFlexibleItem() parent: ViewGroup): CatalogueHolder { if (parent is AutofitRecyclerView) { - val view = parent.inflate(R.layout.item_catalogue_grid).apply { + val view = parent.inflate(R.layout.catalogue_grid_item).apply { card.layoutParams = FrameLayout.LayoutParams( MATCH_PARENT, parent.itemWidth / 3 * 4) gradient.layoutParams = FrameLayout.LayoutParams( @@ -32,7 +32,7 @@ class CatalogueItem(val manga: Manga) : AbstractFlexibleItem() } return CatalogueGridHolder(view, adapter) } else { - val view = parent.inflate(R.layout.item_catalogue_list) + val view = parent.inflate(R.layout.catalogue_list_item) return CatalogueListHolder(view, adapter) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt index 9f98786b09..2a4f299a5d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt @@ -6,7 +6,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.util.getResourceColor -import kotlinx.android.synthetic.main.item_catalogue_list.view.* +import kotlinx.android.synthetic.main.catalogue_list_item.view.* /** * Class used to hold the displayed data of a manga in the catalogue, like the cover or the title. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/ProgressItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/ProgressItem.kt index 7d1d8cfbea..1f1d75b720 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/ProgressItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/ProgressItem.kt @@ -17,7 +17,7 @@ class ProgressItem : AbstractFlexibleItem() { var loadMore = true override fun getLayoutRes(): Int { - return R.layout.progress_item + return R.layout.catalogue_progress_item } override fun createViewHolder(adapter: FlexibleAdapter>, inflater: LayoutInflater, parent: ViewGroup): Holder { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/SelectItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/SelectItem.kt index 9b153cdc1c..ad840475e7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/SelectItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/filter/SelectItem.kt @@ -30,7 +30,7 @@ open class SelectItem(val filter: Filter.Select<*>) : AbstractFlexibleItem(holder.itemView.context, android.R.layout.simple_spinner_item, filter.values).apply { - setDropDownViewResource(R.layout.spinner_item) + setDropDownViewResource(R.layout.common_spinner_item) } spinner.onItemSelectedListener = IgnoreFirstSpinnerListener { position -> filter.state = position diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryHolder.kt index 3ce4062736..906bbb9107 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryHolder.kt @@ -7,7 +7,7 @@ import com.amulyakhare.textdrawable.TextDrawable import com.amulyakhare.textdrawable.util.ColorGenerator import eu.davidea.viewholders.FlexibleViewHolder import eu.kanade.tachiyomi.data.database.models.Category -import kotlinx.android.synthetic.main.item_edit_categories.view.* +import kotlinx.android.synthetic.main.categories_item.view.* /** * Holder used to display category items. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt index a21be31ceb..40c52cd169 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryItem.kt @@ -22,7 +22,7 @@ class CategoryItem(val category: Category) : AbstractFlexibleItem() { * @return a new view holder for a manga. */ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DownloadHolder { - val view = parent.inflate(R.layout.item_download) + val view = parent.inflate(R.layout.download_item) return DownloadHolder(view) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt index 1a74190a01..af08faffc3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.data.download.DownloadService import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.ui.base.controller.NucleusController -import kotlinx.android.synthetic.main.activity_download_manager.view.* +import kotlinx.android.synthetic.main.download_controller.view.* import rx.Observable import rx.Subscription import rx.android.schedulers.AndroidSchedulers @@ -41,7 +41,7 @@ class DownloadController : NucleusController() { } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { - return inflater.inflate(R.layout.activity_download_manager, container, false) + return inflater.inflate(R.layout.download_controller, container, false) } override fun createPresenter(): DownloadPresenter { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt index e11dbe78fe..39211c01c4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadHolder.kt @@ -3,11 +3,11 @@ package eu.kanade.tachiyomi.ui.download import android.support.v7.widget.RecyclerView import android.view.View import eu.kanade.tachiyomi.data.download.model.Download -import kotlinx.android.synthetic.main.item_download.view.* +import kotlinx.android.synthetic.main.download_item.view.* /** * Class used to hold the data of a download. - * All the elements from the layout file "item_download" are available in this class. + * All the elements from the layout file "download_item" are available in this class. * * @param view the inflated view for this holder. * @constructor creates a new download holder. 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 67571b8bd5..ae19c08ad2 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 controller: LibraryController) : RecyclerViewPa * @return a new view. */ override fun createView(container: ViewGroup): View { - val view = container.inflate(R.layout.item_library_category2) as LibraryCategoryView + val view = container.inflate(R.layout.library_category) as LibraryCategoryView view.onCreate(controller) return view } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt index feb4025d97..e8683a851b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryCategoryView.kt @@ -16,13 +16,12 @@ import eu.kanade.tachiyomi.util.inflate import eu.kanade.tachiyomi.util.plusAssign import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.widget.AutofitRecyclerView -import kotlinx.android.synthetic.main.item_library_category.view.* +import kotlinx.android.synthetic.main.library_category.view.* import rx.subscriptions.CompositeSubscription import uy.kohesive.injekt.injectLazy /** * Fragment containing the library manga for a certain category. - * Uses R.layout.fragment_library_category. */ class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : FrameLayout(context, attrs), diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 979a27bbbb..a04eea87ff 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -36,7 +36,7 @@ import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.util.inflate import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.widget.DrawerSwipeCloseListener -import kotlinx.android.synthetic.main.activity_main.* +import kotlinx.android.synthetic.main.main_activity.* import kotlinx.android.synthetic.main.library_controller.view.* import rx.Subscription import timber.log.Timber diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt index d74dc478a3..fcf3789e4b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt @@ -5,7 +5,7 @@ import com.bumptech.glide.Glide import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.data.database.models.Manga -import kotlinx.android.synthetic.main.item_catalogue_grid.view.* +import kotlinx.android.synthetic.main.catalogue_grid_item.view.* /** * Class used to hold the displayed data of a manga in the library, like the cover or the title. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt index 0669d068bd..2e78c001d8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt @@ -12,12 +12,12 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.util.inflate import eu.kanade.tachiyomi.widget.AutofitRecyclerView -import kotlinx.android.synthetic.main.item_catalogue_grid.view.* +import kotlinx.android.synthetic.main.catalogue_grid_item.view.* class LibraryItem(val manga: Manga) : AbstractFlexibleItem(), IFilterable { override fun getLayoutRes(): Int { - return R.layout.item_catalogue_grid + return R.layout.catalogue_grid_item } override fun createViewHolder(adapter: FlexibleAdapter<*>, @@ -25,7 +25,7 @@ class LibraryItem(val manga: Manga) : AbstractFlexibleItem(), IFi parent: ViewGroup): LibraryHolder { return if (parent is AutofitRecyclerView) { - val view = parent.inflate(R.layout.item_catalogue_grid).apply { + val view = parent.inflate(R.layout.catalogue_grid_item).apply { val coverHeight = parent.itemWidth / 3 * 4 card.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, coverHeight) gradient.layoutParams = FrameLayout.LayoutParams( @@ -33,7 +33,7 @@ class LibraryItem(val manga: Manga) : AbstractFlexibleItem(), IFi } LibraryGridHolder(view, adapter) } else { - val view = parent.inflate(R.layout.item_catalogue_list) + val view = parent.inflate(R.layout.catalogue_list_item) LibraryListHolder(view, adapter) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt index 885fdb2f1c..b9071cbd30 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt @@ -5,7 +5,7 @@ import com.bumptech.glide.Glide import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.data.database.models.Manga -import kotlinx.android.synthetic.main.item_catalogue_list.view.* +import kotlinx.android.synthetic.main.catalogue_list_item.view.* /** * Class used to hold the displayed data of a manga in the library, like the cover or the title. diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index d4b3da4b6d..bb677cc743 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -25,8 +25,7 @@ import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.recent_updates.RecentChaptersController import eu.kanade.tachiyomi.ui.recently_read.RecentlyReadController import eu.kanade.tachiyomi.ui.setting.SettingsMainController -import kotlinx.android.synthetic.main.activity_main.* -import kotlinx.android.synthetic.main.toolbar.* +import kotlinx.android.synthetic.main.main_activity.* import uy.kohesive.injekt.injectLazy @@ -64,7 +63,7 @@ class MainActivity : BaseActivity() { return } - setContentView(R.layout.activity_main) + setContentView(R.layout.main_activity) setSupportActionBar(toolbar) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index 0eb3147eab..5c77cff872 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -30,7 +30,7 @@ import eu.kanade.tachiyomi.ui.manga.chapter.ChaptersController import eu.kanade.tachiyomi.ui.manga.info.MangaInfoController import eu.kanade.tachiyomi.ui.manga.track.TrackController import eu.kanade.tachiyomi.util.toast -import kotlinx.android.synthetic.main.activity_main.* +import kotlinx.android.synthetic.main.main_activity.* import kotlinx.android.synthetic.main.manga_controller.view.* import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt index a7ce2ebfba..aa9ef4179e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt @@ -6,7 +6,7 @@ import eu.davidea.viewholders.FlexibleViewHolder import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.download.model.Download -import kotlinx.android.synthetic.main.item_chapter.view.* +import kotlinx.android.synthetic.main.chapters_item.view.* import java.util.* class ChapterHolder( diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt index 12043826c2..d8afdca685 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterItem.kt @@ -24,7 +24,7 @@ class ChapterItem(val chapter: Chapter, val manga: Manga) : AbstractFlexibleItem get() = status == Download.DOWNLOADED override fun getLayoutRes(): Int { - return R.layout.item_chapter + return R.layout.chapters_item } override fun createViewHolder(adapter: FlexibleAdapter<*>, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt index 378fde4798..a73fe5f191 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt @@ -25,7 +25,7 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.util.getCoordinates import eu.kanade.tachiyomi.util.snack import eu.kanade.tachiyomi.util.toast -import kotlinx.android.synthetic.main.fragment_manga_chapters.view.* +import kotlinx.android.synthetic.main.chapters_controller.view.* import timber.log.Timber class ChaptersController : NucleusController(), @@ -65,7 +65,7 @@ class ChaptersController : NucleusController(), } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { - return inflater.inflate(R.layout.fragment_manga_chapters, container, false) + return inflater.inflate(R.layout.chapters_controller, container, false) } override fun onViewCreated(view: View, savedViewState: Bundle?) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt index 547fc1c326..d1febd2d5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoController.kt @@ -32,7 +32,7 @@ import jp.wasabeef.glide.transformations.CropCircleTransformation import jp.wasabeef.glide.transformations.CropSquareTransformation import jp.wasabeef.glide.transformations.MaskTransformation import jp.wasabeef.glide.transformations.RoundedCornersTransformation -import kotlinx.android.synthetic.main.fragment_manga_info.view.* +import kotlinx.android.synthetic.main.manga_info_controller.view.* import rx.Observable import rx.android.schedulers.AndroidSchedulers import rx.schedulers.Schedulers @@ -42,7 +42,7 @@ import java.text.DecimalFormat /** * Fragment that shows manga information. - * Uses R.layout.fragment_manga_info. + * Uses R.layout.manga_info_controller. * UI related actions should be called from here. */ class MangaInfoController : NucleusController(), @@ -65,7 +65,7 @@ class MangaInfoController : NucleusController(), } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { - return inflater.inflate(R.layout.fragment_manga_info, container, false) + return inflater.inflate(R.layout.manga_info_controller, container, false) } override fun onViewCreated(view: View, savedViewState: Bundle?) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt index 61cda0174b..6b1bf0a227 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackChaptersDialog.kt @@ -36,7 +36,7 @@ class SetTrackChaptersDialog : DialogController val dialog = MaterialDialog.Builder(activity!!) .title(R.string.chapters) - .customView(R.layout.dialog_track_chapters, false) + .customView(R.layout.track_chapters_dialog, false) .positiveText(android.R.string.ok) .negativeText(android.R.string.cancel) .onPositive { dialog, _ -> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt index 987a8b39a8..80931940a3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/SetTrackScoreDialog.kt @@ -36,7 +36,7 @@ class SetTrackScoreDialog : DialogController val dialog = MaterialDialog.Builder(activity!!) .title(R.string.score) - .customView(R.layout.dialog_track_score, false) + .customView(R.layout.track_score_dialog, false) .positiveText(android.R.string.ok) .negativeText(android.R.string.cancel) .onPositive { dialog, _ -> diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackAdapter.kt index 09b06bcba0..bc0b5ec5b8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackAdapter.kt @@ -26,7 +26,7 @@ class TrackAdapter(controller: TrackController) : RecyclerView.Adapter(), TrackAdapter.OnRowClickListener, @@ -26,7 +26,7 @@ class TrackController : NucleusController(), } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { - return inflater.inflate(R.layout.fragment_track, container, false) + return inflater.inflate(R.layout.track_controller, container, false) } override fun onViewCreated(view: View, savedViewState: Bundle?) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt index 98176bfb53..e5972f296c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt @@ -4,7 +4,7 @@ import android.annotation.SuppressLint import android.support.v7.widget.RecyclerView import android.view.View import eu.kanade.tachiyomi.R -import kotlinx.android.synthetic.main.item_track.view.* +import kotlinx.android.synthetic.main.track_item.view.* class TrackHolder(view: View, adapter: TrackAdapter) : RecyclerView.ViewHolder(view) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt index 6a4ebc07c5..31b8bf89de 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackSearchAdapter.kt @@ -7,11 +7,11 @@ import android.widget.ArrayAdapter import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Track import eu.kanade.tachiyomi.util.inflate -import kotlinx.android.synthetic.main.item_track_search.view.* +import kotlinx.android.synthetic.main.track_search_item.view.* import java.util.* class TrackSearchAdapter(context: Context) -: ArrayAdapter(context, R.layout.item_track_search, ArrayList()) { +: ArrayAdapter(context, R.layout.track_search_item, ArrayList()) { override fun getView(position: Int, view: View?, parent: ViewGroup): View { var v = view @@ -20,7 +20,7 @@ class TrackSearchAdapter(context: Context) // Check if an existing view is being reused, otherwise inflate the view val holder: TrackSearchHolder // view lookup cache stored in tag if (v == null) { - v = parent.inflate(R.layout.item_track_search) + v = parent.inflate(R.layout.track_search_item) holder = TrackSearchHolder(v) v.tag = holder } else { 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 8af0cc8470..c9ce8cd663 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 @@ -12,7 +12,7 @@ import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.data.track.TrackService import eu.kanade.tachiyomi.ui.base.controller.DialogController import eu.kanade.tachiyomi.util.plusAssign -import kotlinx.android.synthetic.main.dialog_track_search.view.* +import kotlinx.android.synthetic.main.track_search_dialog.view.* import rx.Subscription import rx.android.schedulers.AndroidSchedulers import rx.subscriptions.CompositeSubscription @@ -51,7 +51,7 @@ class TrackSearchDialog : DialogController { override fun onCreateDialog(savedState: Bundle?): Dialog { val dialog = MaterialDialog.Builder(activity!!) - .customView(R.layout.dialog_track_search, false) + .customView(R.layout.track_search_dialog, false) .positiveText(android.R.string.ok) .negativeText(android.R.string.cancel) .onPositive { _, _ -> onPositiveButtonClick() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index b9c16184d8..07964dfd62 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -33,7 +33,7 @@ import eu.kanade.tachiyomi.util.plusAssign import eu.kanade.tachiyomi.util.toast import eu.kanade.tachiyomi.widget.SimpleAnimationListener import eu.kanade.tachiyomi.widget.SimpleSeekBarListener -import kotlinx.android.synthetic.main.activity_reader.* +import kotlinx.android.synthetic.main.reader_activity.* import me.zhanghai.android.systemuihelper.SystemUiHelper import me.zhanghai.android.systemuihelper.SystemUiHelper.* import nucleus.factory.RequiresPresenter @@ -92,7 +92,7 @@ class ReaderActivity : BaseRxActivity() { override fun onCreate(savedState: Bundle?) { super.onCreate(savedState) - setContentView(R.layout.activity_reader) + setContentView(R.layout.reader_activity) if (savedState == null && SharedData.get(ReaderEvent::class.java) == null) { finish() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderCustomFilterDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderCustomFilterDialog.kt index 4dc26c487a..9738690318 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderCustomFilterDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderCustomFilterDialog.kt @@ -13,7 +13,7 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.util.plusAssign import eu.kanade.tachiyomi.widget.SimpleSeekBarListener -import kotlinx.android.synthetic.main.dialog_reader_custom_filter.view.* +import kotlinx.android.synthetic.main.reader_custom_filter_dialog.view.* import rx.Subscription import rx.android.schedulers.AndroidSchedulers import rx.subscriptions.CompositeSubscription @@ -65,7 +65,7 @@ class ReaderCustomFilterDialog : DialogFragment() { */ override fun onCreateDialog(savedState: Bundle?): Dialog { val dialog = MaterialDialog.Builder(activity) - .customView(R.layout.dialog_reader_custom_filter, false) + .customView(R.layout.reader_custom_filter_dialog, false) .positiveText(android.R.string.ok) .build() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt index bdcc558dd1..32e6e6d34d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsDialog.kt @@ -10,7 +10,7 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.util.plusAssign import eu.kanade.tachiyomi.widget.IgnoreFirstSpinnerListener -import kotlinx.android.synthetic.main.dialog_reader_settings.view.* +import kotlinx.android.synthetic.main.reader_settings_dialog.view.* import rx.Observable import rx.android.schedulers.AndroidSchedulers import rx.subscriptions.CompositeSubscription @@ -26,7 +26,7 @@ class ReaderSettingsDialog : DialogFragment() { override fun onCreateDialog(savedState: Bundle?): Dialog { val dialog = MaterialDialog.Builder(activity) .title(R.string.label_settings) - .customView(R.layout.dialog_reader_settings, true) + .customView(R.layout.reader_settings_dialog, true) .positiveText(android.R.string.ok) .build() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/PageDecodeErrorLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/PageDecodeErrorLayout.kt index b9314d0c44..559621932b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/PageDecodeErrorLayout.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/base/PageDecodeErrorLayout.kt @@ -6,7 +6,7 @@ import android.view.View import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.ui.reader.ReaderActivity -import kotlinx.android.synthetic.main.page_decode_error.view.* +import kotlinx.android.synthetic.main.reader_page_decode_error.view.* class PageDecodeErrorLayout( val view: View, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt index a75eaaee77..6dcc2393e8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PageView.kt @@ -16,8 +16,7 @@ import eu.kanade.tachiyomi.ui.reader.viewer.base.PageDecodeErrorLayout import eu.kanade.tachiyomi.ui.reader.viewer.pager.horizontal.RightToLeftReader import eu.kanade.tachiyomi.ui.reader.viewer.pager.vertical.VerticalReader import eu.kanade.tachiyomi.util.inflate -import kotlinx.android.synthetic.main.chapter_image.view.* -import kotlinx.android.synthetic.main.item_pager_reader.view.* +import kotlinx.android.synthetic.main.reader_pager_item.view.* import rx.Observable import rx.Subscription import rx.android.schedulers.AndroidSchedulers @@ -259,7 +258,7 @@ class PageView @JvmOverloads constructor(context: Context, attrs: AttributeSet? val activity = reader.activity as ReaderActivity - val layout = inflate(R.layout.page_decode_error) + val layout = inflate(R.layout.reader_page_decode_error) PageDecodeErrorLayout(layout, page, activity.readerTheme, { if (reader.isAdded) { activity.presenter.retryPage(page) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt index 0fa7a808f0..c3c820f096 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerReaderAdapter.kt @@ -23,7 +23,7 @@ class PagerReaderAdapter(private val reader: PagerReader) : ViewPagerAdapter() { } override fun createView(container: ViewGroup, position: Int): View { - val view = container.inflate(R.layout.item_pager_reader) as PageView + val view = container.inflate(R.layout.reader_pager_item) as PageView view.initialize(reader, pages[position]) return view } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt index ea6c6dca95..3739020270 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonAdapter.kt @@ -51,7 +51,7 @@ class WebtoonAdapter(val fragment: WebtoonReader) : RecyclerView.Adapter() { override fun getLayoutRes(): Int { - return R.layout.item_recent_chapter_section + return R.layout.recent_chapters_section_item } override fun createViewHolder(adapter: FlexibleAdapter<*>, inflater: LayoutInflater, parent: ViewGroup): Holder { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt index c55039af66..434ee400c3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterHolder.kt @@ -9,7 +9,7 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.util.getResourceColor import jp.wasabeef.glide.transformations.CropCircleTransformation -import kotlinx.android.synthetic.main.item_recent_chapters.view.* +import kotlinx.android.synthetic.main.recent_chapters_item.view.* /** * Holder that contains chapter item diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterItem.kt index 71042e7ce8..a98287d785 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChapterItem.kt @@ -24,7 +24,7 @@ class RecentChapterItem(val chapter: Chapter, val manga: Manga, header: DateItem get() = status == Download.DOWNLOADED override fun getLayoutRes(): Int { - return R.layout.item_recent_chapters + return R.layout.recent_chapters_item } override fun createViewHolder(adapter: FlexibleAdapter<*>, diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt index d73e0cd158..2ae2fba547 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersController.kt @@ -21,12 +21,12 @@ import eu.kanade.tachiyomi.ui.base.controller.popControllerWithTag import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.util.toast -import kotlinx.android.synthetic.main.fragment_recent_chapters.view.* +import kotlinx.android.synthetic.main.recent_chapters_controller.view.* import timber.log.Timber /** * Fragment that shows recent chapters. - * Uses [R.layout.fragment_recent_chapters]. + * Uses [R.layout.recent_chapters_controller]. * UI related actions should be called from here. */ class RecentChaptersController : NucleusController(), @@ -58,7 +58,7 @@ class RecentChaptersController : NucleusController(), } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { - return inflater.inflate(R.layout.fragment_recent_chapters, container, false) + return inflater.inflate(R.layout.recent_chapters_controller, container, false) } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt index 2b5c81693f..6410f1e535 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadController.kt @@ -16,7 +16,7 @@ import eu.kanade.tachiyomi.ui.base.controller.NucleusController import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.util.toast -import kotlinx.android.synthetic.main.fragment_recently_read.view.* +import kotlinx.android.synthetic.main.recently_read_controller.view.* /** * Fragment that shows recently read manga. @@ -45,7 +45,7 @@ class RecentlyReadController : NucleusController(), } override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { - return inflater.inflate(R.layout.fragment_recently_read, container, false) + return inflater.inflate(R.layout.recently_read_controller, container, false) } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt index aec2dacb2c..2d4464ffa9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadHolder.kt @@ -6,7 +6,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.davidea.viewholders.FlexibleViewHolder import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.MangaChapterHistory -import kotlinx.android.synthetic.main.item_recently_read.view.* +import kotlinx.android.synthetic.main.recently_read_item.view.* import java.util.* /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadItem.kt index 6d9fc4b243..7ec7b0db40 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recently_read/RecentlyReadItem.kt @@ -11,7 +11,7 @@ import eu.kanade.tachiyomi.util.inflate class RecentlyReadItem(val mch: MangaChapterHistory) : AbstractFlexibleItem() { override fun getLayoutRes(): Int { - return R.layout.item_recently_read + return R.layout.recently_read_item } override fun createViewHolder(adapter: FlexibleAdapter<*>, diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/CustomLayoutPicker.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/CustomLayoutPicker.kt index 79eb16ac96..823e1ce438 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/CustomLayoutPicker.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/CustomLayoutPicker.kt @@ -24,7 +24,7 @@ class CustomLayoutFilePickerFragment : FilePickerFragment() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { when (viewType) { LogicHandler.VIEWTYPE_DIR -> { - val view = parent.inflate(R.layout.listitem_dir) + val view = parent.inflate(R.layout.common_listitem_dir) return DirViewHolder(view) } else -> return super.onCreateViewHolder(parent, viewType) diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/DialogCheckboxView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/DialogCheckboxView.kt index e84826004a..327bb20aa5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/DialogCheckboxView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/DialogCheckboxView.kt @@ -6,13 +6,13 @@ import android.util.AttributeSet import android.widget.LinearLayout import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.inflate -import kotlinx.android.synthetic.main.dialog_with_checkbox.view.* +import kotlinx.android.synthetic.main.common_dialog_with_checkbox.view.* class DialogCheckboxView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : LinearLayout(context, attrs) { init { - addView(inflate(R.layout.dialog_with_checkbox)) + addView(inflate(R.layout.common_dialog_with_checkbox)) } fun setDescription(@StringRes id: Int){ diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt index 7950ff0f00..6715bb17d3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/EmptyView.kt @@ -7,13 +7,13 @@ import android.widget.RelativeLayout import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.getResourceColor import eu.kanade.tachiyomi.util.setVectorCompat -import kotlinx.android.synthetic.main.view_empty.view.* +import kotlinx.android.synthetic.main.common_view_empty.view.* class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : RelativeLayout (context, attrs) { init { - inflate(context, R.layout.view_empty, this) + inflate(context, R.layout.common_view_empty, this) } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginPreference.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginPreference.kt index 5dbeb5db6c..adc8f386a7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginPreference.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/LoginPreference.kt @@ -5,13 +5,13 @@ import android.support.v7.preference.Preference import android.support.v7.preference.PreferenceViewHolder import android.util.AttributeSet import eu.kanade.tachiyomi.R -import kotlinx.android.synthetic.main.preference_widget_imageview.view.* +import kotlinx.android.synthetic.main.pref_widget_imageview.view.* class LoginPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : Preference(context, attrs) { init { - widgetLayoutResource = R.layout.preference_widget_imageview + widgetLayoutResource = R.layout.pref_widget_imageview } override fun onBindViewHolder(holder: PreferenceViewHolder) { diff --git a/app/src/main/res/layout-land/fragment_manga_info.xml b/app/src/main/res/layout-land/manga_info_controller.xml similarity index 100% rename from app/src/main/res/layout-land/fragment_manga_info.xml rename to app/src/main/res/layout-land/manga_info_controller.xml diff --git a/app/src/main/res/layout/activity_edit_categories.xml b/app/src/main/res/layout/activity_edit_categories.xml deleted file mode 100644 index 770ef3a6d2..0000000000 --- a/app/src/main/res/layout/activity_edit_categories.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_manga.xml b/app/src/main/res/layout/activity_manga.xml deleted file mode 100644 index e929653a96..0000000000 --- a/app/src/main/res/layout/activity_manga.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_preferences.xml b/app/src/main/res/layout/activity_preferences.xml deleted file mode 100644 index 7c1371b4f4..0000000000 --- a/app/src/main/res/layout/activity_preferences.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_catalogue.xml b/app/src/main/res/layout/catalogue_controller.xml similarity index 100% rename from app/src/main/res/layout/fragment_catalogue.xml rename to app/src/main/res/layout/catalogue_controller.xml diff --git a/app/src/main/res/layout/item_catalogue_grid.xml b/app/src/main/res/layout/catalogue_grid_item.xml similarity index 100% rename from app/src/main/res/layout/item_catalogue_grid.xml rename to app/src/main/res/layout/catalogue_grid_item.xml diff --git a/app/src/main/res/layout/item_catalogue_list.xml b/app/src/main/res/layout/catalogue_list_item.xml similarity index 100% rename from app/src/main/res/layout/item_catalogue_list.xml rename to app/src/main/res/layout/catalogue_list_item.xml diff --git a/app/src/main/res/layout/progress_item.xml b/app/src/main/res/layout/catalogue_progress_item.xml similarity index 100% rename from app/src/main/res/layout/progress_item.xml rename to app/src/main/res/layout/catalogue_progress_item.xml diff --git a/app/src/main/res/layout/recycler_autofit.xml b/app/src/main/res/layout/catalogue_recycler_autofit.xml similarity index 88% rename from app/src/main/res/layout/recycler_autofit.xml rename to app/src/main/res/layout/catalogue_recycler_autofit.xml index 17c2bbd85a..a6e1037939 100644 --- a/app/src/main/res/layout/recycler_autofit.xml +++ b/app/src/main/res/layout/catalogue_recycler_autofit.xml @@ -7,4 +7,4 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:columnWidth="140dp" - tools:listitem="@layout/item_catalogue_grid" /> \ No newline at end of file + tools:listitem="@layout/catalogue_grid_item" /> \ No newline at end of file diff --git a/app/src/main/res/layout/categories_controller.xml b/app/src/main/res/layout/categories_controller.xml index 8dfa964057..f0930b6ce2 100644 --- a/app/src/main/res/layout/categories_controller.xml +++ b/app/src/main/res/layout/categories_controller.xml @@ -10,7 +10,7 @@ android:layout_height="match_parent" android:id="@+id/recycler" android:choiceMode="multipleChoice" - tools:listitem="@layout/item_edit_categories" + tools:listitem="@layout/categories_item" /> - diff --git a/app/src/main/res/layout/fragment_manga_chapters.xml b/app/src/main/res/layout/chapters_controller.xml similarity index 97% rename from app/src/main/res/layout/fragment_manga_chapters.xml rename to app/src/main/res/layout/chapters_controller.xml index 11412d1804..7c2b8f2ecb 100644 --- a/app/src/main/res/layout/fragment_manga_chapters.xml +++ b/app/src/main/res/layout/chapters_controller.xml @@ -29,7 +29,7 @@ android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:descendantFocusability="blocksDescendants" - tools:listitem="@layout/item_chapter"> + tools:listitem="@layout/chapters_item"> diff --git a/app/src/main/res/layout/item_chapter.xml b/app/src/main/res/layout/chapters_item.xml similarity index 100% rename from app/src/main/res/layout/item_chapter.xml rename to app/src/main/res/layout/chapters_item.xml diff --git a/app/src/main/res/layout/dialog_with_checkbox.xml b/app/src/main/res/layout/common_dialog_with_checkbox.xml similarity index 100% rename from app/src/main/res/layout/dialog_with_checkbox.xml rename to app/src/main/res/layout/common_dialog_with_checkbox.xml diff --git a/app/src/main/res/layout/listitem_dir.xml b/app/src/main/res/layout/common_listitem_dir.xml similarity index 100% rename from app/src/main/res/layout/listitem_dir.xml rename to app/src/main/res/layout/common_listitem_dir.xml diff --git a/app/src/main/res/layout/spinner_item.xml b/app/src/main/res/layout/common_spinner_item.xml similarity index 100% rename from app/src/main/res/layout/spinner_item.xml rename to app/src/main/res/layout/common_spinner_item.xml diff --git a/app/src/main/res/layout/view_empty.xml b/app/src/main/res/layout/common_view_empty.xml similarity index 100% rename from app/src/main/res/layout/view_empty.xml rename to app/src/main/res/layout/common_view_empty.xml diff --git a/app/src/main/res/layout/activity_download_manager.xml b/app/src/main/res/layout/download_controller.xml similarity index 93% rename from app/src/main/res/layout/activity_download_manager.xml rename to app/src/main/res/layout/download_controller.xml index d33cf811d1..8b353b1fe6 100644 --- a/app/src/main/res/layout/activity_download_manager.xml +++ b/app/src/main/res/layout/download_controller.xml @@ -10,7 +10,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/recycler" - tools:listitem="@layout/item_download"/> + tools:listitem="@layout/download_item"/> - - -