diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f4cf12020a..5746d22a48 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -148,6 +148,10 @@
android:name=".data.backup.BackupRestoreService"
android:exported="false"/>
+
+
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/CenteredToolbar.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/CenteredToolbar.kt
new file mode 100644
index 0000000000..b9f6a23d3c
--- /dev/null
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/CenteredToolbar.kt
@@ -0,0 +1,33 @@
+package eu.kanade.tachiyomi.ui.base
+
+import android.content.Context
+import android.util.AttributeSet
+import androidx.appcompat.graphics.drawable.DrawerArrowDrawable
+import androidx.appcompat.widget.Toolbar
+import kotlinx.android.synthetic.main.main_activity.view.*
+
+class CenteredToolbar@JvmOverloads constructor(context: Context, attrs: AttributeSet? = null): Toolbar
+ (context, attrs) {
+
+ override fun setTitle(resId: Int) {
+ if (navigationIcon is DrawerArrowDrawable) {
+ super.setTitle(resId)
+ toolbar_title.text = null
+ }
+ else {
+ toolbar_title.text = context.getString(resId)
+ super.setTitle(null)
+ }
+ }
+
+ override fun setTitle(title: CharSequence?) {
+ if (navigationIcon is DrawerArrowDrawable) {
+ super.setTitle(title)
+ toolbar_title.text = null
+ }
+ else {
+ toolbar_title.text = title
+ super.setTitle(null)
+ }
+ }
+}
\ No newline at end of file
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 9a18c3a3cc..787c43a758 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
@@ -26,9 +26,11 @@ import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.ui.catalogue.browse.BrowseCatalogueController
import eu.kanade.tachiyomi.ui.catalogue.global_search.CatalogueSearchController
import eu.kanade.tachiyomi.ui.catalogue.latest.LatestUpdatesController
+import eu.kanade.tachiyomi.ui.main.RootSearchInterface
import eu.kanade.tachiyomi.ui.setting.SettingsSourcesController
import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener
import eu.kanade.tachiyomi.util.view.applyWindowInsetsForRootController
+import eu.kanade.tachiyomi.util.view.scrollViewWith
import eu.kanade.tachiyomi.widget.preference.SourceLoginDialog
import kotlinx.android.parcel.Parcelize
import kotlinx.android.synthetic.main.catalogue_main_controller.*
@@ -47,6 +49,7 @@ class CatalogueController : NucleusController(),
SourceLoginDialog.Listener,
FlexibleAdapter.OnItemClickListener,
CatalogueAdapter.OnBrowseClickListener,
+ RootSearchInterface,
CatalogueAdapter.OnLatestClickListener {
/**
@@ -113,6 +116,8 @@ class CatalogueController : NucleusController(),
recycler.addItemDecoration(SourceDividerItemDecoration(view.context))
recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
+ scrollViewWith(recycler)
+
requestPermissionsSafe(arrayOf(WRITE_EXTERNAL_STORAGE), 301)
}
@@ -216,7 +221,7 @@ class CatalogueController : NucleusController(),
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
// Initialize option to open catalogue settings.
- R.id.action_settings -> {
+ R.id.action_filter -> {
router.pushController((RouterTransaction.with(SettingsSourcesController()))
.popChangeHandler(SettingsSourcesFadeChangeHandler())
.pushChangeHandler(FadeChangeHandler()))
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt
index be07f1a6c4..2588d7cfa1 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt
@@ -37,11 +37,11 @@ import eu.kanade.tachiyomi.ui.webview.WebViewActivity
import eu.kanade.tachiyomi.util.system.connectivityManager
import eu.kanade.tachiyomi.util.view.HeightTopWindowInsetsListener
import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener
-import eu.kanade.tachiyomi.util.view.applyWindowInsetsForController
import eu.kanade.tachiyomi.util.view.gone
import eu.kanade.tachiyomi.util.view.inflate
import eu.kanade.tachiyomi.util.view.marginBottom
import eu.kanade.tachiyomi.util.view.marginTop
+import eu.kanade.tachiyomi.util.view.scrollViewWith
import eu.kanade.tachiyomi.util.view.snack
import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
@@ -140,13 +140,13 @@ open class BrowseCatalogueController(bundle: Bundle) :
override fun onViewCreated(view: View) {
super.onViewCreated(view)
- view.applyWindowInsetsForController()
// Initialize adapter, scroll listener and recycler views
adapter = FlexibleAdapter(null, this)
setupRecycler(view)
navView?.setFilters(presenter.filterItems)
+ scrollViewWith(recycler!!, true)
progress?.visible()
}
@@ -246,6 +246,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
}
}
}
+ recycler.clipToPadding = false
recycler.setHasFixedSize(true)
recycler.adapter = adapter
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt
index 2ea5ce57b3..0e7c5e445c 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionController.kt
@@ -23,7 +23,7 @@ import eu.kanade.tachiyomi.extension.model.Extension
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener
-import eu.kanade.tachiyomi.util.view.applyWindowInsetsForController
+import eu.kanade.tachiyomi.util.view.scrollViewWith
import kotlinx.android.synthetic.main.extension_controller.*
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
@@ -64,7 +64,7 @@ open class ExtensionController : NucleusController(),
override fun onViewCreated(view: View) {
super.onViewCreated(view)
- view.applyWindowInsetsForController()
+ //view.applyWindowInsetsForController()
ext_swipe_refresh.isRefreshing = true
ext_swipe_refresh.refreshes().subscribeUntilDestroy {
@@ -78,6 +78,7 @@ open class ExtensionController : NucleusController(),
ext_recycler.adapter = adapter
ext_recycler.addItemDecoration(ExtensionDividerItemDecoration(view.context))
ext_recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
+ scrollViewWith(ext_recycler, true, ext_swipe_refresh)
}
override fun onDestroyView(view: View) {
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 2021dd618f..ba3ca0b721 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
@@ -43,6 +43,7 @@ import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.ui.download.DownloadController
import eu.kanade.tachiyomi.ui.library.filter.SortFilterBottomSheet
import eu.kanade.tachiyomi.ui.main.MainActivity
+import eu.kanade.tachiyomi.ui.main.RootSearchInterface
import eu.kanade.tachiyomi.ui.manga.MangaDetailsController
import eu.kanade.tachiyomi.ui.migration.MigrationInterface
import eu.kanade.tachiyomi.ui.migration.manga.design.PreMigrationController
@@ -69,6 +70,7 @@ open class LibraryController(
ChangeMangaCategoriesDialog.Listener,
MigrationInterface,
DownloadServiceListener,
+ RootSearchInterface,
LibraryServiceListener {
/**
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt
index fc295945c8..293ad2f4a0 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListController.kt
@@ -7,10 +7,9 @@ import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import android.widget.LinearLayout
-import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.view.ActionMode
import androidx.appcompat.widget.PopupMenu
+import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.math.MathUtils.clamp
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
@@ -28,12 +27,13 @@ import eu.kanade.tachiyomi.data.database.models.LibraryManga
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.library.LibraryUpdateService
import eu.kanade.tachiyomi.data.preference.getOrDefault
-import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.main.SwipeGestureInterface
import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.system.launchUI
import eu.kanade.tachiyomi.util.view.inflate
+import eu.kanade.tachiyomi.util.view.scrollViewWith
import eu.kanade.tachiyomi.util.view.snack
+import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
import kotlinx.android.synthetic.main.filter_bottom_sheet.*
import kotlinx.android.synthetic.main.library_grid_recycler.*
@@ -61,7 +61,7 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
private var lastItemPosition:Int? = null
private var lastItem:IFlexible<*>? = null
- private lateinit var customTitleSpinner: LinearLayout
+ private lateinit var customTitleSpinner: ViewGroup
private lateinit var titlePopupMenu:PopupMenu
private var switchingCategories = false
@@ -73,13 +73,15 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
override fun contentView():View = recycler_layout
- override fun getTitle(): String? {
- return when {
- spinnerAdapter?.array?.size ?: 0 > 1 -> null
- spinnerAdapter?.array?.size == 1 -> return spinnerAdapter?.array?.firstOrNull()
- else -> return super.getTitle()
- }
- }
+ /* override fun getTitle(): String? {
+ return if (::customTitleSpinner.isInitialized) customTitleSpinner.category_title.text.toString()
+ else super.getTitle()
+// when {
+// spinnerAdapter?.array?.size ?: 0 > 1 -> null
+// spinnerAdapter?.array?.size == 1 -> return spinnerAdapter?.array?.firstOrNull()
+// else -> return super.getTitle()
+// }
+ }*/
private var scrollListener = object : RecyclerView.OnScrollListener () {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
@@ -97,6 +99,9 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
val category = presenter.categories.find { it.order == order }
customTitleSpinner.category_title.text = category?.name ?: ""
+ val isCurrentController = router?.backstack?.lastOrNull()?.controller() ==
+ this@LibraryListController
+ if (isCurrentController) setTitle()
}
}
}
@@ -135,8 +140,8 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
val tv = TypedValue()
activity!!.theme.resolveAttribute(R.attr.actionBarTintColor, tv, true)
- customTitleSpinner = library_layout.inflate(R.layout.spinner_title) as LinearLayout
- (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(false)
+ customTitleSpinner = library_layout.inflate(R.layout.spinner_title) as ViewGroup
+// (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(false)
spinnerAdapter = SpinnerAdapter(
view.context,
R.layout.library_spinner_textview,
@@ -151,12 +156,17 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
scrollToHeader(item.itemId)
true
}
- (activity as MainActivity).supportActionBar?.customView = customTitleSpinner
+ //(activity as MainActivity).supportActionBar?.customView = customTitleSpinner
+ scrollViewWith(recycler) { insets ->
+ fast_scroller.updateLayoutParams {
+ topMargin = insets.systemWindowInsetTop
+ }
+ }
}
override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) {
super.onChangeStarted(handler, type)
- if (type.isEnter) {
+ /*if (type.isEnter) {
(activity as MainActivity).supportActionBar
?.setDisplayShowCustomEnabled(router?.backstack?.lastOrNull()?.controller() ==
this && spinnerAdapter?.array?.size ?: 0 > 1)
@@ -165,11 +175,11 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
(activity as MainActivity).toolbar.menu.findItem(R.id
.action_search)?.collapseActionView()
(activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(false)
- }
+ }*/
}
override fun onDestroy() {
- (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(false)
+ // (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(false)
super.onDestroy()
}
@@ -195,14 +205,14 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
val isCurrentController = router?.backstack?.lastOrNull()?.controller() ==
this
- (activity as AppCompatActivity).supportActionBar
- ?.setDisplayShowCustomEnabled(isCurrentController && presenter.categories.size > 1)
- if (isCurrentController) setTitle()
+// (activity as AppCompatActivity).supportActionBar
+// ?.setDisplayShowCustomEnabled(isCurrentController && presenter.categories.size > 1)
customTitleSpinner.category_title.text =
presenter.categories[clamp(activeCategory,
0,
presenter.categories.size - 1)].name
+ if (isCurrentController) setTitle()
updateScroll = false
if (!freshStart) {
justStarted = false
@@ -232,6 +242,7 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
val headerPosition = adapter.indexOf(pos)
switchingCategories = true
if (headerPosition > -1) {
+ activity?.appbar?.y = 0f
recycler.suppressLayout(true)
(recycler.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(
headerPosition, if (headerPosition == 0) 0 else (-30).dpToPx
@@ -544,7 +555,13 @@ class LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
}
override fun onSwipeBottom(x: Float, y: Float) { }
- override fun onSwipeTop(x: Float, y: Float) { }
+
+ override fun onSwipeTop(x: Float, y: Float) {
+ val sheetRect = Rect()
+ activity!!.navigationView.getGlobalVisibleRect(sheetRect)
+ if (sheetRect.contains(x.toInt(), y.toInt()))
+ showFiltersBottomSheet()
+ }
override fun onSwipeLeft(x: Float, y: Float) = goToNextCategory(x, y,-1)
override fun onSwipeRight(x: Float, y: Float) = goToNextCategory(x, y,1)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt
index d152c92ba9..185b72b0b6 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt
@@ -617,7 +617,7 @@ class LibraryPresenter(
if (mangas.isEmpty()) return emptyList()
return mangas.toSet()
.map { db.getCategoriesForManga(it).executeAsBlocking() }
- .reduce { set1: Iterable, set2 -> set1.intersect(set2) }
+ .reduce { set1: Iterable, set2 -> set1.intersect(set2).toMutableList() }
}
/**
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 11d9b83b59..6c77b6a5ba 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
@@ -8,9 +8,11 @@ import android.content.Intent
import android.content.res.Configuration
import android.graphics.Color
import android.graphics.Rect
+import android.graphics.drawable.Drawable
import android.os.Build
import android.os.Bundle
import android.view.GestureDetector
+import android.view.MenuItem
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
@@ -18,6 +20,7 @@ import android.view.WindowManager
import android.webkit.WebView
import androidx.appcompat.content.res.AppCompatResources
import androidx.appcompat.graphics.drawable.DrawerArrowDrawable
+import androidx.core.content.ContextCompat
import androidx.core.graphics.ColorUtils
import androidx.core.view.GestureDetectorCompat
import com.afollestad.materialdialogs.MaterialDialog
@@ -79,6 +82,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
protected lateinit var router: Router
protected var drawerArrow: DrawerArrowDrawable? = null
+ private var searchDrawable:Drawable? = null
private var currentGestureDelegate:SwipeGestureInterface? = null
private lateinit var gestureDetector:GestureDetectorCompat
@@ -130,7 +134,8 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
drawerArrow = DrawerArrowDrawable(this)
drawerArrow?.color = getResourceColor(R.attr.actionBarTintColor)
- toolbar.navigationIcon = drawerArrow
+ searchDrawable = ContextCompat.getDrawable(this, R.drawable
+ .ic_search_white_24dp)
// tabAnimator = TabsAnimator(tabs)
@@ -160,7 +165,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
setRoot(RecentlyReadController(), id)
}
R.id.nav_catalogues -> setRoot(CatalogueController(), id)
- R.id.nav_settings -> setRoot(SettingsMainController(), id)
+ //R.id.nav_settings -> setRoot(SettingsMainController(), id)
}
}
else if (currentRoot.tag()?.toIntOrNull() == id) {
@@ -183,7 +188,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
controller?.showFiltersBottomSheet()
}
}
- R.id.nav_catalogues, R.id.nav_settings -> router.popToRoot()
+ R.id.nav_catalogues -> router.popToRoot()
}
}
true
@@ -221,7 +226,8 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
supportActionBar?.setDisplayShowCustomEnabled(true)
- window.statusBarColor = getResourceColor(android.R.attr.colorPrimary)
+ window.statusBarColor = ColorUtils.setAlphaComponent(getResourceColor(android.R.attr
+ .colorBackground), 175)
content.setOnApplyWindowInsetsListener { v, insets ->
// if device doesn't support light nav bar
window.navigationBarColor = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
@@ -307,8 +313,15 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
}
}
+ toolbar.navigationIcon = if (router.backstackSize > 1) drawerArrow else searchDrawable
+ (router.backstack.lastOrNull()?.controller() as? BaseController)?.setTitle()
+
toolbar.setNavigationOnClickListener {
- onBackPressed()
+ val rootSearchController = router.backstack.lastOrNull()?.controller()
+ if (rootSearchController is RootSearchInterface) {
+ toolbar.menu.findItem(R.id.action_search)?.expandActionView()
+ }
+ else onBackPressed()
}
navigationView.visibility = if (router.backstackSize > 1) View.GONE else View.VISIBLE
@@ -318,10 +331,12 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
container: ViewGroup, handler: ControllerChangeHandler) {
syncActivityViewWithController(to, from, isPush)
+ appbar.y = 0f
}
override fun onChangeCompleted(to: Controller?, from: Controller?, isPush: Boolean,
container: ViewGroup, handler: ControllerChangeHandler) {
+ appbar.y = 0f
}
})
@@ -383,13 +398,13 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
private fun setExtensionsBadge() {
val updates = preferences.extensionUpdatesCount().getOrDefault()
if (updates > 0) {
- val badge = navigationView.getOrCreateBadge(R.id.nav_settings)
+ val badge = navigationView.getOrCreateBadge(R.id.nav_catalogues)
badge.number = updates
badge.backgroundColor = getResourceColor(R.attr.badgeColor)
badge.badgeTextColor = Color.WHITE
}
else {
- navigationView.removeBadge(R.id.nav_settings)
+ navigationView.removeBadge(R.id.nav_catalogues)
}
}
@@ -522,6 +537,19 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
router.setRoot(controller.withFadeTransaction().tag(id.toString()))
}
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ when (item.itemId) {
+ // Initialize option to open catalogue settings.
+ R.id.action_settings -> {
+ router.pushController((RouterTransaction.with(SettingsMainController()))
+ .popChangeHandler(FadeChangeHandler())
+ .pushChangeHandler(FadeChangeHandler()))
+ }
+ else -> return super.onOptionsItemSelected(item)
+ }
+ return super.onOptionsItemSelected(item)
+ }
+
override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
gestureDetector.onTouchEvent(ev)
if (ev?.action == MotionEvent.ACTION_DOWN) {
@@ -556,7 +584,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
}
val onRoot = router.backstackSize == 1
if (onRoot) {
- toolbar.navigationIcon = null
+ toolbar.navigationIcon = searchDrawable
} else {
toolbar.navigationIcon = drawerArrow
}
@@ -581,8 +609,14 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
if (to is NoToolbarElevationController) {
appbar.disableElevation()
+ /*controller_container.updateLayoutParams {
+ behavior = null
+ }*/
} else {
appbar.enableElevation()
+ /*controller_container.updateLayoutParams {
+ behavior = AppBarLayout.ScrollingViewBehavior()
+ }*/
}
if (to !is DialogController) {
@@ -700,6 +734,8 @@ interface BottomNavBarInterface {
fun canChangeTabs(block: () -> Unit): Boolean
}
+interface RootSearchInterface
+
interface SwipeGestureInterface {
fun onSwipeRight(x: Float, y: Float)
fun onSwipeLeft(x: Float, y: Float)
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt
index 06eb1ad757..5c384b9bfd 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaDetailsController.kt
@@ -309,7 +309,7 @@ class MangaDetailsController : BaseController,
super.onChangeStarted(handler, type)
if (type == ControllerChangeType.PUSH_ENTER || type == ControllerChangeType.POP_ENTER) {
if (type == ControllerChangeType.POP_ENTER)
- return
+ return
(activity as MainActivity).appbar.setBackgroundColor(Color.TRANSPARENT)
(activity as MainActivity).toolbar.setBackgroundColor(Color.TRANSPARENT)
activity?.window?.statusBarColor = Color.TRANSPARENT
@@ -320,13 +320,13 @@ class MangaDetailsController : BaseController,
if (type == ControllerChangeType.POP_EXIT) setHasOptionsMenu(false)
colorAnimator?.cancel()
- (activity as MainActivity).toolbar.setBackgroundColor(activity?.getResourceColor(
- android.R.attr.colorPrimary
- ) ?: Color.BLACK)
-
- activity?.window?.statusBarColor = activity?.getResourceColor(
- android.R.attr.colorPrimary
+ val colorPrimary = activity?.getResourceColor(
+ android.R.attr.colorBackground
) ?: Color.BLACK
+ (activity as MainActivity).appbar.setBackgroundColor(colorPrimary)
+ (activity as MainActivity).toolbar.setBackgroundColor(colorPrimary)
+
+ activity?.window?.statusBarColor = ColorUtils.setAlphaComponent(colorPrimary, 175)
}
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersAdapter.kt
index 233c90fcea..67715508e9 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersAdapter.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent_updates/RecentChaptersAdapter.kt
@@ -10,7 +10,7 @@ class RecentChaptersAdapter(val controller: RecentChaptersController) :
init {
setDisplayHeadersAtStartUp(true)
- setStickyHeaders(true)
+ //setStickyHeaders(true)
}
interface OnCoverClickListener {
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 d87a064f7a..d0f0946309 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
@@ -20,7 +20,6 @@ import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.data.library.LibraryUpdateService
import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
-import eu.kanade.tachiyomi.ui.base.controller.NoToolbarElevationController
import eu.kanade.tachiyomi.ui.base.controller.NucleusController
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.ui.main.MainActivity
@@ -29,6 +28,7 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.ui.recently_read.RecentlyReadController
import eu.kanade.tachiyomi.util.system.notificationManager
import eu.kanade.tachiyomi.util.view.applyWindowInsetsForRootController
+import eu.kanade.tachiyomi.util.view.scrollViewWith
import eu.kanade.tachiyomi.util.view.snack
import kotlinx.android.synthetic.main.main_activity.*
import kotlinx.android.synthetic.main.recent_chapters_controller.*
@@ -42,7 +42,6 @@ import uy.kohesive.injekt.api.get
* UI related actions should be called from here.
*/
class RecentChaptersController : NucleusController(),
- NoToolbarElevationController,
ActionMode.Callback,
FlexibleAdapter.OnItemClickListener,
FlexibleAdapter.OnItemLongClickListener,
@@ -111,7 +110,8 @@ class RecentChaptersController : NucleusController(),
// It can be a very long operation, so we disable swipe refresh and show a snackbar.
swipe_refresh.isRefreshing = false
}
- //recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
+
+ scrollViewWith(recycler, swipeRefreshLayout = swipe_refresh)
}
override fun onDestroyView(view: View) {
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 e9eba36186..77923730bd 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
@@ -20,6 +20,7 @@ import eu.kanade.tachiyomi.ui.base.controller.BaseController
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.ui.catalogue.browse.ProgressItem
import eu.kanade.tachiyomi.ui.main.MainActivity
+import eu.kanade.tachiyomi.ui.main.RootSearchInterface
import eu.kanade.tachiyomi.ui.manga.MangaDetailsController
import eu.kanade.tachiyomi.ui.reader.ReaderActivity
import eu.kanade.tachiyomi.ui.recent_updates.RecentChaptersController
@@ -27,6 +28,7 @@ import eu.kanade.tachiyomi.util.system.launchUI
import eu.kanade.tachiyomi.util.system.toast
import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener
import eu.kanade.tachiyomi.util.view.applyWindowInsetsForRootController
+import eu.kanade.tachiyomi.util.view.scrollViewWith
import eu.kanade.tachiyomi.util.view.setOnQueryTextChangeListener
import kotlinx.android.synthetic.main.main_activity.*
import kotlinx.android.synthetic.main.recently_read_controller.*
@@ -44,6 +46,7 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle),
RecentlyReadAdapter.OnRemoveClickListener,
RecentlyReadAdapter.OnResumeClickListener,
RecentlyReadAdapter.OnCoverClickListener,
+ RootSearchInterface,
RemoveHistoryDialog.Listener {
init {
@@ -89,6 +92,7 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle),
recycler.setHasFixedSize(true)
recycler.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
resetProgressItem()
+ scrollViewWith(recycler)
if (recentItems != null)
adapter?.updateDataSet(recentItems!!.toList())
@@ -132,9 +136,10 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle),
override fun onUpdateEmptyView(size: Int) {
if (size > 0) {
- empty_view?.hide()
+ // empty_view?.hide()
} else {
- empty_view.show(R.drawable.ic_history_white_128dp, R.string.information_no_recent_manga)
+ // empty_view.show(R.drawable.ic_history_white_128dp, R.string
+ //.information_no_recent_manga)
}
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt
index 613e4e5d6e..e1ca8ddaac 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsController.kt
@@ -17,8 +17,6 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.ui.base.controller.BaseController
import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener
import eu.kanade.tachiyomi.util.view.applyWindowInsetsForController
-import eu.kanade.tachiyomi.util.view.applyWindowInsetsForRootController
-import kotlinx.android.synthetic.main.main_activity.*
import rx.Observable
import rx.Subscription
import rx.subscriptions.CompositeSubscription
@@ -37,12 +35,8 @@ abstract class SettingsController : PreferenceController() {
untilDestroySubscriptions = CompositeSubscription()
}
val view = super.onCreateView(inflater, container, savedInstanceState)
- if (this is SettingsMainController)
- view.applyWindowInsetsForRootController(activity!!.navigationView)
- else {
- view.applyWindowInsetsForController()
- listView.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
- }
+ view.applyWindowInsetsForController()
+ listView.setOnApplyWindowInsetsListener(RecyclerWindowInsetsListener)
return view
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt
index 9f01cce7f6..8feefae628 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt
@@ -21,7 +21,11 @@ import androidx.annotation.Px
import androidx.appcompat.widget.SearchView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.graphics.ColorUtils
+import androidx.core.math.MathUtils.clamp
import androidx.core.view.ViewCompat
+import androidx.recyclerview.widget.LinearLayoutManager
+import androidx.recyclerview.widget.RecyclerView
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.amulyakhare.textdrawable.TextDrawable
import com.amulyakhare.textdrawable.util.ColorGenerator
import com.bluelinelabs.conductor.Controller
@@ -29,9 +33,12 @@ import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.snackbar.Snackbar
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
+import eu.kanade.tachiyomi.util.system.dpToPx
import eu.kanade.tachiyomi.util.system.getResourceColor
+import kotlinx.android.synthetic.main.main_activity.*
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
+import kotlin.math.abs
import kotlin.math.min
/**
@@ -231,7 +238,8 @@ fun View.applyWindowInsetsForRootController(bottomNav: View) {
view.updateLayoutParams {
val attrsArray = intArrayOf(android.R.attr.actionBarSize)
val array = view.context.obtainStyledAttributes(attrsArray)
- topMargin = insets.systemWindowInsetTop + array.getDimensionPixelSize(0, 0)
+ //topMargin = insets.systemWindowInsetTop + array
+ //.getDimensionPixelSize(0, 0)
bottomMargin = bottomNav.height
array.recycle()
}
@@ -304,6 +312,66 @@ fun Controller.setOnQueryTextChangeListener(searchView: SearchView, f: (text: St
})
}
+fun Controller.scrollViewWith(recycler: RecyclerView,
+ padBottom: Boolean = false,
+ swipeRefreshLayout: SwipeRefreshLayout? = null,
+ f: ((WindowInsets) -> Unit)? = null) {
+ var statusBarHeight = -1
+ activity!!.appbar.y = 0f
+ recycler.doOnApplyWindowInsets { view, insets, _ ->
+ val attrsArray = intArrayOf(android.R.attr.actionBarSize)
+ val array = view.context.obtainStyledAttributes(attrsArray)
+ val headerHeight = insets.systemWindowInsetTop + array.getDimensionPixelSize(0, 0)
+ view.updatePaddingRelative(
+ top = headerHeight,
+ bottom = if (padBottom) insets.systemWindowInsetBottom else 0
+ )
+ swipeRefreshLayout?.setProgressViewOffset(false, headerHeight + (-60).dpToPx,
+ headerHeight + 10.dpToPx)
+ statusBarHeight = insets.systemWindowInsetTop
+ array.recycle()
+ f?.invoke(insets)
+ }
+ recycler.addOnScrollListener(object : RecyclerView.OnScrollListener() {
+ override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
+ super.onScrolled(recyclerView, dx, dy)
+ if (router.backstack.lastOrNull()?.controller() == this@scrollViewWith &&
+ statusBarHeight > -1 &&
+ activity!!.appbar.height > 0) {
+ activity!!.appbar.y -= dy
+ activity!!.appbar.y = clamp(
+ activity!!.appbar.y,
+ -activity!!.appbar.height.toFloat(),// + statusBarHeight,
+ 0f
+ )
+ }
+ }
+
+ override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
+ super.onScrollStateChanged(recyclerView, newState)
+ if (newState == RecyclerView.SCROLL_STATE_IDLE) {
+ if (router.backstack.lastOrNull()?.controller() == this@scrollViewWith &&
+ statusBarHeight > -1 &&
+ activity!!.appbar.height > 0) {
+ val halfWay = abs((-activity!!.appbar.height.toFloat()) / 2)
+ val shortAnimationDuration = resources?.getInteger(
+ android.R.integer.config_shortAnimTime
+ ) ?: 0
+ val closerToTop = abs(activity!!.appbar.y) - halfWay > 0
+ val atTop = (recycler.layoutManager as LinearLayoutManager)
+ .findFirstVisibleItemPosition() < 2
+ activity!!.appbar.animate()
+ .y(if (closerToTop && !atTop)
+ (-activity!!.appbar.height.toFloat())
+ else 0f)
+ .setDuration(shortAnimationDuration.toLong())
+ .start()
+ }
+ }
+ }
+ })
+}
+
inline fun View.updatePaddingRelative(
@Px start: Int = paddingStart,
@Px top: Int = paddingTop,
diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/ElevationAppBarLayout.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/ElevationAppBarLayout.kt
index 7ee63bdd04..c2b6ccbcbb 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/widget/ElevationAppBarLayout.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/widget/ElevationAppBarLayout.kt
@@ -19,15 +19,15 @@ class ElevationAppBarLayout @JvmOverloads constructor(
}
fun enableElevation() {
- if (stateListAnimator == null) {
+ /* if (stateListAnimator == null) {
stateListAnimator = origStateAnimator
elevation = origElevation
- }
+ }*/
}
fun disableElevation() {
- stateListAnimator = null
- elevation = 0f
+ // stateListAnimator = null
+ //elevation = 0f
//translationZ = 0.1f.dpToPx
}
diff --git a/app/src/main/res/font/roboto_medium.xml b/app/src/main/res/font/roboto_medium.xml
new file mode 100644
index 0000000000..59df90bc82
--- /dev/null
+++ b/app/src/main/res/font/roboto_medium.xml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/app/src/main/res/layout/catalogue_controller.xml b/app/src/main/res/layout/catalogue_controller.xml
index 0c10dd754c..e2a0cdb348 100644
--- a/app/src/main/res/layout/catalogue_controller.xml
+++ b/app/src/main/res/layout/catalogue_controller.xml
@@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:id="@+id/catalouge_layout"
- android:fitsSystemWindows="true"
android:layout_height="match_parent">
diff --git a/app/src/main/res/layout/catalogue_main_controller.xml b/app/src/main/res/layout/catalogue_main_controller.xml
index 605956309f..fbdbe9b2d1 100644
--- a/app/src/main/res/layout/catalogue_main_controller.xml
+++ b/app/src/main/res/layout/catalogue_main_controller.xml
@@ -3,7 +3,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
- android:fitsSystemWindows="true"
android:layout_height="wrap_content">
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="1.0">
@@ -21,16 +23,32 @@
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:background="?android:attr/colorBackground"
+ android:stateListAnimator="@null"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
-
+ android:background="?android:attr/colorBackground">
+
+
+
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/spinner_title.xml b/app/src/main/res/layout/spinner_title.xml
index 4a33b2dcc4..ea260c9090 100644
--- a/app/src/main/res/layout/spinner_title.xml
+++ b/app/src/main/res/layout/spinner_title.xml
@@ -1,33 +1,33 @@
-
-
+ android:orientation="horizontal"
+ tools:background="?colorPrimary">
+
+
+ android:layout_gravity="center"
+ android:layout_marginStart="4dp"
+ android:background="@drawable/round_ripple"
+ android:src="@drawable/ic_arrow_drop_down_white_24dp"
+ android:tint="?actionBarTintColor" />
\ No newline at end of file
diff --git a/app/src/main/res/menu/bottom_navigation.xml b/app/src/main/res/menu/bottom_navigation.xml
index a9a651aa9f..c2c86e9691 100644
--- a/app/src/main/res/menu/bottom_navigation.xml
+++ b/app/src/main/res/menu/bottom_navigation.xml
@@ -15,10 +15,5 @@
android:id="@+id/nav_catalogues"
android:icon="@drawable/ic_explore_black_24dp"
android:title="@string/short_catalogues" />
-
diff --git a/app/src/main/res/menu/catalogue_main.xml b/app/src/main/res/menu/catalogue_main.xml
index 3693b29ce9..5a8f9c28e4 100644
--- a/app/src/main/res/menu/catalogue_main.xml
+++ b/app/src/main/res/menu/catalogue_main.xml
@@ -6,11 +6,19 @@
android:id="@+id/action_search"
android:title="@string/action_search"
android:icon="@drawable/ic_search_white_24dp"
+ android:visible="false"
app:showAsAction="collapseActionView|ifRoom"
app:actionViewClass="androidx.appcompat.widget.SearchView"/>
-
+
+
+ android:title="@string/label_settings"
+ app:showAsAction="never"
+ />
diff --git a/app/src/main/res/menu/library.xml b/app/src/main/res/menu/library.xml
index e7bfda788c..2a1e04c5ab 100644
--- a/app/src/main/res/menu/library.xml
+++ b/app/src/main/res/menu/library.xml
@@ -8,12 +8,14 @@
android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp"
android:title="@string/action_search"
+ android:visible="false"
app:actionViewClass="androidx.appcompat.widget.SearchView"
- app:showAsAction="collapseActionView|ifRoom"/>
+ app:showAsAction="collapseActionView|ifRoom" />
@@ -21,7 +23,14 @@
android:id="@+id/action_library_display"
android:icon="@drawable/ic_tune_white_24dp"
android:title="@string/action_view_options"
- app:showAsAction="ifRoom"
+ app:showAsAction="never"
+ />
+
+
diff --git a/app/src/main/res/menu/recent_updates.xml b/app/src/main/res/menu/recent_updates.xml
index bb279607de..d6be66985c 100644
--- a/app/src/main/res/menu/recent_updates.xml
+++ b/app/src/main/res/menu/recent_updates.xml
@@ -6,5 +6,12 @@
android:id="@+id/action_recents"
android:icon="@drawable/ic_history_black_24dp"
android:title="@string/label_recent_manga"
- app:showAsAction="ifRoom" />
+ app:showAsAction="never" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/recently_read.xml b/app/src/main/res/menu/recently_read.xml
index 5e1cd0950e..d5fa9e26ff 100644
--- a/app/src/main/res/menu/recently_read.xml
+++ b/app/src/main/res/menu/recently_read.xml
@@ -4,6 +4,7 @@
android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp"
android:title="@string/action_search"
+ android:visible="false"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="ifRoom|collapseActionView" />
@@ -11,6 +12,12 @@
android:id="@+id/action_recents"
android:icon="@drawable/ic_update_black_24dp"
android:title="@string/label_recent_updates"
- app:showAsAction="ifRoom" />
+ app:showAsAction="never" />
+
\ No newline at end of file
diff --git a/app/src/main/res/values/font_certs.xml b/app/src/main/res/values/font_certs.xml
new file mode 100644
index 0000000000..d2226ac01c
--- /dev/null
+++ b/app/src/main/res/values/font_certs.xml
@@ -0,0 +1,17 @@
+
+
+
+ - @array/com_google_android_gms_fonts_certs_dev
+ - @array/com_google_android_gms_fonts_certs_prod
+
+
+ -
+ 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
+
+
+
diff --git a/app/src/main/res/values/preloaded_fonts.xml b/app/src/main/res/values/preloaded_fonts.xml
new file mode 100644
index 0000000000..3ad41da55e
--- /dev/null
+++ b/app/src/main/res/values/preloaded_fonts.xml
@@ -0,0 +1,6 @@
+
+
+
+ - @font/roboto_medium
+
+