minor tweaks (#115)
* Added telegram link * Removed UPI (rebel not indian) * minor changes * Shows number of manga/Ln downloaded * fixed list name overlapping with notch * wrong index selection in language fixed * novel icon * Emerald theme name changed to Ocean * forgot to remove * why was these still there
This commit is contained in:
parent
af992bd19c
commit
01f9e86475
25 changed files with 149 additions and 190 deletions
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Dantotsu ß</string>
|
<string name="app_name">Dantotsu β</string>
|
||||||
</resources>
|
</resources>
|
|
@ -236,6 +236,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
.setData(Uri.parse("package:$packageName"))
|
.setData(Uri.parse("package:$packageName"))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
dismiss()
|
||||||
}
|
}
|
||||||
}.show(supportFragmentManager, "dialog")
|
}.show(supportFragmentManager, "dialog")
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ class OfflineMangaAdapter(
|
||||||
val itemScoreBG = view.findViewById<View>(R.id.itemCompactScoreBG)
|
val itemScoreBG = view.findViewById<View>(R.id.itemCompactScoreBG)
|
||||||
val ongoing = view.findViewById<CardView>(R.id.itemCompactOngoing)
|
val ongoing = view.findViewById<CardView>(R.id.itemCompactOngoing)
|
||||||
val totalchapter = view.findViewById<TextView>(R.id.itemCompactTotal)
|
val totalchapter = view.findViewById<TextView>(R.id.itemCompactTotal)
|
||||||
|
val typeimage = view.findViewById<ImageView>(R.id.itemCompactTypeImage)
|
||||||
val type = view.findViewById<TextView>(R.id.itemCompactRelation)
|
val type = view.findViewById<TextView>(R.id.itemCompactRelation)
|
||||||
val typeView = view.findViewById<LinearLayout>(R.id.itemCompactType)
|
val typeView = view.findViewById<LinearLayout>(R.id.itemCompactType)
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ class OfflineMangaAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bind item data to the views
|
// Bind item data to the views
|
||||||
|
typeimage.setImageResource(if (item.type == "Novel" ) R.drawable.ic_round_book_24 else R.drawable.ic_round_import_contacts_24)
|
||||||
type.text = item.type
|
type.text = item.type
|
||||||
typeView.visibility = View.VISIBLE
|
typeView.visibility = View.VISIBLE
|
||||||
imageView.setImageURI(item.image)
|
imageView.setImageURI(item.image)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ani.dantotsu.download.manga
|
package ani.dantotsu.download.manga
|
||||||
|
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
@ -20,6 +21,7 @@ import android.widget.AbsListView
|
||||||
import android.widget.AutoCompleteTextView
|
import android.widget.AutoCompleteTextView
|
||||||
import android.widget.GridView
|
import android.widget.GridView
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.TextView
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.cardview.widget.CardView
|
import androidx.cardview.widget.CardView
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
|
@ -57,6 +59,7 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
|
||||||
private lateinit var gridView: GridView
|
private lateinit var gridView: GridView
|
||||||
private lateinit var adapter: OfflineMangaAdapter
|
private lateinit var adapter: OfflineMangaAdapter
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
@ -177,7 +180,8 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
|
||||||
snackString("no media found")
|
snackString("no media found")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
val total = view.findViewById<TextView>(R.id.total)
|
||||||
|
total.text = if (gridView.count > 0) "Manga and Novels (${gridView.count})" else "Empty List"
|
||||||
gridView.setOnItemLongClickListener { parent, view, position, id ->
|
gridView.setOnItemLongClickListener { parent, view, position, id ->
|
||||||
// Get the OfflineMangaModel that was clicked
|
// Get the OfflineMangaModel that was clicked
|
||||||
val item = adapter.getItem(position) as OfflineMangaModel
|
val item = adapter.getItem(position) as OfflineMangaModel
|
||||||
|
@ -194,6 +198,7 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
|
||||||
downloadManager.removeMedia(item.title, type)
|
downloadManager.removeMedia(item.title, type)
|
||||||
getDownloads()
|
getDownloads()
|
||||||
adapter.setItems(downloads)
|
adapter.setItems(downloads)
|
||||||
|
|
||||||
}
|
}
|
||||||
builder.setNegativeButton("No") { _, _ ->
|
builder.setNegativeButton("No") { _, _ ->
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
@ -202,7 +207,6 @@ class OfflineMangaFragment : Fragment(), OfflineMangaSearchListener {
|
||||||
dialog.window?.setDimAmount(0.8f)
|
dialog.window?.setDimAmount(0.8f)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,5 +28,6 @@ class LoginFragment : Fragment() {
|
||||||
binding.loginButton.setOnClickListener { Anilist.loginIntent(requireActivity()) }
|
binding.loginButton.setOnClickListener { Anilist.loginIntent(requireActivity()) }
|
||||||
binding.loginDiscord.setOnClickListener { openLinkInBrowser(getString(R.string.discord)) }
|
binding.loginDiscord.setOnClickListener { openLinkInBrowser(getString(R.string.discord)) }
|
||||||
binding.loginGithub.setOnClickListener { openLinkInBrowser(getString(R.string.github)) }
|
binding.loginGithub.setOnClickListener { openLinkInBrowser(getString(R.string.github)) }
|
||||||
|
binding.loginTelegram.setOnClickListener { openLinkInBrowser(getString(R.string.telegram)) }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,11 +4,13 @@ import android.annotation.SuppressLint
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.view.updateLayoutParams
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import ani.dantotsu.R
|
import ani.dantotsu.R
|
||||||
|
@ -16,8 +18,10 @@ import ani.dantotsu.Refresh
|
||||||
import ani.dantotsu.databinding.ActivityListBinding
|
import ani.dantotsu.databinding.ActivityListBinding
|
||||||
import ani.dantotsu.loadData
|
import ani.dantotsu.loadData
|
||||||
import ani.dantotsu.media.user.ListViewPagerAdapter
|
import ani.dantotsu.media.user.ListViewPagerAdapter
|
||||||
|
import ani.dantotsu.navBarHeight
|
||||||
import ani.dantotsu.others.LangSet
|
import ani.dantotsu.others.LangSet
|
||||||
import ani.dantotsu.settings.UserInterfaceSettings
|
import ani.dantotsu.settings.UserInterfaceSettings
|
||||||
|
import ani.dantotsu.statusBarHeight
|
||||||
import ani.dantotsu.themes.ThemeManager
|
import ani.dantotsu.themes.ThemeManager
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
@ -76,6 +80,10 @@ class CalendarActivity : AppCompatActivity() {
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||||
)
|
)
|
||||||
|
binding.settingsContainer.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
|
topMargin = statusBarHeight
|
||||||
|
bottomMargin = navBarHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,6 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
}
|
}
|
||||||
|
|
||||||
adult = media.isAdult
|
adult = media.isAdult
|
||||||
|
|
||||||
tabLayout.menu.clear()
|
tabLayout.menu.clear()
|
||||||
if (media.anime != null) {
|
if (media.anime != null) {
|
||||||
viewPager.adapter =
|
viewPager.adapter =
|
||||||
|
@ -317,7 +316,12 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
lifecycle,
|
lifecycle,
|
||||||
if (media.format == "NOVEL") SupportedMedia.NOVEL else SupportedMedia.MANGA
|
if (media.format == "NOVEL") SupportedMedia.NOVEL else SupportedMedia.MANGA
|
||||||
)
|
)
|
||||||
tabLayout.inflateMenu(R.menu.manga_menu_detail)
|
if (media.format == "NOVEL") {
|
||||||
|
tabLayout.inflateMenu(R.menu.novel_menu_detail)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tabLayout.inflateMenu(R.menu.manga_menu_detail)
|
||||||
|
}
|
||||||
anime = false
|
anime = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +365,6 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
||||||
R.id.info -> {
|
R.id.info -> {
|
||||||
selected = 0
|
selected = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.watch, R.id.read -> {
|
R.id.watch, R.id.read -> {
|
||||||
selected = 1
|
selected = 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,7 +386,7 @@ class AnimeWatchAdapter(
|
||||||
ext.sourceLanguage = lang
|
ext.sourceLanguage = lang
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
binding?.animeSourceLanguage?.setText(parser.extension.sources[lang].lang)
|
binding?.animeSourceLanguage?.setText(parser.extension.sources.sortedBy { it.lang }[lang].lang)
|
||||||
} catch (e: IndexOutOfBoundsException) {
|
} catch (e: IndexOutOfBoundsException) {
|
||||||
binding?.animeSourceLanguage?.setText(
|
binding?.animeSourceLanguage?.setText(
|
||||||
parser.extension.sources.firstOrNull()?.lang ?: "Unknown"
|
parser.extension.sources.firstOrNull()?.lang ?: "Unknown"
|
||||||
|
|
|
@ -416,7 +416,7 @@ class MangaReadAdapter(
|
||||||
ext.sourceLanguage = lang
|
ext.sourceLanguage = lang
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
binding?.animeSourceLanguage?.setText(parser.extension.sources[lang].lang)
|
binding?.animeSourceLanguage?.setText(parser.extension.sources.sortedBy { it.lang }[lang].lang)
|
||||||
} catch (e: IndexOutOfBoundsException) {
|
} catch (e: IndexOutOfBoundsException) {
|
||||||
binding?.animeSourceLanguage?.setText(
|
binding?.animeSourceLanguage?.setText(
|
||||||
parser.extension.sources.firstOrNull()?.lang ?: "Unknown"
|
parser.extension.sources.firstOrNull()?.lang ?: "Unknown"
|
||||||
|
|
|
@ -5,12 +5,14 @@ import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.view.updateLayoutParams
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import ani.dantotsu.R
|
import ani.dantotsu.R
|
||||||
|
@ -18,9 +20,11 @@ import ani.dantotsu.Refresh
|
||||||
import ani.dantotsu.currContext
|
import ani.dantotsu.currContext
|
||||||
import ani.dantotsu.databinding.ActivityListBinding
|
import ani.dantotsu.databinding.ActivityListBinding
|
||||||
import ani.dantotsu.loadData
|
import ani.dantotsu.loadData
|
||||||
|
import ani.dantotsu.navBarHeight
|
||||||
import ani.dantotsu.others.LangSet
|
import ani.dantotsu.others.LangSet
|
||||||
import ani.dantotsu.saveData
|
import ani.dantotsu.saveData
|
||||||
import ani.dantotsu.settings.UserInterfaceSettings
|
import ani.dantotsu.settings.UserInterfaceSettings
|
||||||
|
import ani.dantotsu.statusBarHeight
|
||||||
import ani.dantotsu.themes.ThemeManager
|
import ani.dantotsu.themes.ThemeManager
|
||||||
import com.google.android.material.tabs.TabLayout
|
import com.google.android.material.tabs.TabLayout
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
@ -77,12 +81,16 @@ class ListActivity : AppCompatActivity() {
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||||
)
|
)
|
||||||
|
binding.settingsContainer.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
|
topMargin = statusBarHeight
|
||||||
|
bottomMargin = navBarHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
val anime = intent.getBooleanExtra("anime", true)
|
val anime = intent.getBooleanExtra("anime", true)
|
||||||
binding.listTitle.text = (if (anime) "Anime" else "Manga") + " List"
|
binding.listTitle.text =
|
||||||
|
intent.getStringExtra("username") + "'s " + (if (anime) "Anime" else "Manga") + " List"
|
||||||
binding.listTabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
|
binding.listTabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
|
||||||
override fun onTabSelected(tab: TabLayout.Tab?) {
|
override fun onTabSelected(tab: TabLayout.Tab?) {
|
||||||
this@ListActivity.selectedTabIdx = tab?.position ?: 0
|
this@ListActivity.selectedTabIdx = tab?.position ?: 0
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.os.Build.VERSION.*
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.Editable
|
import android.text.Editable
|
||||||
import android.text.TextWatcher
|
import android.text.TextWatcher
|
||||||
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.AutoCompleteTextView
|
import android.widget.AutoCompleteTextView
|
||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
|
@ -23,12 +24,8 @@ import com.google.android.material.tabs.TabLayout
|
||||||
import com.google.android.material.tabs.TabLayoutMediator
|
import com.google.android.material.tabs.TabLayoutMediator
|
||||||
|
|
||||||
class ExtensionsActivity : AppCompatActivity() {
|
class ExtensionsActivity : AppCompatActivity() {
|
||||||
private val restartMainActivity = object : OnBackPressedCallback(false) {
|
|
||||||
override fun handleOnBackPressed() = startMainActivity(this@ExtensionsActivity)
|
|
||||||
}
|
|
||||||
lateinit var binding: ActivityExtensionsBinding
|
lateinit var binding: ActivityExtensionsBinding
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -119,6 +116,7 @@ class ExtensionsActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
|
||||||
initActivity(this)
|
initActivity(this)
|
||||||
|
binding.languageselect.visibility = View.GONE
|
||||||
/* TODO
|
/* TODO
|
||||||
binding.languageselect.setOnClickListener {
|
binding.languageselect.setOnClickListener {
|
||||||
val popup = PopupMenu(this, it)
|
val popup = PopupMenu(this, it)
|
||||||
|
|
|
@ -508,10 +508,6 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListen
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
binding.settingBuyMeCoffee.pop()
|
binding.settingBuyMeCoffee.pop()
|
||||||
}
|
}
|
||||||
binding.settingUPI.visibility = if (checkCountry(this)) View.VISIBLE else View.GONE
|
|
||||||
lifecycleScope.launch {
|
|
||||||
binding.settingUPI.pop()
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.loginDiscord.setOnClickListener {
|
binding.loginDiscord.setOnClickListener {
|
||||||
openLinkInBrowser(getString(R.string.discord))
|
openLinkInBrowser(getString(R.string.discord))
|
||||||
|
@ -519,7 +515,9 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListen
|
||||||
binding.loginGithub.setOnClickListener {
|
binding.loginGithub.setOnClickListener {
|
||||||
openLinkInBrowser(getString(R.string.github))
|
openLinkInBrowser(getString(R.string.github))
|
||||||
}
|
}
|
||||||
|
binding.loginTelegram.setOnClickListener {
|
||||||
|
openLinkInBrowser(getString(R.string.telegram))
|
||||||
|
}
|
||||||
binding.settingsUi.setOnClickListener {
|
binding.settingsUi.setOnClickListener {
|
||||||
startActivity(Intent(this, UserInterfaceSettingsActivity::class.java))
|
startActivity(Intent(this, UserInterfaceSettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
@ -757,8 +755,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListen
|
||||||
}
|
}
|
||||||
|
|
||||||
setPositiveButton("denote :)") {
|
setPositiveButton("denote :)") {
|
||||||
if (binding.settingUPI.visibility == View.VISIBLE) binding.settingUPI.performClick()
|
binding.settingBuyMeCoffee.performClick()
|
||||||
else binding.settingBuyMeCoffee.performClick()
|
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
show(supportFragmentManager, "dialog")
|
show(supportFragmentManager, "dialog")
|
||||||
|
|
|
@ -49,7 +49,7 @@ class ThemeManager(private val context: Context) {
|
||||||
"SAIKOU" -> if (useOLED) R.style.Theme_Dantotsu_SaikouOLED else R.style.Theme_Dantotsu_Saikou
|
"SAIKOU" -> if (useOLED) R.style.Theme_Dantotsu_SaikouOLED else R.style.Theme_Dantotsu_Saikou
|
||||||
"RED" -> if (useOLED) R.style.Theme_Dantotsu_RedOLED else R.style.Theme_Dantotsu_Red
|
"RED" -> if (useOLED) R.style.Theme_Dantotsu_RedOLED else R.style.Theme_Dantotsu_Red
|
||||||
"LAVENDER" -> if (useOLED) R.style.Theme_Dantotsu_LavenderOLED else R.style.Theme_Dantotsu_Lavender
|
"LAVENDER" -> if (useOLED) R.style.Theme_Dantotsu_LavenderOLED else R.style.Theme_Dantotsu_Lavender
|
||||||
"EMERALD" -> if (useOLED) R.style.Theme_Dantotsu_EmeraldOLED else R.style.Theme_Dantotsu_Emerald
|
"OCEAN" -> if (useOLED) R.style.Theme_Dantotsu_OceanOLED else R.style.Theme_Dantotsu_Ocean
|
||||||
"MONOCHROME (BETA)" -> if (useOLED) R.style.Theme_Dantotsu_MonochromeOLED else R.style.Theme_Dantotsu_Monochrome
|
"MONOCHROME (BETA)" -> if (useOLED) R.style.Theme_Dantotsu_MonochromeOLED else R.style.Theme_Dantotsu_Monochrome
|
||||||
else -> if (useOLED) R.style.Theme_Dantotsu_PurpleOLED else R.style.Theme_Dantotsu_Purple
|
else -> if (useOLED) R.style.Theme_Dantotsu_PurpleOLED else R.style.Theme_Dantotsu_Purple
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ class ThemeManager(private val context: Context) {
|
||||||
SAIKOU("SAIKOU"),
|
SAIKOU("SAIKOU"),
|
||||||
RED("RED"),
|
RED("RED"),
|
||||||
LAVENDER("LAVENDER"),
|
LAVENDER("LAVENDER"),
|
||||||
EMERALD("EMERALD"),
|
OCEAN("OCEAN"),
|
||||||
MONOCHROME("MONOCHROME (BETA)");
|
MONOCHROME("MONOCHROME (BETA)");
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
10
app/src/main/res/drawable/ic_round_book_24.xml
Normal file
10
app/src/main/res/drawable/ic_round_book_24.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="?attr/colorControlNormal"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M18,2H6C4.895,2 4,2.895 4,4v16c0,1.105 0.895,2 2,2h12c1.105,0 2,-0.895 2,-2V4C20,2.895 19.105,2 18,2zM11,12l-2.5,-1.5L6,12V5c0,-0.552 0.448,-1 1,-1h3c0.552,0 1,0.448 1,1V12z"
|
||||||
|
android:fillColor="#000000"/>
|
||||||
|
</vector>
|
|
@ -1,4 +1,12 @@
|
||||||
<vector android:height="24dp" android:viewportHeight="24"
|
<vector android:height="24dp" android:viewportHeight="24"
|
||||||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path android:fillColor="#000000" android:fillType="evenOdd" android:pathData="M3,7C3,6.448 3.448,6 4,6H20C20.552,6 21,6.448 21,7C21,7.552 20.552,8 20,8H4C3.448,8 3,7.552 3,7ZM6,12C6,11.448 6.448,11 7,11H17C17.552,11 18,11.448 18,12C18,12.552 17.552,13 17,13H7C6.448,13 6,12.552 6,12ZM9,17C9,16.448 9.448,16 10,16H14C14.552,16 15,16.448 15,17C15,17.552 14.552,18 14,18H10C9.448,18 9,17.552 9,17Z"/>
|
<path android:fillColor="#00000000" android:pathData="M5,7H19"
|
||||||
|
android:strokeColor="#000000" android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round" android:strokeWidth="3"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M5,12L19,12"
|
||||||
|
android:strokeColor="#000000" android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round" android:strokeWidth="3"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M5,17L19,17"
|
||||||
|
android:strokeColor="#000000" android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round" android:strokeWidth="3"/>
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -80,9 +80,7 @@
|
||||||
app:tabPaddingEnd="16dp"
|
app:tabPaddingEnd="16dp"
|
||||||
app:tabPaddingStart="16dp"
|
app:tabPaddingStart="16dp"
|
||||||
app:tabTextAppearance="@style/NavBarText"
|
app:tabTextAppearance="@style/NavBarText"
|
||||||
app:tabGravity="fill">
|
app:tabGravity="fill"/>
|
||||||
</com.google.android.material.tabs.TabLayout>
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/searchView"
|
android:id="@+id/searchView"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
@ -117,7 +115,7 @@
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/viewPager"
|
android:id="@+id/viewPager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".media.user.ListActivity"
|
tools:context=".media.user.ListActivity">
|
||||||
android:fitsSystemWindows="true">
|
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/listProgressBar"
|
android:id="@+id/listProgressBar"
|
||||||
|
@ -20,59 +19,62 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorSurface"
|
android:background="?attr/colorSurface"
|
||||||
android:theme="@style/Theme.Dantotsu.AppBarOverlay">
|
android:theme="@style/Theme.Dantotsu.AppBarOverlay">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/settingsContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/listTitle"
|
android:id="@+id/listTitle"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:gravity="center|start"
|
android:gravity="center|start"
|
||||||
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
|
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="?attr/colorOnBackground"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
tools:text="@string/app_name" />
|
tools:text="@string/app_name" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/random"
|
android:id="@+id/random"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/random_selection"
|
android:contentDescription="@string/random_selection"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
app:srcCompat="@drawable/ic_shuffle_24" />
|
app:srcCompat="@drawable/ic_shuffle_24" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/listSort"
|
android:id="@+id/listSort"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/sort_by"
|
android:contentDescription="@string/sort_by"
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
app:srcCompat="@drawable/ic_round_sort_24" />
|
app:srcCompat="@drawable/ic_round_sort_24" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/listTabLayout"
|
android:id="@+id/listTabLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="?attr/colorSurface"
|
|
||||||
app:tabContentStart="32dp"
|
app:tabContentStart="32dp"
|
||||||
app:tabMode="scrollable"
|
app:tabMode="scrollable"
|
||||||
app:tabPaddingEnd="16dp"
|
app:tabPaddingEnd="16dp"
|
||||||
app:tabPaddingStart="16dp"
|
app:tabPaddingStart="16dp"
|
||||||
app:tabTextAppearance="@style/NavBarText"
|
app:tabTextAppearance="@style/NavBarText"
|
||||||
tools:ignore="SpeakableTextPresentCheck" />
|
tools:ignore="SpeakableTextPresentCheck"/>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
|
|
@ -1510,19 +1510,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:srcCompat="@drawable/ic_bmc_button"
|
app:srcCompat="@drawable/ic_bmc_button"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="16dp"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/settingUPI"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:srcCompat="@drawable/ic_upi_icon"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -1565,6 +1552,15 @@
|
||||||
app:tint="?attr/colorOnBackground"
|
app:tint="?attr/colorOnBackground"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/loginTelegram"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:src="@drawable/ic_telegram"
|
||||||
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,15 @@
|
||||||
android:src="@drawable/ic_github"
|
android:src="@drawable/ic_github"
|
||||||
app:tint="?attr/colorOutline"
|
app:tint="?attr/colorOutline"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/loginTelegram"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:src="@drawable/ic_telegram"
|
||||||
|
app:tint="?attr/colorOutline"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -87,15 +87,16 @@
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/sourceTitle"
|
android:id="@+id/total"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
android:paddingStart="24dp"
|
||||||
android:fontFamily="@font/poppins_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:gravity="center"
|
android:gravity="center_vertical"
|
||||||
android:text="Downloaded Manga and Novels"
|
android:hint="Manga and Novels"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText,RtlSymmetry" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/downloadedList"
|
android:id="@+id/downloadedList"
|
||||||
|
|
|
@ -1,103 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item
|
|
||||||
android:id="@+id/all"
|
|
||||||
android:title="All"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="true" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/multi"
|
|
||||||
android:title="Multi"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/arabic"
|
|
||||||
android:title="Arabic"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/german"
|
|
||||||
android:title="German"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/english"
|
|
||||||
android:title="English"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/spanish"
|
|
||||||
android:title="Spanish"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/french"
|
|
||||||
android:title="French"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/indonesian"
|
|
||||||
android:title="Indonesian"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/italian"
|
|
||||||
android:title="Italian"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/japanese"
|
|
||||||
android:title="Japanese"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/korean"
|
|
||||||
android:title="Korean"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/polish"
|
|
||||||
android:title="Polish"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/portuguese_brazil"
|
|
||||||
android:title="Portuguese (Brazil)"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/russian"
|
|
||||||
android:title="Russian"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/thai"
|
|
||||||
android:title="Thai"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/turkish"
|
|
||||||
android:title="Turkish"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/ukrainian"
|
|
||||||
android:title="Ukrainian"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/vietnamese"
|
|
||||||
android:title="Vietnamese"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/chinese"
|
|
||||||
android:title="Chinese"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
<item
|
|
||||||
android:id="@+id/chinese_simplified"
|
|
||||||
android:title="Chinese (Simplified)"
|
|
||||||
android:checkable="true"
|
|
||||||
android:checked="false" />
|
|
||||||
</menu>
|
|
15
app/src/main/res/menu/novel_menu_detail.xml
Normal file
15
app/src/main/res/menu/novel_menu_detail.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:id="@+id/info"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@drawable/ic_round_info_24"
|
||||||
|
android:title="@string/info" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/read"
|
||||||
|
android:enabled="true"
|
||||||
|
android:icon="@drawable/ic_round_book_24"
|
||||||
|
android:title="@string/read" />
|
||||||
|
|
||||||
|
</menu>
|
|
@ -209,7 +209,7 @@
|
||||||
<item name="colorPrimaryInverse">@color/md_theme_dark_7_inversePrimary</item>
|
<item name="colorPrimaryInverse">@color/md_theme_dark_7_inversePrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Dantotsu.Emerald" parent="Theme.Base">
|
<style name="Theme.Dantotsu.Ocean" parent="Theme.Base">
|
||||||
<item name="colorPrimary">@color/md_theme_dark_8_primary</item>
|
<item name="colorPrimary">@color/md_theme_dark_8_primary</item>
|
||||||
<item name="colorOnPrimary">@color/md_theme_dark_8_onPrimary</item>
|
<item name="colorOnPrimary">@color/md_theme_dark_8_onPrimary</item>
|
||||||
<item name="colorPrimaryContainer">@color/md_theme_dark_8_primaryContainer</item>
|
<item name="colorPrimaryContainer">@color/md_theme_dark_8_primaryContainer</item>
|
||||||
|
@ -306,7 +306,8 @@
|
||||||
<item name="android:colorBackground">@color/darkest_Black</item>
|
<item name="android:colorBackground">@color/darkest_Black</item>
|
||||||
<item name="colorSurface">@color/darkest_Black</item>
|
<item name="colorSurface">@color/darkest_Black</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="Theme.Dantotsu.EmeraldOLED" parent="Theme.Dantotsu.Emerald">
|
|
||||||
|
<style name="Theme.Dantotsu.OceanOLED" parent="Theme.Dantotsu.Ocean">
|
||||||
<item name="android:colorBackground">@color/darkest_Black</item>
|
<item name="android:colorBackground">@color/darkest_Black</item>
|
||||||
<item name="colorSurface">@color/darkest_Black</item>
|
<item name="colorSurface">@color/darkest_Black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<string name="discord">https://discord.gg/4HPZ5nAWwM</string>
|
<string name="discord">https://discord.gg/4HPZ5nAWwM</string>
|
||||||
<string name="github">https://github.com/rebelonion/Dantotsu</string>
|
<string name="github">https://github.com/rebelonion/Dantotsu</string>
|
||||||
|
<string name="telegram" tools:ignore="Typos">https://t.me/+gzBCQExtLQo1YTNh </string>
|
||||||
<string name="home">Home</string>
|
<string name="home">Home</string>
|
||||||
<string name="anime">Anime</string>
|
<string name="anime">Anime</string>
|
||||||
<string name="browse_anime">Browse Anime</string>
|
<string name="browse_anime">Browse Anime</string>
|
||||||
|
|
|
@ -285,7 +285,7 @@
|
||||||
<item name="colorPrimaryInverse">@color/md_theme_light_7_inversePrimary</item>
|
<item name="colorPrimaryInverse">@color/md_theme_light_7_inversePrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Dantotsu.Emerald" parent="Theme.Base">
|
<style name="Theme.Dantotsu.Ocean" parent="Theme.Base">
|
||||||
<item name="colorPrimary">@color/md_theme_light_8_primary</item>
|
<item name="colorPrimary">@color/md_theme_light_8_primary</item>
|
||||||
<item name="colorOnPrimary">@color/md_theme_light_8_onPrimary</item>
|
<item name="colorOnPrimary">@color/md_theme_light_8_onPrimary</item>
|
||||||
<item name="colorPrimaryContainer">@color/md_theme_light_8_primaryContainer</item>
|
<item name="colorPrimaryContainer">@color/md_theme_light_8_primaryContainer</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue