mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 08:21:49 +01:00
Migrate to bottom navigation
This commit is contained in:
parent
8776a45ee9
commit
11544fe8ef
@ -33,7 +33,6 @@ import eu.kanade.tachiyomi.ui.base.controller.TabbedController
|
|||||||
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
||||||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||||
import eu.kanade.tachiyomi.ui.manga.MangaController
|
import eu.kanade.tachiyomi.ui.manga.MangaController
|
||||||
import eu.kanade.tachiyomi.ui.migration.MigrationController
|
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
import eu.kanade.tachiyomi.util.view.inflate
|
import eu.kanade.tachiyomi.util.view.inflate
|
||||||
import kotlinx.android.synthetic.main.library_controller.empty_view
|
import kotlinx.android.synthetic.main.library_controller.empty_view
|
||||||
@ -396,10 +395,6 @@ class LibraryController(
|
|||||||
preferences.downloadBadge().set(item.isChecked)
|
preferences.downloadBadge().set(item.isChecked)
|
||||||
onDownloadBadgeChanged()
|
onDownloadBadgeChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.action_source_migration -> {
|
|
||||||
router.pushController(MigrationController().withFadeTransaction())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
package eu.kanade.tachiyomi.ui.main
|
package eu.kanade.tachiyomi.ui.main
|
||||||
|
|
||||||
import android.animation.ObjectAnimator
|
|
||||||
import android.app.SearchManager
|
import android.app.SearchManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Color
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.appcompat.graphics.drawable.DrawerArrowDrawable
|
|
||||||
import androidx.core.view.GravityCompat
|
import androidx.core.view.GravityCompat
|
||||||
import androidx.drawerlayout.widget.DrawerLayout
|
|
||||||
import com.bluelinelabs.conductor.*
|
import com.bluelinelabs.conductor.*
|
||||||
import eu.kanade.tachiyomi.Migrations
|
import eu.kanade.tachiyomi.Migrations
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
@ -18,12 +14,11 @@ import eu.kanade.tachiyomi.ui.base.controller.*
|
|||||||
import eu.kanade.tachiyomi.ui.catalogue.CatalogueController
|
import eu.kanade.tachiyomi.ui.catalogue.CatalogueController
|
||||||
import eu.kanade.tachiyomi.ui.catalogue.global_search.CatalogueSearchController
|
import eu.kanade.tachiyomi.ui.catalogue.global_search.CatalogueSearchController
|
||||||
import eu.kanade.tachiyomi.ui.download.DownloadController
|
import eu.kanade.tachiyomi.ui.download.DownloadController
|
||||||
import eu.kanade.tachiyomi.ui.extension.ExtensionController
|
|
||||||
import eu.kanade.tachiyomi.ui.library.LibraryController
|
import eu.kanade.tachiyomi.ui.library.LibraryController
|
||||||
import eu.kanade.tachiyomi.ui.manga.MangaController
|
import eu.kanade.tachiyomi.ui.manga.MangaController
|
||||||
|
import eu.kanade.tachiyomi.ui.more.MoreController
|
||||||
import eu.kanade.tachiyomi.ui.recent_updates.RecentChaptersController
|
import eu.kanade.tachiyomi.ui.recent_updates.RecentChaptersController
|
||||||
import eu.kanade.tachiyomi.ui.recently_read.RecentlyReadController
|
import eu.kanade.tachiyomi.ui.recently_read.RecentlyReadController
|
||||||
import eu.kanade.tachiyomi.ui.setting.SettingsMainController
|
|
||||||
import kotlinx.android.synthetic.main.main_activity.*
|
import kotlinx.android.synthetic.main.main_activity.*
|
||||||
|
|
||||||
|
|
||||||
@ -31,15 +26,13 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
private lateinit var router: Router
|
private lateinit var router: Router
|
||||||
|
|
||||||
private var drawerArrow: DrawerArrowDrawable? = null
|
|
||||||
|
|
||||||
private var secondaryDrawer: ViewGroup? = null
|
private var secondaryDrawer: ViewGroup? = null
|
||||||
|
|
||||||
private val startScreenId by lazy {
|
private val startScreenId by lazy {
|
||||||
when (preferences.startScreen()) {
|
when (preferences.startScreen()) {
|
||||||
2 -> R.id.nav_drawer_recently_read
|
2 -> R.id.nav_history
|
||||||
3 -> R.id.nav_drawer_recent_updates
|
3 -> R.id.nav_updates
|
||||||
else -> R.id.nav_drawer_library
|
else -> R.id.nav_library
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,33 +51,25 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
setSupportActionBar(toolbar)
|
setSupportActionBar(toolbar)
|
||||||
|
|
||||||
drawerArrow = DrawerArrowDrawable(this)
|
|
||||||
drawerArrow?.color = Color.WHITE
|
|
||||||
toolbar.navigationIcon = drawerArrow
|
|
||||||
|
|
||||||
tabAnimator = TabsAnimator(tabs)
|
tabAnimator = TabsAnimator(tabs)
|
||||||
|
|
||||||
// Set behavior of Navigation drawer
|
// Set behavior of bottom nav
|
||||||
nav_view.setNavigationItemSelectedListener { item ->
|
bottom_nav.setOnNavigationItemSelectedListener { item ->
|
||||||
val id = item.itemId
|
val id = item.itemId
|
||||||
|
|
||||||
val currentRoot = router.backstack.firstOrNull()
|
val currentRoot = router.backstack.firstOrNull()
|
||||||
if (currentRoot?.tag()?.toIntOrNull() != id) {
|
if (currentRoot?.tag()?.toIntOrNull() != id) {
|
||||||
when (id) {
|
when (id) {
|
||||||
R.id.nav_drawer_library -> setRoot(LibraryController(), id)
|
R.id.nav_library -> setRoot(LibraryController(), id)
|
||||||
R.id.nav_drawer_recent_updates -> setRoot(RecentChaptersController(), id)
|
R.id.nav_updates -> setRoot(RecentChaptersController(), id)
|
||||||
R.id.nav_drawer_recently_read -> setRoot(RecentlyReadController(), id)
|
R.id.nav_history -> setRoot(RecentlyReadController(), id)
|
||||||
R.id.nav_drawer_catalogues -> setRoot(CatalogueController(), id)
|
R.id.nav_catalogues -> setRoot(CatalogueController(), id)
|
||||||
R.id.nav_drawer_extensions -> setRoot(ExtensionController(), id)
|
R.id.nav_more -> setRoot(MoreController(), id)
|
||||||
R.id.nav_drawer_downloads -> {
|
|
||||||
router.pushController(DownloadController().withFadeTransaction())
|
|
||||||
}
|
|
||||||
R.id.nav_drawer_settings -> {
|
|
||||||
router.pushController(SettingsMainController().withFadeTransaction())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
router.popToRoot()
|
||||||
}
|
}
|
||||||
drawer.closeDrawer(GravityCompat.START)
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,18 +128,18 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
when (intent.action) {
|
when (intent.action) {
|
||||||
SHORTCUT_LIBRARY -> setSelectedDrawerItem(R.id.nav_drawer_library)
|
SHORTCUT_LIBRARY -> setSelectedDrawerItem(R.id.nav_library)
|
||||||
SHORTCUT_RECENTLY_UPDATED -> setSelectedDrawerItem(R.id.nav_drawer_recent_updates)
|
SHORTCUT_RECENTLY_UPDATED -> setSelectedDrawerItem(R.id.nav_updates)
|
||||||
SHORTCUT_RECENTLY_READ -> setSelectedDrawerItem(R.id.nav_drawer_recently_read)
|
SHORTCUT_RECENTLY_READ -> setSelectedDrawerItem(R.id.nav_history)
|
||||||
SHORTCUT_CATALOGUES -> setSelectedDrawerItem(R.id.nav_drawer_catalogues)
|
SHORTCUT_CATALOGUES -> setSelectedDrawerItem(R.id.nav_catalogues)
|
||||||
SHORTCUT_MANGA -> {
|
SHORTCUT_MANGA -> {
|
||||||
val extras = intent.extras ?: return false
|
val extras = intent.extras ?: return false
|
||||||
router.setRoot(RouterTransaction.with(MangaController(extras)))
|
setSelectedDrawerItem(R.id.nav_library)
|
||||||
|
router.pushController(RouterTransaction.with(MangaController(extras)))
|
||||||
}
|
}
|
||||||
SHORTCUT_DOWNLOADS -> {
|
SHORTCUT_DOWNLOADS -> {
|
||||||
if (router.backstack.none { it.controller() is DownloadController }) {
|
setSelectedDrawerItem(R.id.nav_more)
|
||||||
setSelectedDrawerItem(R.id.nav_drawer_downloads)
|
router.pushController(RouterTransaction.with(DownloadController()))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Intent.ACTION_SEARCH, "com.google.android.gms.actions.SEARCH_ACTION" -> {
|
Intent.ACTION_SEARCH, "com.google.android.gms.actions.SEARCH_ACTION" -> {
|
||||||
//If the intent match the "standard" Android search intent
|
//If the intent match the "standard" Android search intent
|
||||||
@ -186,7 +171,7 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
nav_view?.setNavigationItemSelectedListener(null)
|
bottom_nav?.setOnNavigationItemSelectedListener(null)
|
||||||
toolbar?.setNavigationOnClickListener(null)
|
toolbar?.setNavigationOnClickListener(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,8 +188,7 @@ class MainActivity : BaseActivity() {
|
|||||||
|
|
||||||
private fun setSelectedDrawerItem(itemId: Int) {
|
private fun setSelectedDrawerItem(itemId: Int) {
|
||||||
if (!isFinishing) {
|
if (!isFinishing) {
|
||||||
nav_view.setCheckedItem(itemId)
|
bottom_nav.selectedItemId = itemId
|
||||||
nav_view.menu.performIdentifierAction(itemId, 0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,14 +201,7 @@ class MainActivity : BaseActivity() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val showHamburger = router.backstackSize == 1
|
supportActionBar?.setDisplayHomeAsUpEnabled(router.backstackSize != 1)
|
||||||
if (showHamburger) {
|
|
||||||
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED)
|
|
||||||
} else {
|
|
||||||
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectAnimator.ofFloat(drawerArrow, "progress", if (showHamburger) 0f else 1f).start()
|
|
||||||
|
|
||||||
if (from is TabbedController) {
|
if (from is TabbedController) {
|
||||||
from.cleanupTabs(tabs)
|
from.cleanupTabs(tabs)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package eu.kanade.tachiyomi.ui.setting
|
package eu.kanade.tachiyomi.ui.more
|
||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
@ -16,6 +16,7 @@ import eu.kanade.tachiyomi.data.updater.UpdaterJob
|
|||||||
import eu.kanade.tachiyomi.data.updater.UpdaterService
|
import eu.kanade.tachiyomi.data.updater.UpdaterService
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
||||||
import eu.kanade.tachiyomi.ui.main.ChangelogDialogController
|
import eu.kanade.tachiyomi.ui.main.ChangelogDialogController
|
||||||
|
import eu.kanade.tachiyomi.ui.setting.SettingsController
|
||||||
import eu.kanade.tachiyomi.util.lang.launchNow
|
import eu.kanade.tachiyomi.util.lang.launchNow
|
||||||
import eu.kanade.tachiyomi.util.lang.toTimestampString
|
import eu.kanade.tachiyomi.util.lang.toTimestampString
|
||||||
import eu.kanade.tachiyomi.util.preference.*
|
import eu.kanade.tachiyomi.util.preference.*
|
||||||
@ -29,7 +30,7 @@ import java.util.Locale
|
|||||||
import java.util.TimeZone
|
import java.util.TimeZone
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||||
|
|
||||||
class SettingsAboutController : SettingsController() {
|
class AboutController : SettingsController() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks for new releases
|
* Checks for new releases
|
@ -0,0 +1,81 @@
|
|||||||
|
package eu.kanade.tachiyomi.ui.more
|
||||||
|
|
||||||
|
import androidx.preference.PreferenceScreen
|
||||||
|
import eu.kanade.tachiyomi.R
|
||||||
|
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
||||||
|
import eu.kanade.tachiyomi.ui.download.DownloadController
|
||||||
|
import eu.kanade.tachiyomi.ui.extension.ExtensionController
|
||||||
|
import eu.kanade.tachiyomi.ui.migration.MigrationController
|
||||||
|
import eu.kanade.tachiyomi.ui.setting.SettingsController
|
||||||
|
import eu.kanade.tachiyomi.ui.setting.SettingsMainController
|
||||||
|
import eu.kanade.tachiyomi.util.preference.*
|
||||||
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
|
import eu.kanade.tachiyomi.util.system.openInBrowser
|
||||||
|
|
||||||
|
class MoreController : SettingsController() {
|
||||||
|
|
||||||
|
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||||
|
titleRes = R.string.label_more
|
||||||
|
|
||||||
|
val tintColor = context.getResourceColor(R.attr.colorAccent)
|
||||||
|
|
||||||
|
preferenceCategory {
|
||||||
|
preference {
|
||||||
|
titleRes = R.string.label_extensions
|
||||||
|
iconRes = R.drawable.ic_extension_black_24dp
|
||||||
|
iconTint = tintColor
|
||||||
|
onClick {
|
||||||
|
router.pushController(ExtensionController().withFadeTransaction())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
preference {
|
||||||
|
titleRes = R.string.label_download_queue
|
||||||
|
iconRes = R.drawable.ic_file_download_black_24dp
|
||||||
|
iconTint = tintColor
|
||||||
|
onClick {
|
||||||
|
router.pushController(DownloadController().withFadeTransaction())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
preference {
|
||||||
|
titleRes = R.string.label_migration
|
||||||
|
iconRes = R.drawable.ic_compare_arrows_black_24dp
|
||||||
|
iconTint = tintColor
|
||||||
|
onClick {
|
||||||
|
router.pushController(MigrationController().withFadeTransaction())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
preferenceCategory {
|
||||||
|
preference {
|
||||||
|
titleRes = R.string.label_settings
|
||||||
|
iconRes = R.drawable.ic_settings_black_24dp
|
||||||
|
iconTint = tintColor
|
||||||
|
onClick {
|
||||||
|
router.pushController(SettingsMainController().withFadeTransaction())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
preference {
|
||||||
|
iconRes = R.drawable.ic_info_black_24dp
|
||||||
|
iconTint = tintColor
|
||||||
|
titleRes = R.string.pref_category_about
|
||||||
|
onClick {
|
||||||
|
router.pushController(AboutController().withFadeTransaction())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
preference {
|
||||||
|
titleRes = R.string.label_help
|
||||||
|
iconRes = R.drawable.ic_help_black_24dp
|
||||||
|
iconTint = tintColor
|
||||||
|
onClick {
|
||||||
|
activity?.openInBrowser(URL_HELP)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val URL_HELP = "https://tachiyomi.org/help/"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,33 +1,13 @@
|
|||||||
package eu.kanade.tachiyomi.ui.setting
|
package eu.kanade.tachiyomi.ui.setting
|
||||||
|
|
||||||
import android.view.Menu
|
|
||||||
import android.view.MenuInflater
|
|
||||||
import android.view.MenuItem
|
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
||||||
import eu.kanade.tachiyomi.util.preference.*
|
import eu.kanade.tachiyomi.util.preference.*
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import eu.kanade.tachiyomi.util.system.openInBrowser
|
|
||||||
|
|
||||||
class SettingsMainController : SettingsController() {
|
class SettingsMainController : SettingsController() {
|
||||||
|
|
||||||
init {
|
|
||||||
setHasOptionsMenu(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
|
||||||
inflater.inflate(R.menu.settings, menu)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
||||||
when (item.itemId) {
|
|
||||||
R.id.action_help -> activity?.openInBrowser(URL_HELP)
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||||
titleRes = R.string.label_settings
|
titleRes = R.string.label_settings
|
||||||
|
|
||||||
@ -75,19 +55,9 @@ class SettingsMainController : SettingsController() {
|
|||||||
titleRes = R.string.pref_category_advanced
|
titleRes = R.string.pref_category_advanced
|
||||||
onClick { navigateTo(SettingsAdvancedController()) }
|
onClick { navigateTo(SettingsAdvancedController()) }
|
||||||
}
|
}
|
||||||
preference {
|
|
||||||
iconRes = R.drawable.ic_info_black_24dp
|
|
||||||
iconTint = tintColor
|
|
||||||
titleRes = R.string.pref_category_about
|
|
||||||
onClick { navigateTo(SettingsAboutController()) }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun navigateTo(controller: SettingsController) {
|
private fun navigateTo(controller: SettingsController) {
|
||||||
router.pushController(controller.withFadeTransaction())
|
router.pushController(controller.withFadeTransaction())
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val URL_HELP = "https://tachiyomi.org/help/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
8
app/src/main/res/drawable/bottom_nav_item_selector.xml
Normal file
8
app/src/main/res/drawable/bottom_nav_item_selector.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="?attr/tabBarIconColor" android:state_checked="true" />
|
||||||
|
<item android:color="?attr/tabBarIconColor" android:state_enabled="true" android:state_pressed="true" />
|
||||||
|
<item android:color="?attr/tabBarIconColor" android:state_focused="true" />
|
||||||
|
<item android:color="?attr/tabBarIconInactive" android:state_focused="false" />
|
||||||
|
<item android:color="?attr/tabBarIconColor" />
|
||||||
|
</selector>
|
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M9.01,14L2,14v2h7.01v3L13,15l-3.99,-4v3zM14.99,13v-3L22,10L22,8h-7.01L14.99,5L11,9l3.99,4z" />
|
||||||
|
</vector>
|
@ -4,6 +4,6 @@
|
|||||||
android:viewportWidth="24.0"
|
android:viewportWidth="24.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFFFF"
|
android:fillColor="#FF000000"
|
||||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z" />
|
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z" />
|
||||||
</vector>
|
</vector>
|
@ -7,7 +7,6 @@
|
|||||||
android:fitsSystemWindows="true">
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/main_content"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@ -40,18 +39,19 @@
|
|||||||
<com.bluelinelabs.conductor.ChangeHandlerFrameLayout
|
<com.bluelinelabs.conductor.ChangeHandlerFrameLayout
|
||||||
android:id="@+id/controller_container"
|
android:id="@+id/controller_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
android:id="@+id/bottom_nav"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
app:itemIconTint="@drawable/bottom_nav_item_selector"
|
||||||
|
app:itemTextColor="@drawable/bottom_nav_item_selector"
|
||||||
|
app:menu="@menu/bottom_nav" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.navigation.NavigationView
|
|
||||||
android:id="@+id/nav_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
android:theme="?attr/navigation_view_theme"
|
|
||||||
app:headerLayout="@layout/navigation_header"
|
|
||||||
app:menu="@menu/menu_navigation" />
|
|
||||||
|
|
||||||
</androidx.drawerlayout.widget.DrawerLayout>
|
</androidx.drawerlayout.widget.DrawerLayout>
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/navigation_drawer_header_height"
|
|
||||||
android:gravity="bottom"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/colorPrimary" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="64dp"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_marginTop="@dimen/navigation_drawer_header_margin"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/splash_icon" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
23
app/src/main/res/menu/bottom_nav.xml
Normal file
23
app/src/main/res/menu/bottom_nav.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_library"
|
||||||
|
android:icon="@drawable/ic_book_black_24dp"
|
||||||
|
android:title="@string/label_library" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_updates"
|
||||||
|
android:icon="@drawable/ic_new_releases_black_24dp"
|
||||||
|
android:title="@string/label_recent_updates" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_history"
|
||||||
|
android:icon="@drawable/ic_history_black_24dp"
|
||||||
|
android:title="@string/label_recent_manga" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_catalogues"
|
||||||
|
android:icon="@drawable/ic_explore_black_24dp"
|
||||||
|
android:title="@string/label_catalogues" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_more"
|
||||||
|
android:icon="@drawable/ic_more_horiz_black_24dp"
|
||||||
|
android:title="@string/label_more" />
|
||||||
|
</menu>
|
@ -42,9 +42,4 @@
|
|||||||
</menu>
|
</menu>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_source_migration"
|
|
||||||
android:title="@string/label_migration"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<group
|
|
||||||
android:id="@+id/group_feature"
|
|
||||||
android:checkableBehavior="single">
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_library"
|
|
||||||
android:checked="true"
|
|
||||||
android:icon="@drawable/ic_book_black_24dp"
|
|
||||||
android:title="@string/label_library" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_recent_updates"
|
|
||||||
android:icon="@drawable/ic_new_releases_black_24dp"
|
|
||||||
android:title="@string/label_recent_updates" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_recently_read"
|
|
||||||
android:icon="@drawable/ic_history_black_24dp"
|
|
||||||
android:title="@string/label_recent_manga" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_catalogues"
|
|
||||||
android:icon="@drawable/ic_explore_black_24dp"
|
|
||||||
android:title="@string/label_catalogues" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_extensions"
|
|
||||||
android:icon="@drawable/ic_extension_black_24dp"
|
|
||||||
android:title="@string/label_extensions" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_downloads"
|
|
||||||
android:checkable="false"
|
|
||||||
android:icon="@drawable/ic_file_download_black_24dp"
|
|
||||||
android:title="@string/label_download_queue" />
|
|
||||||
</group>
|
|
||||||
<group
|
|
||||||
android:id="@+id/group_settings"
|
|
||||||
android:checkableBehavior="single">
|
|
||||||
<item
|
|
||||||
android:id="@+id/nav_drawer_settings"
|
|
||||||
android:checkable="false"
|
|
||||||
android:icon="@drawable/ic_settings_black_24dp"
|
|
||||||
android:title="@string/label_settings" />
|
|
||||||
</group>
|
|
||||||
</menu>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_help"
|
|
||||||
android:icon="@drawable/ic_help_white_24dp"
|
|
||||||
android:title="@string/label_help"
|
|
||||||
app:showAsAction="ifRoom" />
|
|
||||||
|
|
||||||
</menu>
|
|
@ -20,12 +20,13 @@
|
|||||||
<attr name="max_seek" format="integer"/>
|
<attr name="max_seek" format="integer"/>
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
<attr name="navigation_view_theme" format="reference"/>
|
|
||||||
<attr name="selectable_list_drawable" format="reference|integer" />
|
<attr name="selectable_list_drawable" format="reference|integer" />
|
||||||
<attr name="selectable_library_drawable" format="reference|integer"/>
|
<attr name="selectable_library_drawable" format="reference|integer"/>
|
||||||
<attr name="text_color_primary" format="reference|integer"/>
|
<attr name="text_color_primary" format="reference|integer"/>
|
||||||
<attr name="background_card" format="reference|integer"/>
|
<attr name="background_card" format="reference|integer"/>
|
||||||
<attr name="colorBackgroundSplash" format="reference|integer"/>
|
<attr name="colorBackgroundSplash" format="reference|integer"/>
|
||||||
<attr name="icon_color" format="reference|integer"/>
|
<attr name="icon_color" format="reference|integer"/>
|
||||||
|
<attr name="tabBarIconColor" format="reference|integer"/>
|
||||||
|
<attr name="tabBarIconInactive" format="reference|integer"/>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
<string name="history">History</string>
|
<string name="history">History</string>
|
||||||
|
|
||||||
<!-- Activities and fragments labels (toolbar title) -->
|
<!-- Activities and fragments labels (toolbar title) -->
|
||||||
|
<string name="label_more">More</string>
|
||||||
<string name="label_settings">Settings</string>
|
<string name="label_settings">Settings</string>
|
||||||
<string name="label_download_queue">Download queue</string>
|
<string name="label_download_queue">Download queue</string>
|
||||||
<string name="label_library">Library</string>
|
<string name="label_library">Library</string>
|
||||||
|
@ -36,15 +36,6 @@
|
|||||||
<item name="android:background">@color/colorAmoledPrimary</item>
|
<item name="android:background">@color/colorAmoledPrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!--==============-->
|
|
||||||
<!--NavigationView-->
|
|
||||||
<!--==============-->
|
|
||||||
<style name="Theme.Widget.NavigationView" />
|
|
||||||
|
|
||||||
<style name="Theme.Widget.NavigationView.Dark">
|
|
||||||
<item name="colorControlHighlight">@color/md_grey_900</item>
|
|
||||||
<item name="colorPrimary">?colorAccent</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!--===============-->
|
<!--===============-->
|
||||||
<!--Text Appearance-->
|
<!--Text Appearance-->
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
<item name="text_color_primary">@color/textColorPrimaryLight</item>
|
<item name="text_color_primary">@color/textColorPrimaryLight</item>
|
||||||
<item name="background_card">@color/dialogLight</item>
|
<item name="background_card">@color/dialogLight</item>
|
||||||
<item name="icon_color">@color/iconColorLight</item>
|
<item name="icon_color">@color/iconColorLight</item>
|
||||||
|
<item name="tabBarIconColor">@android:color/white</item>
|
||||||
|
<item name="tabBarIconInactive">@color/textColorHintDark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!--===========-->
|
<!--===========-->
|
||||||
@ -81,14 +83,14 @@
|
|||||||
<item name="md_background_color">@color/dialogDark</item>
|
<item name="md_background_color">@color/dialogDark</item>
|
||||||
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
|
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
|
||||||
|
|
||||||
|
|
||||||
<!-- Custom Attributes-->
|
<!-- Custom Attributes-->
|
||||||
<item name="navigation_view_theme">@style/Theme.Widget.NavigationView.Dark</item>
|
|
||||||
<item name="selectable_list_drawable">@drawable/list_item_selector_dark</item>
|
<item name="selectable_list_drawable">@drawable/list_item_selector_dark</item>
|
||||||
<item name="selectable_library_drawable">@drawable/library_item_selector_dark</item>
|
<item name="selectable_library_drawable">@drawable/library_item_selector_dark</item>
|
||||||
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
<item name="text_color_primary">@color/textColorPrimaryDark</item>
|
||||||
<item name="background_card">@color/dialogDark</item>
|
<item name="background_card">@color/dialogDark</item>
|
||||||
<item name="icon_color">@color/iconColorDark</item>
|
<item name="icon_color">@color/iconColorDark</item>
|
||||||
|
<item name="tabBarIconColor">@android:color/white</item>
|
||||||
|
<item name="tabBarIconInactive">@color/textColorHintDark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Tachiyomi.Dark" parent="Theme.Base.Dark">
|
<style name="Theme.Tachiyomi.Dark" parent="Theme.Base.Dark">
|
||||||
|
Loading…
Reference in New Issue
Block a user