themes and various bugs
This commit is contained in:
parent
dc165fa6bc
commit
63526c6ed3
114 changed files with 1719 additions and 558 deletions
|
@ -1,7 +1,11 @@
|
|||
package ani.dantotsu
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import android.content.pm.PackageManager
|
||||
import android.graphics.drawable.Animatable
|
||||
import android.net.Uri
|
||||
|
@ -10,6 +14,7 @@ import android.os.Bundle
|
|||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.AnticipateInterpolator
|
||||
|
@ -41,8 +46,10 @@ import ani.dantotsu.media.MediaDetailsActivity
|
|||
import ani.dantotsu.others.CustomBottomDialog
|
||||
import ani.dantotsu.parsers.AnimeSources
|
||||
import ani.dantotsu.parsers.MangaSources
|
||||
import ani.dantotsu.settings.SettingsActivity
|
||||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.subcriptions.Subscription.Companion.startSubscription
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import eu.kanade.tachiyomi.extension.manga.MangaExtensionManager
|
||||
import io.noties.markwon.Markwon
|
||||
import io.noties.markwon.SoftBreakAddsNewLinePlugin
|
||||
|
@ -68,6 +75,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
@ -228,6 +236,18 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (ActivityHelper.shouldRefreshMainActivity) {
|
||||
ActivityHelper.shouldRefreshMainActivity = false
|
||||
Refresh.all()
|
||||
finish()
|
||||
startActivity(Intent(this, MainActivity::class.java))
|
||||
initActivity(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//ViewPager
|
||||
private class ViewPagerAdapter(fragmentManager: FragmentManager, lifecycle: Lifecycle) :
|
||||
FragmentStateAdapter(fragmentManager, lifecycle) {
|
||||
|
@ -245,3 +265,7 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
object ActivityHelper {
|
||||
var shouldRefreshMainActivity: Boolean = false
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import ani.dantotsu.logError
|
||||
import ani.dantotsu.logger
|
||||
import ani.dantotsu.startMainActivity
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
||||
class Login : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
val data: Uri? = intent?.data
|
||||
logger(data.toString())
|
||||
try {
|
||||
|
|
|
@ -6,10 +6,12 @@ import android.os.Bundle
|
|||
import androidx.core.os.bundleOf
|
||||
import ani.dantotsu.loadMedia
|
||||
import ani.dantotsu.startMainActivity
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
||||
class UrlMedia : Activity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
var id: Int? = intent?.extras?.getInt("media", 0) ?: 0
|
||||
var isMAL = false
|
||||
var continueMedia = true
|
||||
|
|
|
@ -11,12 +11,14 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import ani.dantotsu.R
|
||||
import ani.dantotsu.connections.discord.Discord.saveToken
|
||||
import ani.dantotsu.startMainActivity
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
||||
class Login : AppCompatActivity() {
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
val process = getProcessName()
|
||||
if (packageName != process) WebView.setDataDirectorySuffix(process)
|
||||
|
|
|
@ -7,12 +7,14 @@ import androidx.lifecycle.lifecycleScope
|
|||
import ani.dantotsu.*
|
||||
import ani.dantotsu.connections.mal.MAL.clientId
|
||||
import ani.dantotsu.connections.mal.MAL.saveResponse
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class Login : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
try {
|
||||
val data: Uri = intent?.data
|
||||
?: throw Exception(getString(R.string.mal_login_uri_not_found))
|
||||
|
|
|
@ -63,6 +63,7 @@ object Helper {
|
|||
SubtitleType.VTT -> MimeTypes.TEXT_VTT
|
||||
SubtitleType.ASS -> MimeTypes.TEXT_SSA
|
||||
SubtitleType.SRT -> MimeTypes.APPLICATION_SUBRIP
|
||||
SubtitleType.UNKNOWN -> MimeTypes.TEXT_SSA
|
||||
}
|
||||
)
|
||||
.build()
|
||||
|
|
|
@ -163,6 +163,7 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
|
|||
fun updateAvatar() {
|
||||
if (Anilist.avatar != null && ready.value == true) {
|
||||
binding.animeUserAvatar.loadImage(Anilist.avatar)
|
||||
binding.animeUserAvatar.imageTintList = null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import androidx.viewpager2.widget.ViewPager2
|
||||
import ani.dantotsu.media.GenreActivity
|
||||
import ani.dantotsu.MediaPageTransformer
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.connections.anilist.Anilist
|
||||
import ani.dantotsu.databinding.ItemMangaPageBinding
|
||||
import ani.dantotsu.loadData
|
||||
|
@ -153,6 +154,7 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
|
|||
fun updateAvatar() {
|
||||
if (Anilist.avatar != null && ready.value == true) {
|
||||
binding.mangaUserAvatar.loadImage(Anilist.avatar)
|
||||
binding.mangaUserAvatar.imageTintList = null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,12 @@ import ani.dantotsu.isOnline
|
|||
import ani.dantotsu.navBarHeight
|
||||
import ani.dantotsu.startMainActivity
|
||||
import ani.dantotsu.statusBarHeight
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
||||
class NoInternet : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
|
||||
val binding = ActivityNoInternetBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
|
|
@ -15,6 +15,7 @@ import androidx.recyclerview.widget.GridLayoutManager
|
|||
import ani.dantotsu.*
|
||||
import ani.dantotsu.databinding.ActivityAuthorBinding
|
||||
import ani.dantotsu.others.getSerialized
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
@ -28,6 +29,7 @@ class AuthorActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityAuthorBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import ani.dantotsu.R
|
|||
import ani.dantotsu.Refresh
|
||||
import ani.dantotsu.databinding.ActivityListBinding
|
||||
import ani.dantotsu.media.user.ListViewPagerAdapter
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -27,6 +28,7 @@ class CalendarActivity : AppCompatActivity() {
|
|||
@SuppressLint("SetTextI18n")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityListBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import ani.dantotsu.databinding.ActivityCharacterBinding
|
|||
import ani.dantotsu.others.ImageViewDialog
|
||||
import ani.dantotsu.others.getSerialized
|
||||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -33,6 +34,7 @@ class CharacterDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChang
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityCharacterBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import ani.dantotsu.initActivity
|
|||
import ani.dantotsu.loadData
|
||||
import ani.dantotsu.navBarHeight
|
||||
import ani.dantotsu.statusBarHeight
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -25,6 +26,7 @@ class GenreActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityGenreBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
initActivity(this)
|
||||
|
|
|
@ -47,6 +47,7 @@ import ani.dantotsu.saveData
|
|||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.statusBarHeight
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.flaviofaria.kenburnsview.RandomTransitionGenerator
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.navigation.NavigationBarView
|
||||
|
@ -71,6 +72,7 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
@SuppressLint("SetTextI18n", "ClickableViewAccessibility")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityMediaBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
screenWidth = resources.displayMetrics.widthPixels.toFloat()
|
||||
|
@ -79,7 +81,8 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
|
||||
initActivity(this)
|
||||
uiSettings = loadData<UserInterfaceSettings>("ui_settings") ?: UserInterfaceSettings()
|
||||
if (!uiSettings.immersiveMode) this.window.statusBarColor = ContextCompat.getColor(this, R.color.nav_bg_inv)
|
||||
if (!uiSettings.immersiveMode) this.window.statusBarColor =
|
||||
ContextCompat.getColor(this, R.color.nav_bg_inv)
|
||||
|
||||
binding.mediaBanner.updateLayoutParams { height += statusBarHeight }
|
||||
binding.mediaBannerNoKen.updateLayoutParams { height += statusBarHeight }
|
||||
|
@ -101,10 +104,14 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
|
||||
if (uiSettings.bannerAnimations) {
|
||||
val adi = AccelerateDecelerateInterpolator()
|
||||
val generator = RandomTransitionGenerator((10000 + 15000 * (uiSettings.animationSpeed)).toLong(), adi)
|
||||
val generator = RandomTransitionGenerator(
|
||||
(10000 + 15000 * (uiSettings.animationSpeed)).toLong(),
|
||||
adi
|
||||
)
|
||||
binding.mediaBanner.setTransitionGenerator(generator)
|
||||
}
|
||||
val banner = if (uiSettings.bannerAnimations) binding.mediaBanner else binding.mediaBannerNoKen
|
||||
val banner =
|
||||
if (uiSettings.bannerAnimations) binding.mediaBanner else binding.mediaBannerNoKen
|
||||
val viewPager = binding.mediaViewPager
|
||||
tabLayout = binding.mediaTab as NavigationBarView
|
||||
viewPager.isUserInputEnabled = false
|
||||
|
@ -167,8 +174,8 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
binding.mediaFav,
|
||||
R.drawable.ic_round_favorite_24,
|
||||
R.drawable.ic_round_favorite_border_24,
|
||||
R.color.nav_tab,
|
||||
R.color.fav,
|
||||
com.google.android.material.R.attr.colorSecondary,
|
||||
com.google.android.material.R.attr.colorSecondary,
|
||||
media.isFav
|
||||
) {
|
||||
media.isFav = it
|
||||
|
@ -180,17 +187,32 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
null
|
||||
}
|
||||
|
||||
@SuppressLint("ResourceType")
|
||||
fun total() {
|
||||
val text = SpannableStringBuilder().apply {
|
||||
val white = ContextCompat.getColor(this@MediaDetailsActivity, R.color.bg_opp)
|
||||
val typedValue = TypedValue()
|
||||
this@MediaDetailsActivity.theme.resolveAttribute(com.google.android.material.R.attr.colorOnBackground, typedValue, true)
|
||||
val white = typedValue.data
|
||||
if (media.userStatus != null) {
|
||||
append(if (media.anime != null) getString(R.string.watched_num) else getString(R.string.read_num))
|
||||
val typedValue = TypedValue()
|
||||
theme.resolveAttribute(com.google.android.material.R.attr.colorSecondary, typedValue, true)
|
||||
theme.resolveAttribute(
|
||||
com.google.android.material.R.attr.colorSecondary,
|
||||
typedValue,
|
||||
true
|
||||
)
|
||||
bold { color(typedValue.data) { append("${media.userProgress}") } }
|
||||
append(if (media.anime != null) getString(R.string.episodes_out_of) else getString(R.string.chapters_out_of))
|
||||
append(
|
||||
if (media.anime != null) getString(R.string.episodes_out_of) else getString(
|
||||
R.string.chapters_out_of
|
||||
)
|
||||
)
|
||||
} else {
|
||||
append(if (media.anime != null) getString(R.string.episodes_total_of) else getString(R.string.chapters_total_of))
|
||||
append(
|
||||
if (media.anime != null) getString(R.string.episodes_total_of) else getString(
|
||||
R.string.chapters_total_of
|
||||
)
|
||||
)
|
||||
}
|
||||
if (media.anime != null) {
|
||||
if (media.anime!!.nextAiringEpisode != null) {
|
||||
|
@ -206,8 +228,12 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
|
||||
fun progress() {
|
||||
val statuses: Array<String> = resources.getStringArray(R.array.status)
|
||||
val statusStrings = if (media.manga==null) resources.getStringArray(R.array.status_anime) else resources.getStringArray(R.array.status_manga)
|
||||
val userStatus = if(media.userStatus != null) statusStrings[statuses.indexOf(media.userStatus)] else statusStrings[0]
|
||||
val statusStrings =
|
||||
if (media.manga == null) resources.getStringArray(R.array.status_anime) else resources.getStringArray(
|
||||
R.array.status_manga
|
||||
)
|
||||
val userStatus =
|
||||
if (media.userStatus != null) statusStrings[statuses.indexOf(media.userStatus)] else statusStrings[0]
|
||||
|
||||
if (media.userStatus != null) {
|
||||
binding.mediaTotal.visibility = View.VISIBLE
|
||||
|
@ -234,7 +260,7 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
if (it != null) {
|
||||
media = it
|
||||
scope.launch {
|
||||
if(media.isFav!=favButton?.clicked) favButton?.clicked()
|
||||
if (media.isFav != favButton?.clicked) favButton?.clicked()
|
||||
}
|
||||
|
||||
binding.mediaNotify.setOnClickListener {
|
||||
|
@ -258,10 +284,15 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
|
||||
tabLayout.menu.clear()
|
||||
if (media.anime != null) {
|
||||
viewPager.adapter = ViewPagerAdapter(supportFragmentManager, lifecycle, SupportedMedia.ANIME)
|
||||
viewPager.adapter =
|
||||
ViewPagerAdapter(supportFragmentManager, lifecycle, SupportedMedia.ANIME)
|
||||
tabLayout.inflateMenu(R.menu.anime_menu_detail)
|
||||
} else if (media.manga != null) {
|
||||
viewPager.adapter = ViewPagerAdapter(supportFragmentManager, lifecycle, if(media.format=="NOVEL") SupportedMedia.NOVEL else SupportedMedia.MANGA)
|
||||
viewPager.adapter = ViewPagerAdapter(
|
||||
supportFragmentManager,
|
||||
lifecycle,
|
||||
if (media.format == "NOVEL") SupportedMedia.NOVEL else SupportedMedia.MANGA
|
||||
)
|
||||
tabLayout.inflateMenu(R.menu.manga_menu_detail)
|
||||
anime = false
|
||||
}
|
||||
|
@ -303,9 +334,10 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
|
||||
private fun selectFromID(id: Int) {
|
||||
when (id) {
|
||||
R.id.info -> {
|
||||
R.id.info -> {
|
||||
selected = 0
|
||||
}
|
||||
|
||||
R.id.watch, R.id.read -> {
|
||||
selected = 1
|
||||
}
|
||||
|
@ -329,9 +361,10 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
super.onResume()
|
||||
}
|
||||
|
||||
private enum class SupportedMedia{
|
||||
private enum class SupportedMedia {
|
||||
ANIME, MANGA, NOVEL
|
||||
}
|
||||
|
||||
//ViewPager
|
||||
private class ViewPagerAdapter(
|
||||
fragmentManager: FragmentManager,
|
||||
|
@ -342,13 +375,14 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
|
||||
override fun getItemCount(): Int = 2
|
||||
|
||||
override fun createFragment(position: Int): Fragment = when (position){
|
||||
override fun createFragment(position: Int): Fragment = when (position) {
|
||||
0 -> MediaInfoFragment()
|
||||
1 -> when(media){
|
||||
1 -> when (media) {
|
||||
SupportedMedia.ANIME -> AnimeWatchFragment()
|
||||
SupportedMedia.MANGA -> MangaReadFragment()
|
||||
SupportedMedia.NOVEL -> NovelReadFragment()
|
||||
}
|
||||
|
||||
else -> MediaInfoFragment()
|
||||
}
|
||||
}
|
||||
|
@ -363,27 +397,41 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
if (mMaxScrollSize == 0) mMaxScrollSize = appBar.totalScrollRange
|
||||
val percentage = abs(i) * 100 / mMaxScrollSize
|
||||
|
||||
binding.mediaCover.visibility = if (binding.mediaCover.scaleX == 0f) View.GONE else View.VISIBLE
|
||||
binding.mediaCover.visibility =
|
||||
if (binding.mediaCover.scaleX == 0f) View.GONE else View.VISIBLE
|
||||
val duration = (200 * uiSettings.animationSpeed).toLong()
|
||||
val typedValue = TypedValue()
|
||||
this@MediaDetailsActivity.theme.resolveAttribute(com.google.android.material.R.attr.colorSecondary, typedValue, true)
|
||||
val color = typedValue.data
|
||||
if (percentage >= percent && !isCollapsed) {
|
||||
isCollapsed = true
|
||||
ObjectAnimator.ofFloat(binding.mediaTitle, "translationX", 0f).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaAccessContainer, "translationX", screenWidth).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCover, "translationX", screenWidth).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCollapseContainer, "translationX", screenWidth).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaTitle, "translationX", 0f).setDuration(duration)
|
||||
.start()
|
||||
ObjectAnimator.ofFloat(binding.mediaAccessContainer, "translationX", screenWidth)
|
||||
.setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCover, "translationX", screenWidth)
|
||||
.setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCollapseContainer, "translationX", screenWidth)
|
||||
.setDuration(duration).start()
|
||||
binding.mediaBanner.pause()
|
||||
if (!uiSettings.immersiveMode) this.window.statusBarColor = ContextCompat.getColor(this, R.color.nav_bg)
|
||||
if (!uiSettings.immersiveMode) this.window.statusBarColor = color
|
||||
}
|
||||
if (percentage <= percent && isCollapsed) {
|
||||
isCollapsed = false
|
||||
ObjectAnimator.ofFloat(binding.mediaTitle, "translationX", -screenWidth).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaAccessContainer, "translationX", 0f).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCover, "translationX", 0f).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCollapseContainer, "translationX", 0f).setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaTitle, "translationX", -screenWidth)
|
||||
.setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaAccessContainer, "translationX", 0f)
|
||||
.setDuration(duration).start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCover, "translationX", 0f).setDuration(duration)
|
||||
.start()
|
||||
ObjectAnimator.ofFloat(binding.mediaCollapseContainer, "translationX", 0f)
|
||||
.setDuration(duration).start()
|
||||
if (uiSettings.bannerAnimations) binding.mediaBanner.resume()
|
||||
if (!uiSettings.immersiveMode) this.window.statusBarColor = ContextCompat.getColor(this, R.color.nav_bg_inv)
|
||||
if (!uiSettings.immersiveMode) this.window.statusBarColor = color
|
||||
}
|
||||
if (percentage == 1 && model.scrolledToTop.value != false) model.scrolledToTop.postValue(false)
|
||||
if (percentage == 1 && model.scrolledToTop.value != false) model.scrolledToTop.postValue(
|
||||
false
|
||||
)
|
||||
if (percentage == 0 && model.scrolledToTop.value != true) model.scrolledToTop.postValue(true)
|
||||
}
|
||||
|
||||
|
@ -426,7 +474,8 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
ObjectAnimator.ofFloat(image, "scaleY", 1f, 0f).setDuration(100).start()
|
||||
delay(100)
|
||||
if (clicked) {
|
||||
ObjectAnimator.ofArgb(image,
|
||||
ObjectAnimator.ofArgb(
|
||||
image,
|
||||
"ColorFilter",
|
||||
ContextCompat.getColor(context, c1),
|
||||
ContextCompat.getColor(context, c2)
|
||||
|
@ -449,7 +498,7 @@ class MediaDetailsActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedLi
|
|||
|
||||
fun enabled(enabled: Boolean) {
|
||||
disabled = !enabled
|
||||
image.alpha = if(disabled) 0.33f else 1f
|
||||
image.alpha = if (disabled) 0.33f else 1f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import ani.dantotsu.connections.anilist.Anilist
|
|||
import ani.dantotsu.databinding.BottomSheetMediaListSmallBinding
|
||||
import ani.dantotsu.connections.mal.MAL
|
||||
import ani.dantotsu.others.getSerialized
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
|
|
@ -16,6 +16,7 @@ import ani.dantotsu.connections.anilist.Anilist
|
|||
import ani.dantotsu.connections.anilist.AnilistSearch
|
||||
import ani.dantotsu.connections.anilist.SearchResults
|
||||
import ani.dantotsu.databinding.ActivitySearchBinding
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.*
|
||||
|
@ -37,6 +38,7 @@ class SearchActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivitySearchBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
initActivity(this)
|
||||
|
|
|
@ -15,6 +15,7 @@ import androidx.recyclerview.widget.GridLayoutManager
|
|||
import ani.dantotsu.*
|
||||
import ani.dantotsu.databinding.ActivityStudioBinding
|
||||
import ani.dantotsu.others.getSerialized
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
@ -28,6 +29,7 @@ class StudioActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityStudioBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
48
app/src/main/java/ani/dantotsu/media/SubtitleDownloader.kt
Normal file
48
app/src/main/java/ani/dantotsu/media/SubtitleDownloader.kt
Normal file
|
@ -0,0 +1,48 @@
|
|||
package ani.dantotsu.media
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Environment
|
||||
import ani.dantotsu.parsers.SubtitleType
|
||||
import eu.kanade.tachiyomi.network.NetworkHelper
|
||||
import okhttp3.Request
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.io.IOException
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.FileInputStream
|
||||
|
||||
class SubtitleDownloader {
|
||||
|
||||
companion object {
|
||||
//doesn't really download the subtitles -\_(o_o)_/-
|
||||
suspend fun downloadSubtitles(context: Context, url: String): SubtitleType =
|
||||
withContext(Dispatchers.IO) {
|
||||
// Initialize the NetworkHelper instance. Replace this line based on how you usually initialize it
|
||||
val networkHelper = Injekt.get<NetworkHelper>()
|
||||
val request = Request.Builder()
|
||||
.url(url)
|
||||
.build()
|
||||
|
||||
val response = networkHelper.client.newCall(request).execute()
|
||||
|
||||
// Check if response is successful
|
||||
if (response.isSuccessful) {
|
||||
val responseBody = response.body?.string()
|
||||
|
||||
|
||||
val subtitleType = when {
|
||||
responseBody?.contains("[Script Info]") == true -> SubtitleType.ASS
|
||||
responseBody?.contains("WEBVTT") == true -> SubtitleType.VTT
|
||||
else -> SubtitleType.SRT
|
||||
}
|
||||
|
||||
return@withContext subtitleType
|
||||
} else {
|
||||
return@withContext SubtitleType.UNKNOWN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -53,6 +53,7 @@ import androidx.media3.datasource.okhttp.OkHttpDataSource
|
|||
import androidx.media3.exoplayer.ExoPlayer
|
||||
import androidx.media3.exoplayer.source.DefaultMediaSourceFactory
|
||||
import androidx.media3.exoplayer.trackselection.DefaultTrackSelector
|
||||
import androidx.media3.exoplayer.util.EventLogger
|
||||
import androidx.media3.session.MediaSession
|
||||
import androidx.media3.ui.*
|
||||
import androidx.media3.ui.CaptionStyleCompat.*
|
||||
|
@ -65,6 +66,7 @@ import ani.dantotsu.connections.updateProgress
|
|||
import ani.dantotsu.databinding.ActivityExoplayerBinding
|
||||
import ani.dantotsu.media.Media
|
||||
import ani.dantotsu.media.MediaDetailsViewModel
|
||||
import ani.dantotsu.media.SubtitleDownloader
|
||||
import ani.dantotsu.others.AniSkip
|
||||
import ani.dantotsu.others.AniSkip.getType
|
||||
import ani.dantotsu.others.Download.download
|
||||
|
@ -74,6 +76,7 @@ import ani.dantotsu.parsers.*
|
|||
import ani.dantotsu.settings.PlayerSettings
|
||||
import ani.dantotsu.settings.PlayerSettingsActivity
|
||||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.bumptech.glide.Glide
|
||||
import com.google.android.material.slider.Slider
|
||||
import com.lagradost.nicehttp.ignoreAllSSLErrors
|
||||
|
@ -81,12 +84,15 @@ import kotlinx.coroutines.CoroutineScope
|
|||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import okhttp3.internal.immutableListOf
|
||||
import java.util.*
|
||||
import java.util.concurrent.*
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
||||
@UnstableApi
|
||||
@SuppressLint("SetTextI18n", "ClickableViewAccessibility")
|
||||
class ExoplayerView : AppCompatActivity(), Player.Listener {
|
||||
|
@ -183,7 +189,10 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
val displayCutout = window.decorView.rootWindowInsets.displayCutout
|
||||
if (displayCutout != null) {
|
||||
if (displayCutout.boundingRects.size > 0) {
|
||||
notchHeight = min(displayCutout.boundingRects[0].width(), displayCutout.boundingRects[0].height())
|
||||
notchHeight = min(
|
||||
displayCutout.boundingRects[0].width(),
|
||||
displayCutout.boundingRects[0].height()
|
||||
)
|
||||
checkNotch()
|
||||
}
|
||||
}
|
||||
|
@ -194,101 +203,104 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
private fun checkNotch() {
|
||||
if (notchHeight != 0) {
|
||||
val orientation = resources.configuration.orientation
|
||||
playerView.findViewById<View>(R.id.exo_controller_margin).updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
marginStart = notchHeight
|
||||
marginEnd = notchHeight
|
||||
topMargin = 0
|
||||
} else {
|
||||
topMargin = notchHeight
|
||||
marginStart = 0
|
||||
marginEnd = 0
|
||||
playerView.findViewById<View>(R.id.exo_controller_margin)
|
||||
.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
marginStart = notchHeight
|
||||
marginEnd = notchHeight
|
||||
topMargin = 0
|
||||
} else {
|
||||
topMargin = notchHeight
|
||||
marginStart = 0
|
||||
marginEnd = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
playerView.findViewById<View>(androidx.media3.ui.R.id.exo_buffering).translationY =
|
||||
(if (orientation == Configuration.ORIENTATION_LANDSCAPE) 0 else (notchHeight + 8f.px)).dp
|
||||
exoBrightnessCont.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
marginEnd = if (orientation == Configuration.ORIENTATION_LANDSCAPE) notchHeight else 0
|
||||
marginEnd =
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) notchHeight else 0
|
||||
}
|
||||
exoVolumeCont.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
marginStart = if (orientation == Configuration.ORIENTATION_LANDSCAPE) notchHeight else 0
|
||||
marginStart =
|
||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE) notchHeight else 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupSubFormatting(playerView: PlayerView, settings: PlayerSettings) {
|
||||
val primaryColor = when (settings.primaryColor) {
|
||||
0 -> Color.BLACK
|
||||
1 -> Color.DKGRAY
|
||||
2 -> Color.GRAY
|
||||
3 -> Color.LTGRAY
|
||||
4 -> Color.WHITE
|
||||
5 -> Color.RED
|
||||
6 -> Color.YELLOW
|
||||
7 -> Color.GREEN
|
||||
8 -> Color.CYAN
|
||||
9 -> Color.BLUE
|
||||
10 -> Color.MAGENTA
|
||||
11 -> Color.TRANSPARENT
|
||||
0 -> Color.BLACK
|
||||
1 -> Color.DKGRAY
|
||||
2 -> Color.GRAY
|
||||
3 -> Color.LTGRAY
|
||||
4 -> Color.WHITE
|
||||
5 -> Color.RED
|
||||
6 -> Color.YELLOW
|
||||
7 -> Color.GREEN
|
||||
8 -> Color.CYAN
|
||||
9 -> Color.BLUE
|
||||
10 -> Color.MAGENTA
|
||||
11 -> Color.TRANSPARENT
|
||||
else -> Color.WHITE
|
||||
}
|
||||
val secondaryColor = when (settings.secondaryColor) {
|
||||
0 -> Color.BLACK
|
||||
1 -> Color.DKGRAY
|
||||
2 -> Color.GRAY
|
||||
3 -> Color.LTGRAY
|
||||
4 -> Color.WHITE
|
||||
5 -> Color.RED
|
||||
6 -> Color.YELLOW
|
||||
7 -> Color.GREEN
|
||||
8 -> Color.CYAN
|
||||
9 -> Color.BLUE
|
||||
10 -> Color.MAGENTA
|
||||
11 -> Color.TRANSPARENT
|
||||
0 -> Color.BLACK
|
||||
1 -> Color.DKGRAY
|
||||
2 -> Color.GRAY
|
||||
3 -> Color.LTGRAY
|
||||
4 -> Color.WHITE
|
||||
5 -> Color.RED
|
||||
6 -> Color.YELLOW
|
||||
7 -> Color.GREEN
|
||||
8 -> Color.CYAN
|
||||
9 -> Color.BLUE
|
||||
10 -> Color.MAGENTA
|
||||
11 -> Color.TRANSPARENT
|
||||
else -> Color.BLACK
|
||||
}
|
||||
val outline = when (settings.outline) {
|
||||
0 -> EDGE_TYPE_OUTLINE // Normal
|
||||
1 -> EDGE_TYPE_DEPRESSED // Shine
|
||||
2 -> EDGE_TYPE_DROP_SHADOW // Drop shadow
|
||||
3 -> EDGE_TYPE_NONE // No outline
|
||||
0 -> EDGE_TYPE_OUTLINE // Normal
|
||||
1 -> EDGE_TYPE_DEPRESSED // Shine
|
||||
2 -> EDGE_TYPE_DROP_SHADOW // Drop shadow
|
||||
3 -> EDGE_TYPE_NONE // No outline
|
||||
else -> EDGE_TYPE_OUTLINE // Normal
|
||||
}
|
||||
val subBackground = when (settings.subBackground) {
|
||||
0 -> Color.TRANSPARENT
|
||||
1 -> Color.BLACK
|
||||
2 -> Color.DKGRAY
|
||||
3 -> Color.GRAY
|
||||
4 -> Color.LTGRAY
|
||||
5 -> Color.WHITE
|
||||
6 -> Color.RED
|
||||
7 -> Color.YELLOW
|
||||
8 -> Color.GREEN
|
||||
9 -> Color.CYAN
|
||||
10 -> Color.BLUE
|
||||
11 -> Color.MAGENTA
|
||||
0 -> Color.TRANSPARENT
|
||||
1 -> Color.BLACK
|
||||
2 -> Color.DKGRAY
|
||||
3 -> Color.GRAY
|
||||
4 -> Color.LTGRAY
|
||||
5 -> Color.WHITE
|
||||
6 -> Color.RED
|
||||
7 -> Color.YELLOW
|
||||
8 -> Color.GREEN
|
||||
9 -> Color.CYAN
|
||||
10 -> Color.BLUE
|
||||
11 -> Color.MAGENTA
|
||||
else -> Color.TRANSPARENT
|
||||
}
|
||||
val subWindow = when (settings.subWindow) {
|
||||
0 -> Color.TRANSPARENT
|
||||
1 -> Color.BLACK
|
||||
2 -> Color.DKGRAY
|
||||
3 -> Color.GRAY
|
||||
4 -> Color.LTGRAY
|
||||
5 -> Color.WHITE
|
||||
6 -> Color.RED
|
||||
7 -> Color.YELLOW
|
||||
8 -> Color.GREEN
|
||||
9 -> Color.CYAN
|
||||
10 -> Color.BLUE
|
||||
11 -> Color.MAGENTA
|
||||
0 -> Color.TRANSPARENT
|
||||
1 -> Color.BLACK
|
||||
2 -> Color.DKGRAY
|
||||
3 -> Color.GRAY
|
||||
4 -> Color.LTGRAY
|
||||
5 -> Color.WHITE
|
||||
6 -> Color.RED
|
||||
7 -> Color.YELLOW
|
||||
8 -> Color.GREEN
|
||||
9 -> Color.CYAN
|
||||
10 -> Color.BLUE
|
||||
11 -> Color.MAGENTA
|
||||
else -> Color.TRANSPARENT
|
||||
}
|
||||
val font = when (settings.font) {
|
||||
0 -> ResourcesCompat.getFont(this, R.font.poppins_semi_bold)
|
||||
1 -> ResourcesCompat.getFont(this, R.font.poppins_bold)
|
||||
2 -> ResourcesCompat.getFont(this, R.font.poppins)
|
||||
3 -> ResourcesCompat.getFont(this, R.font.poppins_thin)
|
||||
0 -> ResourcesCompat.getFont(this, R.font.poppins_semi_bold)
|
||||
1 -> ResourcesCompat.getFont(this, R.font.poppins_bold)
|
||||
2 -> ResourcesCompat.getFont(this, R.font.poppins)
|
||||
3 -> ResourcesCompat.getFont(this, R.font.poppins_thin)
|
||||
else -> ResourcesCompat.getFont(this, R.font.poppins_semi_bold)
|
||||
}
|
||||
playerView.subtitleView?.setStyle(
|
||||
|
@ -305,6 +317,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityExoplayerBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
@ -316,8 +329,18 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
finishAndRemoveTask()
|
||||
}
|
||||
|
||||
settings = loadData("player_settings") ?: PlayerSettings().apply { saveData("player_settings", this) }
|
||||
uiSettings = loadData("ui_settings") ?: UserInterfaceSettings().apply { saveData("ui_settings", this) }
|
||||
settings = loadData("player_settings") ?: PlayerSettings().apply {
|
||||
saveData(
|
||||
"player_settings",
|
||||
this
|
||||
)
|
||||
}
|
||||
uiSettings = loadData("ui_settings") ?: UserInterfaceSettings().apply {
|
||||
saveData(
|
||||
"ui_settings",
|
||||
this
|
||||
)
|
||||
}
|
||||
|
||||
playerView = findViewById(R.id.player_view)
|
||||
exoQuality = playerView.findViewById(R.id.exo_quality)
|
||||
|
@ -360,17 +383,20 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
requestedOrientation = rotation
|
||||
it.visibility = View.GONE
|
||||
}
|
||||
orientationListener = object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_UI) {
|
||||
override fun onOrientationChanged(orientation: Int) {
|
||||
if (orientation in 45..135) {
|
||||
if (rotation != ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE) exoRotate.visibility = View.VISIBLE
|
||||
rotation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
|
||||
} else if (orientation in 225..315) {
|
||||
if (rotation != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) exoRotate.visibility = View.VISIBLE
|
||||
rotation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
orientationListener =
|
||||
object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_UI) {
|
||||
override fun onOrientationChanged(orientation: Int) {
|
||||
if (orientation in 45..135) {
|
||||
if (rotation != ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE) exoRotate.visibility =
|
||||
View.VISIBLE
|
||||
rotation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE
|
||||
} else if (orientation in 225..315) {
|
||||
if (rotation != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) exoRotate.visibility =
|
||||
View.VISIBLE
|
||||
rotation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
orientationListener?.enable()
|
||||
}
|
||||
|
||||
|
@ -378,7 +404,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
|
||||
playerView.subtitleView?.alpha = when (settings.subtitles) {
|
||||
true -> 1f
|
||||
true -> 1f
|
||||
false -> 0f
|
||||
}
|
||||
val fontSize = settings.fontSize.toFloat()
|
||||
|
@ -401,7 +427,10 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
isTimeStampsLoaded = true
|
||||
exoSkipOpEd.visibility = if (it != null) {
|
||||
val adGroups = it.flatMap {
|
||||
listOf(it.interval.startTime.toLong() * 1000, it.interval.endTime.toLong() * 1000)
|
||||
listOf(
|
||||
it.interval.startTime.toLong() * 1000,
|
||||
it.interval.endTime.toLong() * 1000
|
||||
)
|
||||
}.toLongArray()
|
||||
val playedAdGroups = it.flatMap {
|
||||
listOf(false, false)
|
||||
|
@ -441,7 +470,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
// Picture-in-picture
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
pipEnabled = packageManager.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE) && settings.pip
|
||||
pipEnabled =
|
||||
packageManager.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE) && settings.pip
|
||||
if (pipEnabled) {
|
||||
exoPip.visibility = View.VISIBLE
|
||||
exoPip.setOnClickListener {
|
||||
|
@ -456,7 +486,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
val container = playerView.findViewById<View>(R.id.exo_controller_cont)
|
||||
val screen = playerView.findViewById<View>(R.id.exo_black_screen)
|
||||
val lockButton = playerView.findViewById<ImageButton>(R.id.exo_unlock)
|
||||
val timeline = playerView.findViewById<ExtendedTimeBar>(androidx.media3.ui.R.id.exo_progress)
|
||||
val timeline =
|
||||
playerView.findViewById<ExtendedTimeBar>(androidx.media3.ui.R.id.exo_progress)
|
||||
playerView.findViewById<ImageButton>(R.id.exo_lock).setOnClickListener {
|
||||
locked = true
|
||||
screen.visibility = View.GONE
|
||||
|
@ -496,17 +527,22 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
dialog.findViewById<Slider>(R.id.seekbar).addOnChangeListener { _, value, _ ->
|
||||
settings.skipTime = value.toInt()
|
||||
saveData(player, settings)
|
||||
playerView.findViewById<TextView>(R.id.exo_skip_time).text = settings.skipTime.toString()
|
||||
dialog.findViewById<TextView>(R.id.seekbar_value).text = settings.skipTime.toString()
|
||||
playerView.findViewById<TextView>(R.id.exo_skip_time).text =
|
||||
settings.skipTime.toString()
|
||||
dialog.findViewById<TextView>(R.id.seekbar_value).text =
|
||||
settings.skipTime.toString()
|
||||
}
|
||||
dialog.findViewById<Slider>(R.id.seekbar).addOnSliderTouchListener(object : Slider.OnSliderTouchListener {
|
||||
override fun onStartTrackingTouch(slider: Slider) {}
|
||||
override fun onStopTrackingTouch(slider: Slider) {
|
||||
dialog.dismiss()
|
||||
}
|
||||
})
|
||||
dialog.findViewById<TextView>(R.id.seekbar_title).text = getString(R.string.skip_time)
|
||||
dialog.findViewById<TextView>(R.id.seekbar_value).text = settings.skipTime.toString()
|
||||
dialog.findViewById<Slider>(R.id.seekbar)
|
||||
.addOnSliderTouchListener(object : Slider.OnSliderTouchListener {
|
||||
override fun onStartTrackingTouch(slider: Slider) {}
|
||||
override fun onStopTrackingTouch(slider: Slider) {
|
||||
dialog.dismiss()
|
||||
}
|
||||
})
|
||||
dialog.findViewById<TextView>(R.id.seekbar_title).text =
|
||||
getString(R.string.skip_time)
|
||||
dialog.findViewById<TextView>(R.id.seekbar_value).text =
|
||||
settings.skipTime.toString()
|
||||
@Suppress("DEPRECATION")
|
||||
dialog.window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
dialog.show()
|
||||
|
@ -521,7 +557,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
val brightnessRunnable = Runnable {
|
||||
if (exoBrightnessCont.alpha == 1f)
|
||||
lifecycleScope.launch {
|
||||
ObjectAnimator.ofFloat(exoBrightnessCont, "alpha", 1f, 0f).setDuration(gestureSpeed).start()
|
||||
ObjectAnimator.ofFloat(exoBrightnessCont, "alpha", 1f, 0f)
|
||||
.setDuration(gestureSpeed).start()
|
||||
delay(gestureSpeed)
|
||||
exoBrightnessCont.visibility = View.GONE
|
||||
checkNotch()
|
||||
|
@ -530,7 +567,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
val volumeRunnable = Runnable {
|
||||
if (exoVolumeCont.alpha == 1f)
|
||||
lifecycleScope.launch {
|
||||
ObjectAnimator.ofFloat(exoVolumeCont, "alpha", 1f, 0f).setDuration(gestureSpeed).start()
|
||||
ObjectAnimator.ofFloat(exoVolumeCont, "alpha", 1f, 0f).setDuration(gestureSpeed)
|
||||
.start()
|
||||
delay(gestureSpeed)
|
||||
exoVolumeCont.visibility = View.GONE
|
||||
checkNotch()
|
||||
|
@ -548,25 +586,65 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
fun handleController() {
|
||||
if (if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) !isInPictureInPictureMode else true) {
|
||||
if (playerView.isControllerFullyVisible) {
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_controller), "alpha", 1f, 0f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_controller),
|
||||
"alpha",
|
||||
1f,
|
||||
0f
|
||||
)
|
||||
.setDuration(controllerDuration).start()
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_bottom_cont), "translationY", 0f, 128f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_bottom_cont),
|
||||
"translationY",
|
||||
0f,
|
||||
128f
|
||||
)
|
||||
.apply { interpolator = overshoot;duration = controllerDuration;start() }
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_timeline_cont), "translationY", 0f, 128f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_timeline_cont),
|
||||
"translationY",
|
||||
0f,
|
||||
128f
|
||||
)
|
||||
.apply { interpolator = overshoot;duration = controllerDuration;start() }
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_top_cont), "translationY", 0f, -128f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_top_cont),
|
||||
"translationY",
|
||||
0f,
|
||||
-128f
|
||||
)
|
||||
.apply { interpolator = overshoot;duration = controllerDuration;start() }
|
||||
playerView.postDelayed({ playerView.hideController() }, controllerDuration)
|
||||
} else {
|
||||
checkNotch()
|
||||
playerView.showController()
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_controller), "alpha", 0f, 1f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_controller),
|
||||
"alpha",
|
||||
0f,
|
||||
1f
|
||||
)
|
||||
.setDuration(controllerDuration).start()
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_bottom_cont), "translationY", 128f, 0f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_bottom_cont),
|
||||
"translationY",
|
||||
128f,
|
||||
0f
|
||||
)
|
||||
.apply { interpolator = overshoot;duration = controllerDuration;start() }
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_timeline_cont), "translationY", 128f, 0f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_timeline_cont),
|
||||
"translationY",
|
||||
128f,
|
||||
0f
|
||||
)
|
||||
.apply { interpolator = overshoot;duration = controllerDuration;start() }
|
||||
ObjectAnimator.ofFloat(playerView.findViewById(R.id.exo_top_cont), "translationY", -128f, 0f)
|
||||
ObjectAnimator.ofFloat(
|
||||
playerView.findViewById(R.id.exo_top_cont),
|
||||
"translationY",
|
||||
-128f,
|
||||
0f
|
||||
)
|
||||
.apply { interpolator = overshoot;duration = controllerDuration;start() }
|
||||
}
|
||||
}
|
||||
|
@ -651,8 +729,10 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
}
|
||||
|
||||
if (!settings.doubleTap) {
|
||||
playerView.findViewById<View>(R.id.exo_fast_forward_button_cont).visibility = View.VISIBLE
|
||||
playerView.findViewById<View>(R.id.exo_fast_rewind_button_cont).visibility = View.VISIBLE
|
||||
playerView.findViewById<View>(R.id.exo_fast_forward_button_cont).visibility =
|
||||
View.VISIBLE
|
||||
playerView.findViewById<View>(R.id.exo_fast_rewind_button_cont).visibility =
|
||||
View.VISIBLE
|
||||
playerView.findViewById<ImageButton>(R.id.exo_fast_forward_button).setOnClickListener {
|
||||
if (isInitialized) {
|
||||
seek(true)
|
||||
|
@ -696,7 +776,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
exoBrightness.addOnChangeListener { _, value, _ ->
|
||||
val lp = window.attributes
|
||||
lp.screenBrightness = brightnessConverter((value.takeIf { !it.isNaN() } ?: 0f) / 10, false)
|
||||
lp.screenBrightness =
|
||||
brightnessConverter((value.takeIf { !it.isNaN() } ?: 0f) / 10, false)
|
||||
window.attributes = lp
|
||||
brightnessHide()
|
||||
}
|
||||
|
@ -757,7 +838,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onSingleClick(event: MotionEvent) = if (isSeeking) doubleTap(false, event) else handleController()
|
||||
override fun onSingleClick(event: MotionEvent) =
|
||||
if (isSeeking) doubleTap(false, event) else handleController()
|
||||
})
|
||||
val rewindArea = playerView.findViewById<View>(R.id.exo_rewind_area)
|
||||
rewindArea.isClickable = true
|
||||
|
@ -786,7 +868,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onSingleClick(event: MotionEvent) = if (isSeeking) doubleTap(true, event) else handleController()
|
||||
override fun onSingleClick(event: MotionEvent) =
|
||||
if (isSeeking) doubleTap(true, event) else handleController()
|
||||
})
|
||||
val forwardArea = playerView.findViewById<View>(R.id.exo_forward_area)
|
||||
forwardArea.isClickable = true
|
||||
|
@ -817,7 +900,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
}
|
||||
|
||||
model.watchSources = if (media.isAdult) HAnimeSources else AnimeSources
|
||||
serverInfo.text = model.watchSources!!.names.getOrNull(media.selected!!.sourceIndex) ?: model.watchSources!!.names[0]
|
||||
serverInfo.text = model.watchSources!!.names.getOrNull(media.selected!!.sourceIndex)
|
||||
?: model.watchSources!!.names[0]
|
||||
|
||||
model.epChanged.observe(this) {
|
||||
epChanging = !it
|
||||
|
@ -906,7 +990,10 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
rpc?.send {
|
||||
type = RPC.Type.WATCHING
|
||||
activityName = media.userPreferredName
|
||||
details = ep.title?.takeIf { it.isNotEmpty() } ?: getString(R.string.episode_num, ep.number)
|
||||
details = ep.title?.takeIf { it.isNotEmpty() } ?: getString(
|
||||
R.string.episode_num,
|
||||
ep.number
|
||||
)
|
||||
state = "Episode : ${ep.number}/${media.anime?.totalEpisodes ?: "??"}"
|
||||
media.cover?.let { cover ->
|
||||
largeImage = RPC.Link(media.userPreferredName, cover)
|
||||
|
@ -922,25 +1009,25 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
//FullScreen
|
||||
isFullscreen = loadData("${media.id}_fullscreenInt", this) ?: isFullscreen
|
||||
playerView.resizeMode = when (isFullscreen) {
|
||||
0 -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
1 -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM
|
||||
2 -> AspectRatioFrameLayout.RESIZE_MODE_FILL
|
||||
0 -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
1 -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM
|
||||
2 -> AspectRatioFrameLayout.RESIZE_MODE_FILL
|
||||
else -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
}
|
||||
|
||||
exoScreen.setOnClickListener {
|
||||
if (isFullscreen < 2) isFullscreen += 1 else isFullscreen = 0
|
||||
playerView.resizeMode = when (isFullscreen) {
|
||||
0 -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
1 -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM
|
||||
2 -> AspectRatioFrameLayout.RESIZE_MODE_FILL
|
||||
0 -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
1 -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM
|
||||
2 -> AspectRatioFrameLayout.RESIZE_MODE_FILL
|
||||
else -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
}
|
||||
snackString(
|
||||
when (isFullscreen) {
|
||||
0 -> "Original"
|
||||
1 -> "Zoom"
|
||||
2 -> "Stretch"
|
||||
0 -> "Original"
|
||||
1 -> "Zoom"
|
||||
2 -> "Stretch"
|
||||
else -> "Original"
|
||||
}
|
||||
)
|
||||
|
@ -959,7 +1046,11 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
//Settings
|
||||
exoSettings.setOnClickListener {
|
||||
saveData("${media.id}_${media.anime!!.selectedEpisode}", exoPlayer.currentPosition, this)
|
||||
saveData(
|
||||
"${media.id}_${media.anime!!.selectedEpisode}",
|
||||
exoPlayer.currentPosition,
|
||||
this
|
||||
)
|
||||
val intent = Intent(this, PlayerSettingsActivity::class.java).apply {
|
||||
putExtra("subtitle", subtitle)
|
||||
}
|
||||
|
@ -979,7 +1070,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
playbackParameters = PlaybackParameters(speeds[curSpeed])
|
||||
var speed: Float
|
||||
val speedDialog = AlertDialog.Builder(this, R.style.DialogTheme).setTitle(getString(R.string.speed))
|
||||
val speedDialog =
|
||||
AlertDialog.Builder(this, R.style.DialogTheme).setTitle(getString(R.string.speed))
|
||||
exoSpeed.setOnClickListener {
|
||||
speedDialog.setSingleChoiceItems(speedsName, curSpeed) { dialog, i ->
|
||||
if (isInitialized) {
|
||||
|
@ -1018,16 +1110,19 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
isFullscreen = settings.resize
|
||||
playerView.resizeMode = when (settings.resize) {
|
||||
0 -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
1 -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM
|
||||
2 -> AspectRatioFrameLayout.RESIZE_MODE_FILL
|
||||
0 -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
1 -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM
|
||||
2 -> AspectRatioFrameLayout.RESIZE_MODE_FILL
|
||||
else -> AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
}
|
||||
|
||||
preloading = false
|
||||
val showProgressDialog = if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog") ?: true else false
|
||||
val showProgressDialog =
|
||||
if (settings.askIndividual) loadData<Boolean>("${media.id}_progressDialog")
|
||||
?: true else false
|
||||
if (showProgressDialog && Anilist.userid != null && if (media.isAdult) settings.updateForH else true)
|
||||
AlertDialog.Builder(this, R.style.DialogTheme).setTitle(getString(R.string.auto_update, media.userPreferredName))
|
||||
AlertDialog.Builder(this, R.style.DialogTheme)
|
||||
.setTitle(getString(R.string.auto_update, media.userPreferredName))
|
||||
.apply {
|
||||
setOnCancelListener { hideSystemBars() }
|
||||
setCancelable(false)
|
||||
|
@ -1074,16 +1169,16 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
|
||||
subtitle = intent.getSerialized("subtitle")
|
||||
?: when (val subLang: String? = loadData("subLang_${media.id}", this)) {
|
||||
null -> {
|
||||
null -> {
|
||||
when (episode.selectedSubtitle) {
|
||||
null -> null
|
||||
-1 -> ext.subtitles.find { it.language.trim() == "English" || it.language == "en-US" }
|
||||
-1 -> ext.subtitles.find { it.language.trim() == "English" || it.language == "en-US" }
|
||||
else -> ext.subtitles.getOrNull(episode.selectedSubtitle!!)
|
||||
}
|
||||
}
|
||||
|
||||
"None" -> ext.subtitles.let { null }
|
||||
else -> ext.subtitles.find { it.language == subLang }
|
||||
else -> ext.subtitles.find { it.language == subLang }
|
||||
}
|
||||
|
||||
//Subtitles
|
||||
|
@ -1091,21 +1186,44 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
exoSubtitle.setOnClickListener {
|
||||
subClick()
|
||||
}
|
||||
|
||||
var sub: MediaItem.SubtitleConfiguration? = null
|
||||
if (subtitle != null) {
|
||||
sub = MediaItem.SubtitleConfiguration
|
||||
.Builder(Uri.parse(subtitle!!.file.url))
|
||||
.setSelectionFlags(C.SELECTION_FLAG_FORCED)
|
||||
.setMimeType(
|
||||
when (subtitle?.type) {
|
||||
SubtitleType.VTT -> MimeTypes.TEXT_VTT
|
||||
SubtitleType.ASS -> MimeTypes.TEXT_SSA
|
||||
SubtitleType.SRT -> MimeTypes.APPLICATION_SUBRIP
|
||||
else -> MimeTypes.TEXT_UNKNOWN
|
||||
}
|
||||
)
|
||||
.build()
|
||||
//var localFile: String? = null
|
||||
if (subtitle?.type == SubtitleType.UNKNOWN) {
|
||||
val context = this
|
||||
runBlocking {
|
||||
val type = SubtitleDownloader.downloadSubtitles(context, subtitle!!.file.url)
|
||||
val fileUri = Uri.parse(subtitle!!.file.url)
|
||||
sub = MediaItem.SubtitleConfiguration
|
||||
.Builder(fileUri)
|
||||
.setSelectionFlags(C.SELECTION_FLAG_DEFAULT)
|
||||
.setMimeType(
|
||||
when (type) {
|
||||
SubtitleType.VTT -> MimeTypes.TEXT_SSA
|
||||
SubtitleType.ASS -> MimeTypes.TEXT_SSA
|
||||
SubtitleType.SRT -> MimeTypes.TEXT_SSA
|
||||
else -> MimeTypes.TEXT_SSA
|
||||
}
|
||||
)
|
||||
.setId("2")
|
||||
.build()
|
||||
}
|
||||
println("sub: $sub")
|
||||
} else {
|
||||
sub = MediaItem.SubtitleConfiguration
|
||||
.Builder(Uri.parse(subtitle!!.file.url))
|
||||
.setSelectionFlags(C.SELECTION_FLAG_FORCED)
|
||||
.setMimeType(
|
||||
when (subtitle?.type) {
|
||||
SubtitleType.VTT -> MimeTypes.TEXT_VTT
|
||||
SubtitleType.ASS -> MimeTypes.TEXT_SSA
|
||||
SubtitleType.SRT -> MimeTypes.APPLICATION_SUBRIP
|
||||
else -> MimeTypes.TEXT_UNKNOWN
|
||||
}
|
||||
)
|
||||
.setId("2")
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
|
@ -1113,7 +1231,9 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
}
|
||||
|
||||
val but = playerView.findViewById<ImageButton>(R.id.exo_download)
|
||||
if (video?.format == VideoType.CONTAINER || (loadData<Int>("settings_download_manager") ?: 0) != 0) {
|
||||
if (video?.format == VideoType.CONTAINER || (loadData<Int>("settings_download_manager")
|
||||
?: 0) != 0
|
||||
) {
|
||||
but.visibility = View.VISIBLE
|
||||
but.setOnClickListener {
|
||||
download(this, episode, animeTitle.text.toString())
|
||||
|
@ -1146,12 +1266,15 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
val mimeType = when (video?.format) {
|
||||
VideoType.M3U8 -> MimeTypes.APPLICATION_M3U8
|
||||
VideoType.DASH -> MimeTypes.APPLICATION_MPD
|
||||
else -> MimeTypes.APPLICATION_MP4
|
||||
else -> MimeTypes.APPLICATION_MP4
|
||||
}
|
||||
|
||||
val builder = MediaItem.Builder().setUri(video!!.file.url).setMimeType(mimeType)
|
||||
|
||||
if (sub != null) builder.setSubtitleConfigurations(mutableListOf(sub))
|
||||
if (sub != null) {
|
||||
val listofnotnullsubs = immutableListOf(sub).filterNotNull()
|
||||
builder.setSubtitleConfigurations(listofnotnullsubs)
|
||||
}
|
||||
mediaItem = builder.build()
|
||||
|
||||
//Source
|
||||
|
@ -1163,8 +1286,22 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
trackSelector = DefaultTrackSelector(this)
|
||||
trackSelector.setParameters(
|
||||
trackSelector.buildUponParameters()
|
||||
.setMinVideoSize(loadData("maxWidth", this) ?: 720, loadData("maxHeight", this) ?: 480)
|
||||
.setAllowVideoMixedMimeTypeAdaptiveness(true)
|
||||
.setAllowVideoNonSeamlessAdaptiveness(true)
|
||||
.setSelectUndeterminedTextLanguage(true)
|
||||
.setAllowAudioMixedMimeTypeAdaptiveness(true)
|
||||
.setAllowMultipleAdaptiveSelections(true)
|
||||
.setPreferredTextLanguage(subtitle?.language ?: "en")
|
||||
.setPreferredTextRoleFlags(C.ROLE_FLAG_SUBTITLE)
|
||||
.setRendererDisabled(C.TRACK_TYPE_VIDEO, false)
|
||||
.setRendererDisabled(C.TRACK_TYPE_AUDIO, false)
|
||||
.setRendererDisabled(C.TRACK_TYPE_TEXT, false)
|
||||
.setMinVideoSize(
|
||||
loadData("maxWidth", this) ?: 720,
|
||||
loadData("maxHeight", this) ?: 480
|
||||
)
|
||||
.setMaxVideoSize(1, 1)
|
||||
//.setOverrideForType(
|
||||
)
|
||||
|
||||
if (playbackPosition != 0L && !changingServer && !settings.alwaysContinue) {
|
||||
|
@ -1181,7 +1318,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
)
|
||||
)
|
||||
)
|
||||
AlertDialog.Builder(this, R.style.DialogTheme).setTitle(getString(R.string.continue_from, time)).apply {
|
||||
AlertDialog.Builder(this, R.style.DialogTheme)
|
||||
.setTitle(getString(R.string.continue_from, time)).apply {
|
||||
setCancelable(false)
|
||||
setPositiveButton(getString(R.string.yes)) { d, _ ->
|
||||
buildExoplayer()
|
||||
|
@ -1221,8 +1359,34 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
}
|
||||
|
||||
exoPlayer.addListener(this)
|
||||
exoPlayer.addAnalyticsListener(EventLogger())
|
||||
isInitialized = true
|
||||
}
|
||||
/*private fun selectSubtitleTrack() {
|
||||
// Get the current track groups
|
||||
val trackGroups = exoPlayer.currentTrackGroups
|
||||
|
||||
// Prepare a track selector parameters builder
|
||||
val parametersBuilder = DefaultTrackSelector.ParametersBuilder(this)
|
||||
|
||||
// Iterate through the track groups to find the subtitle tracks
|
||||
for (i in 0 until trackGroups.length) {
|
||||
val trackGroup = trackGroups[i]
|
||||
for (j in 0 until trackGroup.length) {
|
||||
val trackMetadata = trackGroup.getFormat(j)
|
||||
|
||||
// Check if the track is a subtitle track
|
||||
if (MimeTypes.isText(trackMetadata.sampleMimeType)) {
|
||||
parametersBuilder.setRendererDisabled(i, false) // Enable the renderer for this track group
|
||||
parametersBuilder.setSelectionOverride(i, trackGroups, DefaultTrackSelector.SelectionOverride(j, 0)) // Override to select this track
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Apply the track selector parameters to select the subtitle
|
||||
trackSelector.setParameters(parametersBuilder)
|
||||
}*/
|
||||
|
||||
private fun releasePlayer() {
|
||||
isPlayerPlaying = exoPlayer.playWhenReady
|
||||
|
@ -1266,7 +1430,11 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
orientationListener?.disable()
|
||||
if (isInitialized) {
|
||||
playerView.player?.pause()
|
||||
saveData("${media.id}_${media.anime!!.selectedEpisode}", exoPlayer.currentPosition, this)
|
||||
saveData(
|
||||
"${media.id}_${media.anime!!.selectedEpisode}",
|
||||
exoPlayer.currentPosition,
|
||||
this
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1304,7 +1472,8 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
playerView.keepScreenOn = isPlaying
|
||||
(exoPlay.drawable as Animatable?)?.start()
|
||||
if (!this.isDestroyed) Glide.with(this)
|
||||
.load(if (isPlaying) R.drawable.anim_play_to_pause else R.drawable.anim_pause_to_play).into(exoPlay)
|
||||
.load(if (isPlaying) R.drawable.anim_play_to_pause else R.drawable.anim_pause_to_play)
|
||||
.into(exoPlay)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1383,7 +1552,10 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
exoPlayer.seekTo((new.interval.endTime * 1000).toLong())
|
||||
}
|
||||
}
|
||||
if (settings.autoSkipOPED && (new.skipType == "op" || new.skipType == "ed") && !skippedTimeStamps.contains(new)) {
|
||||
if (settings.autoSkipOPED && (new.skipType == "op" || new.skipType == "ed") && !skippedTimeStamps.contains(
|
||||
new
|
||||
)
|
||||
) {
|
||||
exoPlayer.seekTo((new.interval.endTime * 1000).toLong())
|
||||
skippedTimeStamps.add(new)
|
||||
}
|
||||
|
@ -1426,6 +1598,7 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
private var isBuffering = true
|
||||
override fun onPlaybackStateChanged(playbackState: Int) {
|
||||
if (playbackState == ExoPlayer.STATE_READY) {
|
||||
|
||||
exoPlayer.play()
|
||||
if (episodeLength == 0f) {
|
||||
episodeLength = exoPlayer.duration.toFloat()
|
||||
|
@ -1453,7 +1626,9 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
var i = 1
|
||||
while (isFiller) {
|
||||
if (episodeArr.size > currentEpisodeIndex + i) {
|
||||
isFiller = if (settings.autoSkipFiller) episodes[episodeArr[currentEpisodeIndex + i]]?.filler ?: false else false
|
||||
isFiller =
|
||||
if (settings.autoSkipFiller) episodes[episodeArr[currentEpisodeIndex + i]]?.filler
|
||||
?: false else false
|
||||
if (!isFiller) runnable.invoke(i)
|
||||
i++
|
||||
} else {
|
||||
|
@ -1509,7 +1684,10 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
shareVideo.setDataAndType(Uri.parse(videoURL), "video/*")
|
||||
shareVideo.setPackage("com.instantbits.cast.webvideo")
|
||||
if (subtitle != null) shareVideo.putExtra("subtitle", subtitle!!.file.url)
|
||||
shareVideo.putExtra("title", media.userPreferredName + " : Ep " + episodeTitleArr[currentEpisodeIndex])
|
||||
shareVideo.putExtra(
|
||||
"title",
|
||||
media.userPreferredName + " : Ep " + episodeTitleArr[currentEpisodeIndex]
|
||||
)
|
||||
shareVideo.putExtra("poster", episode.thumb?.url ?: media.cover)
|
||||
val headers = Bundle()
|
||||
defaultHeaders.forEach {
|
||||
|
@ -1579,7 +1757,10 @@ class ExoplayerView : AppCompatActivity(), Player.Listener {
|
|||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration) {
|
||||
override fun onPictureInPictureModeChanged(
|
||||
isInPictureInPictureMode: Boolean,
|
||||
newConfig: Configuration
|
||||
) {
|
||||
onPiPChanged(isInPictureInPictureMode)
|
||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import ani.dantotsu.media.MediaDetailsViewModel
|
|||
import ani.dantotsu.others.Download.download
|
||||
import ani.dantotsu.parsers.VideoExtractor
|
||||
import ani.dantotsu.parsers.VideoType
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
|
@ -174,7 +174,9 @@ class MangaReadAdapter(
|
|||
val anilistEp = (media.userProgress ?: 0).plus(1)
|
||||
val appEp = loadData<String>("${media.id}_current_chp")?.toIntOrNull() ?: 1
|
||||
var continueEp = (if (anilistEp > appEp) anilistEp else appEp).toString()
|
||||
if (chapters.contains(continueEp)) {
|
||||
val formattedChapters = chapters.map { MangaNameAdapter.findChapterNumber(it)?.toInt()?.toString() }
|
||||
if (formattedChapters.contains(continueEp)) {
|
||||
continueEp = chapters[formattedChapters.indexOf(continueEp)]
|
||||
binding.animeSourceContinue.visibility = View.VISIBLE
|
||||
handleProgress(
|
||||
binding.itemEpisodeProgressCont,
|
||||
|
|
|
@ -116,10 +116,10 @@ abstract class BaseImageAdapter(
|
|||
abstract suspend fun loadImage(position: Int, parent: View): Boolean
|
||||
|
||||
companion object {
|
||||
/*suspend fun Context.loadBitmap(link: FileUrl, transforms: List<BitmapTransformation>): Bitmap? {
|
||||
suspend fun Context.loadBitmap_old(link: FileUrl, transforms: List<BitmapTransformation>): Bitmap? {
|
||||
return tryWithSuspend {
|
||||
withContext(Dispatchers.IO) {
|
||||
Glide.with(this@loadBitmap)
|
||||
Glide.with(this@loadBitmap_old)
|
||||
.asBitmap()
|
||||
.let {
|
||||
if (link.url.startsWith("file://")) {
|
||||
|
@ -142,7 +142,7 @@ abstract class BaseImageAdapter(
|
|||
.get()
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
suspend fun Context.loadBitmap(link: FileUrl, transforms: List<BitmapTransformation>): Bitmap? {
|
||||
return tryWithSuspend {
|
||||
|
|
|
@ -45,6 +45,7 @@ import ani.dantotsu.settings.CurrentReaderSettings.DualPageModes.*
|
|||
import ani.dantotsu.settings.CurrentReaderSettings.Layouts.*
|
||||
import ani.dantotsu.settings.ReaderSettings
|
||||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.alexvasilkov.gestures.views.GestureFrameLayout
|
||||
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation
|
||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||
|
@ -125,6 +126,7 @@ class MangaReaderActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityMangaReaderBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import ani.dantotsu.loadImage
|
|||
import ani.dantotsu.media.MediaDetailsViewModel
|
||||
import ani.dantotsu.others.getSerialized
|
||||
import ani.dantotsu.parsers.ShowResponse
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import ani.dantotsu.settings.CurrentReaderSettings
|
|||
import ani.dantotsu.settings.NovelReaderSettings
|
||||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import ani.dantotsu.tryWith
|
||||
import com.google.android.material.slider.Slider
|
||||
import com.vipulog.ebookreader.Book
|
||||
|
@ -135,6 +136,7 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityNovelReaderBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import androidx.lifecycle.lifecycleScope
|
|||
import ani.dantotsu.R
|
||||
import ani.dantotsu.Refresh
|
||||
import ani.dantotsu.databinding.ActivityListBinding
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -26,6 +27,7 @@ class ListActivity : AppCompatActivity() {
|
|||
@SuppressLint("SetTextI18n")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityListBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import ani.dantotsu.databinding.FragmentListBinding
|
|||
import ani.dantotsu.media.Media
|
||||
import ani.dantotsu.media.MediaAdaptor
|
||||
import ani.dantotsu.media.OtherDetailsViewModel
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
||||
class ListFragment : Fragment() {
|
||||
private var _binding: FragmentListBinding? = null
|
||||
|
|
|
@ -11,13 +11,14 @@ import ani.dantotsu.BottomSheetDialogFragment
|
|||
import ani.dantotsu.FileUrl
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.databinding.BottomSheetImageBinding
|
||||
import ani.dantotsu.media.manga.mangareader.BaseImageAdapter.Companion.loadBitmap
|
||||
import ani.dantotsu.media.manga.mangareader.BaseImageAdapter.Companion.loadBitmap_old
|
||||
import ani.dantotsu.media.manga.mangareader.BaseImageAdapter.Companion.mergeBitmap
|
||||
import ani.dantotsu.openLinkInBrowser
|
||||
import ani.dantotsu.saveImageToDownloads
|
||||
import ani.dantotsu.setSafeOnClickListener
|
||||
import ani.dantotsu.shareImage
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import ani.dantotsu.toast
|
||||
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation
|
||||
import com.davemorrissey.labs.subscaleview.ImageSource
|
||||
|
@ -76,8 +77,8 @@ class ImageViewDialog : BottomSheetDialogFragment() {
|
|||
lifecycleScope.launch {
|
||||
val binding = _binding ?: return@launch
|
||||
|
||||
var bitmap = requireContext().loadBitmap(image, trans1 ?: listOf())
|
||||
val bitmap2 = if (image2 != null) requireContext().loadBitmap(image2, trans2 ?: listOf()) else null
|
||||
var bitmap = requireContext().loadBitmap_old(image, trans1 ?: listOf())
|
||||
val bitmap2 = if (image2 != null) requireContext().loadBitmap_old(image2, trans2 ?: listOf()) else null
|
||||
|
||||
bitmap = if (bitmap2 != null && bitmap != null) mergeBitmap(bitmap, bitmap2,) else bitmap
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import ani.dantotsu.R
|
|||
import ani.dantotsu.connections.anilist.Anilist
|
||||
import ani.dantotsu.databinding.ActivityImageSearchBinding
|
||||
import ani.dantotsu.media.MediaDetailsActivity
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import ani.dantotsu.toast
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -46,6 +47,7 @@ class ImageSearchActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityImageSearchBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -32,8 +32,10 @@ abstract class AnimeParser : BaseParser() {
|
|||
* Returns null, if no latest episode is found.
|
||||
* **/
|
||||
open suspend fun getLatestEpisode(animeLink: String, extra: Map<String, String>?, sAnime: SAnime, latest: Float): Episode?{
|
||||
return loadEpisodes(animeLink, extra, sAnime)
|
||||
val episodes = loadEpisodes(animeLink, extra, sAnime)
|
||||
val max = episodes
|
||||
.maxByOrNull { it.number.toFloatOrNull()?:0f }
|
||||
return max
|
||||
?.takeIf { latest < (it.number.toFloatOrNull() ?: 0.001f) }
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,10 @@ import kotlinx.coroutines.async
|
|||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.coroutines.withContext
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.io.OutputStream
|
||||
|
@ -498,7 +501,24 @@ class VideoServerPassthrough(val videoServer: VideoServer) : VideoExtractor() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun TrackToSubtitle(track: Track, type: SubtitleType = SubtitleType.VTT): Subtitle {
|
||||
return Subtitle(track.lang, track.url, type)
|
||||
private fun TrackToSubtitle(track: Track): Subtitle {
|
||||
//use Dispatchers.IO to make a HTTP request to determine the subtitle type
|
||||
var type: SubtitleType? = null
|
||||
runBlocking {
|
||||
type = findSubtitleType(track.url)
|
||||
}
|
||||
return Subtitle(track.lang, track.url, type?: SubtitleType.SRT)
|
||||
}
|
||||
|
||||
private fun findSubtitleType(url: String): SubtitleType? {
|
||||
// First, try to determine the type based on the URL file extension
|
||||
var type: SubtitleType? = when {
|
||||
url.endsWith(".vtt", true) -> SubtitleType.VTT
|
||||
url.endsWith(".ass", true) -> SubtitleType.ASS
|
||||
url.endsWith(".srt", true) -> SubtitleType.SRT
|
||||
else -> SubtitleType.UNKNOWN
|
||||
}
|
||||
|
||||
return type
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package ani.dantotsu.parsers
|
|||
import android.graphics.Bitmap
|
||||
import ani.dantotsu.FileUrl
|
||||
import ani.dantotsu.media.Media
|
||||
import ani.dantotsu.media.manga.MangaNameAdapter
|
||||
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
|
@ -23,9 +24,11 @@ abstract class MangaParser : BaseParser() {
|
|||
* Returns null, if no latest chapter is found.
|
||||
* **/
|
||||
open suspend fun getLatestChapter(mangaLink: String, extra: Map<String, String>?, sManga: SManga, latest: Float): MangaChapter? {
|
||||
return loadChapters(mangaLink, extra, sManga)
|
||||
.maxByOrNull { it.number.toFloatOrNull() ?: 0f }
|
||||
?.takeIf { latest < (it.number.toFloatOrNull() ?: 0.001f) }
|
||||
val chapter = loadChapters(mangaLink, extra, sManga)
|
||||
val max = chapter
|
||||
.maxByOrNull { MangaNameAdapter.findChapterNumber(it.number) ?: 0f }
|
||||
return max
|
||||
?.takeIf { latest < (MangaNameAdapter.findChapterNumber(it.number) ?: 0.001f) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,22 +36,6 @@ abstract class MangaParser : BaseParser() {
|
|||
* **/
|
||||
abstract suspend fun loadImages(chapterLink: String, sChapter: SChapter): List<MangaImage>
|
||||
|
||||
/*override suspend fun autoSearch(mediaObj: Media): ShowResponse? {
|
||||
var response = loadSavedShowResponse(mediaObj.id)
|
||||
if (response != null) {
|
||||
saveShowResponse(mediaObj.id, response, true)
|
||||
} else {
|
||||
setUserText("Searching : ${mediaObj.mangaName()}")
|
||||
response = search(mediaObj.mangaName()).let { if (it.isNotEmpty()) it[0] else null }
|
||||
|
||||
if (response == null) {
|
||||
setUserText("Searching : ${mediaObj.nameRomaji}")
|
||||
response = search(mediaObj.nameRomaji).let { if (it.isNotEmpty()) it[0] else null }
|
||||
}
|
||||
saveShowResponse(mediaObj.id, response)
|
||||
}
|
||||
return response
|
||||
}*/
|
||||
|
||||
open fun getTransformation(): BitmapTransformation? = null
|
||||
}
|
||||
|
|
|
@ -159,5 +159,5 @@ enum class VideoType{
|
|||
}
|
||||
|
||||
enum class SubtitleType{
|
||||
VTT, ASS, SRT
|
||||
VTT, ASS, SRT, UNKNOWN
|
||||
}
|
|
@ -23,6 +23,7 @@ import ani.dantotsu.R
|
|||
import ani.dantotsu.databinding.FragmentAnimeExtensionsBinding
|
||||
import ani.dantotsu.loadData
|
||||
import com.bumptech.glide.Glide
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||
import eu.kanade.tachiyomi.extension.anime.AnimeExtensionManager
|
||||
import eu.kanade.tachiyomi.extension.anime.model.AnimeExtension
|
||||
|
@ -67,13 +68,14 @@ class AnimeExtensionsFragment : Fragment(),
|
|||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{ error ->
|
||||
FirebaseCrashlytics.getInstance().recordException(error)
|
||||
Log.e("AnimeExtensionsAdapter", "Error: ", error) // Log the error
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
Notifications.CHANNEL_DOWNLOADER_ERROR
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_info_24)
|
||||
.setContentTitle("Update failed")
|
||||
.setContentTitle("Update failed: ${error.message}")
|
||||
.setContentText("Error: ${error.message}")
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
notificationManager.notify(1, builder.build())
|
||||
|
@ -97,48 +99,51 @@ class AnimeExtensionsFragment : Fragment(),
|
|||
}, skipIcons)
|
||||
|
||||
private val allExtensionsAdapter = AllAnimeExtensionsAdapter(lifecycleScope, { pkgName ->
|
||||
val context = requireContext()
|
||||
if (isAdded) {
|
||||
val notificationManager =
|
||||
requireContext().getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
val notificationManager =
|
||||
requireContext().getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
// Start the installation process
|
||||
animeExtensionManager.installExtension(pkgName)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ installStep ->
|
||||
val builder = NotificationCompat.Builder(
|
||||
requireContext(),
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_sync_24)
|
||||
.setContentTitle("Installing extension")
|
||||
.setContentText("Step: $installStep")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{ error ->
|
||||
val builder = NotificationCompat.Builder(
|
||||
requireContext(),
|
||||
Notifications.CHANNEL_DOWNLOADER_ERROR
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_info_24)
|
||||
.setContentTitle("Installation failed")
|
||||
.setContentText("Error: ${error.message}")
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{
|
||||
val builder = NotificationCompat.Builder(
|
||||
requireContext(),
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(androidx.media3.ui.R.drawable.exo_ic_check)
|
||||
.setContentTitle("Installation complete")
|
||||
.setContentText("The extension has been successfully installed.")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
}
|
||||
)
|
||||
// Start the installation process
|
||||
animeExtensionManager.installExtension(pkgName)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ installStep ->
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_sync_24)
|
||||
.setContentTitle("Installing extension")
|
||||
.setContentText("Step: $installStep")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{ error ->
|
||||
FirebaseCrashlytics.getInstance().recordException(error)
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
Notifications.CHANNEL_DOWNLOADER_ERROR
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_info_24)
|
||||
.setContentTitle("Installation failed: ${error.message}")
|
||||
.setContentText("Error: ${error.message}")
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(androidx.media3.ui.R.drawable.exo_ic_check)
|
||||
.setContentTitle("Installation complete")
|
||||
.setContentText("The extension has been successfully installed.")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
}
|
||||
)
|
||||
}
|
||||
}, skipIcons)
|
||||
|
||||
override fun onCreateView(
|
||||
|
|
|
@ -34,6 +34,7 @@ import eu.kanade.tachiyomi.extension.anime.model.AnimeExtension
|
|||
import ani.dantotsu.databinding.ActivityExtensionsBinding
|
||||
import ani.dantotsu.home.AnimeFragment
|
||||
import ani.dantotsu.home.MangaFragment
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.bumptech.glide.Glide
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
|
@ -60,6 +61,7 @@ class ExtensionsActivity : AppCompatActivity() {
|
|||
@SuppressLint("SetTextI18n")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityExtensionsBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import ani.dantotsu.R
|
|||
import ani.dantotsu.currContext
|
||||
import ani.dantotsu.databinding.ActivityFaqBinding
|
||||
import ani.dantotsu.initActivity
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
||||
class FAQActivity : AppCompatActivity() {
|
||||
private lateinit var binding: ActivityFaqBinding
|
||||
|
@ -104,6 +105,7 @@ class FAQActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityFaqBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import ani.dantotsu.databinding.FragmentMangaBinding
|
|||
import ani.dantotsu.databinding.FragmentMangaExtensionsBinding
|
||||
import ani.dantotsu.loadData
|
||||
import com.bumptech.glide.Glide
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||
import eu.kanade.tachiyomi.extension.manga.MangaExtensionManager
|
||||
import eu.kanade.tachiyomi.extension.manga.model.MangaExtension
|
||||
|
@ -67,6 +68,7 @@ class MangaExtensionsFragment : Fragment(),
|
|||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{ error ->
|
||||
FirebaseCrashlytics.getInstance().recordException(error)
|
||||
Log.e("MangaExtensionsAdapter", "Error: ", error) // Log the error
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
|
@ -98,48 +100,51 @@ class MangaExtensionsFragment : Fragment(),
|
|||
|
||||
private val allExtensionsAdapter =
|
||||
AllMangaExtensionsAdapter(lifecycleScope, { pkgName ->
|
||||
if (isAdded) { // Check if the fragment is currently added to its activity
|
||||
val context = requireContext()
|
||||
val notificationManager =
|
||||
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
val notificationManager =
|
||||
requireContext().getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
// Start the installation process
|
||||
mangaExtensionManager.installExtension(pkgName)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ installStep ->
|
||||
val builder = NotificationCompat.Builder(
|
||||
requireContext(),
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_sync_24)
|
||||
.setContentTitle("Installing extension")
|
||||
.setContentText("Step: $installStep")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{ error ->
|
||||
val builder = NotificationCompat.Builder(
|
||||
requireContext(),
|
||||
Notifications.CHANNEL_DOWNLOADER_ERROR
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_info_24)
|
||||
.setContentTitle("Installation failed")
|
||||
.setContentText("Error: ${error.message}")
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{
|
||||
val builder = NotificationCompat.Builder(
|
||||
requireContext(),
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(androidx.media3.ui.R.drawable.exo_ic_check)
|
||||
.setContentTitle("Installation complete")
|
||||
.setContentText("The extension has been successfully installed.")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
}
|
||||
)
|
||||
// Start the installation process
|
||||
mangaExtensionManager.installExtension(pkgName)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
{ installStep ->
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_sync_24)
|
||||
.setContentTitle("Installing extension")
|
||||
.setContentText("Step: $installStep")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{ error ->
|
||||
FirebaseCrashlytics.getInstance().recordException(error)
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
Notifications.CHANNEL_DOWNLOADER_ERROR
|
||||
)
|
||||
.setSmallIcon(R.drawable.ic_round_info_24)
|
||||
.setContentTitle("Installation failed: ${error.message}")
|
||||
.setContentText("Error: ${error.message}")
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
notificationManager.notify(1, builder.build())
|
||||
},
|
||||
{
|
||||
val builder = NotificationCompat.Builder(
|
||||
context,
|
||||
Notifications.CHANNEL_DOWNLOADER_PROGRESS
|
||||
)
|
||||
.setSmallIcon(androidx.media3.ui.R.drawable.exo_ic_check)
|
||||
.setContentTitle("Installation complete")
|
||||
.setContentText("The extension has been successfully installed.")
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
notificationManager.notify(1, builder.build())
|
||||
}
|
||||
)
|
||||
}
|
||||
}, skipIcons)
|
||||
|
||||
override fun onCreateView(
|
||||
|
|
|
@ -16,6 +16,7 @@ import ani.dantotsu.databinding.ActivityPlayerSettingsBinding
|
|||
import ani.dantotsu.media.Media
|
||||
import ani.dantotsu.others.getSerialized
|
||||
import ani.dantotsu.parsers.Subtitle
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
@ -30,6 +31,7 @@ class PlayerSettingsActivity : AppCompatActivity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityPlayerSettingsBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -12,12 +12,14 @@ import ani.dantotsu.navBarHeight
|
|||
import ani.dantotsu.saveData
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.statusBarHeight
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
||||
class ReaderSettingsActivity : AppCompatActivity() {
|
||||
lateinit var binding: ActivityReaderSettingsBinding
|
||||
private val reader = "reader_settings"
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityReaderSettingsBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
|
@ -31,6 +32,7 @@ import ani.dantotsu.subcriptions.Notifications.Companion.openSettings
|
|||
import ani.dantotsu.subcriptions.Subscription.Companion.defaultTime
|
||||
import ani.dantotsu.subcriptions.Subscription.Companion.startSubscription
|
||||
import ani.dantotsu.subcriptions.Subscription.Companion.timeMinutes
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import eu.kanade.domain.base.BasePreferences
|
||||
import eu.kanade.tachiyomi.network.NetworkPreferences
|
||||
import io.noties.markwon.Markwon
|
||||
|
@ -54,6 +56,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||
@SuppressLint("SetTextI18n")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivitySettingsBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
@ -98,6 +101,23 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
|||
binding.settingsUseMaterialYou.isChecked = getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_material_you", false)
|
||||
binding.settingsUseMaterialYou.setOnCheckedChangeListener { _, isChecked ->
|
||||
getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).edit().putBoolean("use_material_you", isChecked).apply()
|
||||
Toast.makeText(this, "Restart app to apply changes", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
|
||||
val themeString = getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getString("theme", "PURPLE")!!
|
||||
binding.themeSwitcher.setText(themeString.substring(0, 1) + themeString.substring(1).lowercase())
|
||||
|
||||
binding.themeSwitcher.setAdapter(ArrayAdapter(this, R.layout.item_dropdown, ThemeManager.Companion.Theme.values().map { it.theme.substring(0, 1) + it.theme.substring(1).lowercase() }))
|
||||
|
||||
binding.themeSwitcher.setOnItemClickListener { _, _, i, _ ->
|
||||
getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).edit().putString("theme", ThemeManager.Companion.Theme.values()[i].theme).apply()
|
||||
ActivityHelper.shouldRefreshMainActivity = true
|
||||
binding.themeSwitcher.clearFocus()
|
||||
Refresh.all()
|
||||
finish()
|
||||
startActivity(Intent(this, SettingsActivity::class.java))
|
||||
initActivity(this)
|
||||
|
||||
}
|
||||
|
||||
//val animeSource = loadData<Int>("settings_def_anime_source_s")?.let { if (it >= AnimeSources.names.size) 0 else it } ?: 0
|
||||
|
@ -150,6 +170,15 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
|||
true
|
||||
}
|
||||
|
||||
val exDns = listOf("None", "Cloudflare", "Google", "AdGuard", "Quad9", "AliDNS", "DNSPod", "360", "Quad101", "Mullvad", "Controld", "Njalla", "Shecan")
|
||||
binding.settingsExtensionDns.setText(exDns[networkPreferences.dohProvider().get()], false)
|
||||
binding.settingsExtensionDns.setAdapter(ArrayAdapter(this, R.layout.item_dropdown, exDns))
|
||||
binding.settingsExtensionDns.setOnItemClickListener { _, _, i, _ ->
|
||||
networkPreferences.dohProvider().set(i)
|
||||
binding.settingsExtensionDns.clearFocus()
|
||||
Toast.makeText(this, "Restart app to apply changes", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
|
||||
binding.settingsDownloadInSd.isChecked = loadData("sd_dl") ?: false
|
||||
binding.settingsDownloadInSd.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
|
@ -381,7 +410,7 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
|||
}
|
||||
}
|
||||
|
||||
var curTime = loadData<Int>("subscriptions_time") ?: defaultTime
|
||||
var curTime = loadData<Int>("subscriptions_time_r") ?: defaultTime
|
||||
val timeNames = timeMinutes.map {
|
||||
val mins = it % 60
|
||||
val hours = it / 60
|
||||
|
@ -394,7 +423,7 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
|||
speedDialog.setSingleChoiceItems(timeNames, curTime) { dialog, i ->
|
||||
curTime = i
|
||||
binding.settingsSubscriptionsTime.text = getString(R.string.subscriptions_checking_time_s, timeNames[i])
|
||||
saveData("subscriptions_time", curTime)
|
||||
saveData("subscriptions_time_r", curTime)
|
||||
dialog.dismiss()
|
||||
startSubscription(true)
|
||||
}.show()
|
||||
|
@ -538,7 +567,7 @@ OS Version: $CODENAME $RELEASE ($SDK_INT)
|
|||
title = "Enjoying the App?"
|
||||
addView(TextView(this@SettingsActivity).apply {
|
||||
text =
|
||||
"Consider donating!r"
|
||||
"Consider donating!"
|
||||
})
|
||||
|
||||
setNegativeButton("no moners :(") {
|
||||
|
|
|
@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import androidx.core.view.updateLayoutParams
|
||||
import ani.dantotsu.*
|
||||
import ani.dantotsu.databinding.ActivityUserInterfaceSettingsBinding
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
|
||||
class UserInterfaceSettingsActivity : AppCompatActivity() {
|
||||
|
@ -15,6 +16,7 @@ class UserInterfaceSettingsActivity : AppCompatActivity() {
|
|||
private val ui = "ui_settings"
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityUserInterfaceSettingsBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class AlarmReceiver : BroadcastReceiver() {
|
|||
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
|
||||
)
|
||||
val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||
val curTime = loadData<Int>("subscriptions_time", context) ?: defaultTime
|
||||
val curTime = loadData<Int>("subscriptions_time_r", context) ?: defaultTime
|
||||
|
||||
if (timeMinutes[curTime] > 0)
|
||||
alarmManager.setRepeating(
|
||||
|
|
|
@ -16,8 +16,8 @@ import kotlinx.coroutines.launch
|
|||
@SuppressLint("MissingPermission")
|
||||
class Subscription {
|
||||
companion object {
|
||||
const val defaultTime = 8
|
||||
val timeMinutes = arrayOf(0L, 5, 10, 15, 30, 45, 60, 90, 120, 180, 240, 360, 480, 720, 1440)
|
||||
const val defaultTime = 3
|
||||
val timeMinutes = arrayOf(0L, 120, 180, 240, 360, 480, 720, 1440)
|
||||
|
||||
private var alreadyStarted = false
|
||||
fun Context.startSubscription(force: Boolean = false) {
|
||||
|
|
|
@ -9,6 +9,7 @@ import ani.dantotsu.parsers.*
|
|||
import ani.dantotsu.saveData
|
||||
import ani.dantotsu.tryWithSuspend
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.media.manga.MangaNameAdapter
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
|
||||
class SubscriptionHelper {
|
||||
|
@ -76,7 +77,7 @@ class SubscriptionHelper {
|
|||
}
|
||||
|
||||
return chp?.apply {
|
||||
selected.latest = number.toFloat()
|
||||
selected.latest = MangaNameAdapter.findChapterNumber(number) ?: 0f
|
||||
saveSelected(context, id, selected)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class SubscriptionWorker(val context: Context, params: WorkerParameters) : Corou
|
|||
|
||||
private const val SUBSCRIPTION_WORK_NAME = "work_subscription"
|
||||
fun enqueue(context: Context) {
|
||||
val curTime = loadData<Int>("subscriptions_time") ?: defaultTime
|
||||
val curTime = loadData<Int>("subscriptions_time_r") ?: defaultTime
|
||||
if(timeMinutes[curTime]>0L) {
|
||||
val constraints = Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build()
|
||||
val periodicSyncDataWork = PeriodicWorkRequest.Builder(
|
||||
|
|
48
app/src/main/java/ani/dantotsu/themes/ThemeManager.kt
Normal file
48
app/src/main/java/ani/dantotsu/themes/ThemeManager.kt
Normal file
|
@ -0,0 +1,48 @@
|
|||
package ani.dantotsu.themes
|
||||
|
||||
import android.content.Context
|
||||
import ani.dantotsu.R
|
||||
|
||||
class ThemeManager(private val context: Context) {
|
||||
fun applyTheme() {
|
||||
if(context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getBoolean("use_material_you", false)){
|
||||
return
|
||||
}
|
||||
when (context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE).getString("theme", "PURPLE")!!) {
|
||||
"PURPLE" -> {
|
||||
context.setTheme(R.style.Theme_Dantotsu_Purple)
|
||||
}
|
||||
//"MONOCHROME" -> {
|
||||
// context.setTheme(R.style.Theme_Dantotsu_Monochrome)
|
||||
//}
|
||||
"BLUE" -> {
|
||||
context.setTheme(R.style.Theme_Dantotsu_Blue)
|
||||
}
|
||||
"GREEN" -> {
|
||||
context.setTheme(R.style.Theme_Dantotsu_Green)
|
||||
}
|
||||
"PINK" -> {
|
||||
context.setTheme(R.style.Theme_Dantotsu_Pink)
|
||||
}
|
||||
else -> {
|
||||
context.setTheme(R.style.Theme_Dantotsu_Purple)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object{
|
||||
enum class Theme(val theme: String) {
|
||||
PURPLE("PURPLE"),
|
||||
BLUE("BLUE"),
|
||||
GREEN("GREEN"),
|
||||
PINK("PINK");
|
||||
//MONOCHROME("MONOCHROME");
|
||||
|
||||
companion object {
|
||||
fun fromString(value: String): Theme {
|
||||
return values().find { it.theme == value } ?: PURPLE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,6 +6,9 @@ import kotlinx.coroutines.flow.MutableStateFlow
|
|||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import okhttp3.Headers
|
||||
import rx.subjects.Subject
|
||||
import java.io.IOException
|
||||
import java.io.ObjectInputStream
|
||||
import java.io.ObjectOutputStream
|
||||
import java.io.Serializable
|
||||
|
||||
data class Track(val url: String, val lang: String)
|
||||
|
@ -14,12 +17,15 @@ open class Video(
|
|||
val url: String = "",
|
||||
val quality: String = "",
|
||||
var videoUrl: String? = null,
|
||||
val headers: Headers? = null,
|
||||
headers: Headers? = null,
|
||||
// "url", "language-label-2", "url2", "language-label-2"
|
||||
val subtitleTracks: List<Track> = emptyList(),
|
||||
val audioTracks: List<Track> = emptyList(),
|
||||
) : Serializable, ProgressListener {
|
||||
|
||||
@Transient
|
||||
var headers: Headers? = headers
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
constructor(
|
||||
url: String,
|
||||
|
@ -90,4 +96,27 @@ open class Video(
|
|||
READY,
|
||||
ERROR,
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
private fun writeObject(out: ObjectOutputStream) {
|
||||
out.defaultWriteObject()
|
||||
val headersMap: Map<String, List<String>> = headers?.toMultimap() ?: emptyMap()
|
||||
out.writeObject(headersMap)
|
||||
}
|
||||
|
||||
@Throws(IOException::class, ClassNotFoundException::class)
|
||||
private fun readObject(input: ObjectInputStream) {
|
||||
input.defaultReadObject()
|
||||
val headersMap = input.readObject() as? Map<String, List<String>>
|
||||
headers = headersMap?.let { map ->
|
||||
val builder = Headers.Builder()
|
||||
for ((key, values) in map) {
|
||||
for (value in values) {
|
||||
builder.add(key, value)
|
||||
}
|
||||
}
|
||||
builder.build()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.extension.anime.util
|
|||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import eu.kanade.tachiyomi.extension.InstallStep
|
||||
import eu.kanade.tachiyomi.extension.anime.AnimeExtensionManager
|
||||
import eu.kanade.tachiyomi.util.system.hasMiuiPackageInstaller
|
||||
|
@ -24,6 +25,7 @@ class AnimeExtensionInstallActivity : Activity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
|
||||
val installIntent = Intent(Intent.ACTION_INSTALL_PACKAGE)
|
||||
.setDataAndType(intent.data, intent.type)
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.extension.manga.util
|
|||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import eu.kanade.tachiyomi.extension.InstallStep
|
||||
import eu.kanade.tachiyomi.extension.manga.MangaExtensionManager
|
||||
import eu.kanade.tachiyomi.util.system.hasMiuiPackageInstaller
|
||||
|
@ -24,6 +25,7 @@ class MangaExtensionInstallActivity : Activity() {
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
|
||||
val installIntent = Intent(Intent.ACTION_INSTALL_PACKAGE)
|
||||
.setDataAndType(intent.data, intent.type)
|
||||
|
|
|
@ -13,7 +13,7 @@ class NetworkPreferences(
|
|||
}
|
||||
|
||||
fun dohProvider(): Preference<Int> {
|
||||
return preferenceStore.getInt("doh_provider", 1)
|
||||
return preferenceStore.getInt("doh_provider", 0)
|
||||
}
|
||||
|
||||
fun defaultUserAgent(): Preference<String> {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/bg_opp" android:state_checked="false"/>
|
||||
<item android:color="?attr/colorSecondary" android:state_checked="true"/>
|
||||
<item android:color="?attr/colorOnBackground" android:state_checked="false"/>
|
||||
<item android:color="?attr/colorPrimaryContainer" android:state_checked="true"/>
|
||||
</selector>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/bg_black"/>
|
||||
<item android:color="@color/nav_tab"/>
|
||||
<item android:state_selected="true" android:color="?attr/colorPrimary"/>
|
||||
<item android:color="?attr/colorSecondary"/>
|
||||
</selector>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/bg_opp"/>
|
||||
<item android:color="@color/nav_tab"/>
|
||||
<item android:state_selected="true" android:color="?attr/colorOnPrimary"/>
|
||||
<item android:color="?attr/colorOnSecondary"/>
|
||||
</selector>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Color when the TextInputLayout is focused -->
|
||||
<item android:color="?attr/colorPrimary" android:state_focused="true"/>
|
||||
<!-- Color when the TextInputLayout is not focused (unselected) -->
|
||||
<item android:color="?attr/colorPrimaryContainer"/>
|
||||
</selector>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/nav_bg"/>
|
||||
<solid android:color="?attr/colorPrimaryContainer"/>
|
||||
<corners android:radius="40dp"/>
|
||||
</shape>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/pink_500_25"
|
||||
android:color="?attr/colorSecondaryContainer"
|
||||
android:radius="20dp" />
|
|
@ -3,6 +3,6 @@
|
|||
<gradient
|
||||
android:type="linear"
|
||||
android:angle="90"
|
||||
android:startColor="@color/bg"
|
||||
android:startColor="?android:colorBackground"
|
||||
android:endColor="@color/nav_bg_inv" />
|
||||
</shape>
|
|
@ -10,7 +10,7 @@
|
|||
android:id="@+id/mediaTab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/nav_bg"
|
||||
android:background="?attr/colorPrimaryContainer"
|
||||
android:translationZ="0dp"
|
||||
app:itemPaddingTop="32dp"
|
||||
app:menuGravity="center"
|
||||
|
@ -29,7 +29,7 @@
|
|||
android:id="@+id/mediaAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:translationZ="5dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
|
@ -37,7 +37,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="false"
|
||||
app:contentScrim="@color/nav_bg"
|
||||
app:contentScrim="?android:colorBackground"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
|
||||
<com.flaviofaria.kenburnsview.KenBurnsView
|
||||
|
@ -104,6 +104,7 @@
|
|||
android:singleLine="false"
|
||||
android:text="@string/slogan"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
android:transitionName="mediaTitle" />
|
||||
|
||||
<TextView
|
||||
|
@ -137,7 +138,7 @@
|
|||
android:singleLine="true"
|
||||
android:text="@string/add"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
|
@ -171,7 +172,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/nav_bg"
|
||||
android:background="?attr/colorOnBackground"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
|
@ -206,7 +207,7 @@
|
|||
android:lineSpacingExtra="-8sp"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/fg"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
android:textSize="16sp"
|
||||
tools:text="Watched 10 out of 10" />
|
||||
|
||||
|
@ -218,7 +219,7 @@
|
|||
android:padding="8dp"
|
||||
android:tintMode="src_atop"
|
||||
app:srcCompat="@drawable/ic_round_favorite_border_24"
|
||||
app:tint="@color/nav_tab"
|
||||
app:tint="?attr/colorSecondary"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
<ImageView
|
||||
|
@ -228,7 +229,7 @@
|
|||
android:layout_marginStart="-8dp"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_round_share_24"
|
||||
app:tint="@color/nav_tab"
|
||||
app:tint="?attr/colorSecondary"
|
||||
app:tintMode="src_atop"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
|
@ -281,7 +282,7 @@
|
|||
android:layout_gravity="end"
|
||||
android:layout_margin="16dp"
|
||||
android:translationZ="7dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/nav_bg"
|
||||
android:background="?attr/colorSecondary"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
|
@ -21,6 +21,7 @@
|
|||
android:singleLine="true"
|
||||
android:textAlignment="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?attr/colorOnSecondary"
|
||||
tools:text="@string/name" />
|
||||
|
||||
|
||||
|
@ -56,7 +57,7 @@
|
|||
android:layout_gravity="end"
|
||||
android:layout_margin="16dp"
|
||||
android:translationZ="2dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?attr/colorSecondary"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
android:id="@+id/characterAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/bg">
|
||||
app:contentScrim="?android:colorBackground">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/characterCollapsing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="false"
|
||||
app:contentScrim="@color/nav_bg"
|
||||
app:contentScrim="?android:colorBackground"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
|
||||
<com.flaviofaria.kenburnsview.KenBurnsView
|
||||
|
@ -98,7 +98,7 @@
|
|||
android:layout_gravity="end"
|
||||
android:layout_margin="16dp"
|
||||
android:translationZ="2dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
android:background="@color/nav_bg_inv"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
android:text="@string/faq"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:drawableTint="@color/bg_opp"
|
||||
app:drawableTint="?attr/colorOnBackground"
|
||||
app:drawableStartCompat="@drawable/ic_round_arrow_back_ios_new_24" />
|
||||
|
||||
<ani.dantotsu.FadingEdgeRecyclerView
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
android:paddingEnd="16dp"
|
||||
android:text="@string/search_by_image"
|
||||
app:drawableStartCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:drawableTint="@color/bg_opp" />
|
||||
app:drawableTint="?attr/colorOnBackground" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -47,10 +47,10 @@
|
|||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/upload_image"
|
||||
android:textColor="@color/button_icon"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:cornerRadius="16dp"
|
||||
app:icon="@drawable/ic_round_image_search_24"
|
||||
app:iconTint="@color/button_icon" />
|
||||
app:iconTint="?attr/colorOnPrimary"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/nav_bg"
|
||||
android:background="?attr/colorPrimaryContainer"
|
||||
android:theme="@style/Theme.Dantotsu.AppBarOverlay">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -34,6 +34,7 @@
|
|||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/colorOnPrimaryContainer"
|
||||
tools:text="@string/app_name" />
|
||||
|
||||
<Space
|
||||
|
@ -49,7 +50,7 @@
|
|||
android:layout_marginRight="16dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:contentDescription="@string/sort_by"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
app:srcCompat="@drawable/ic_round_sort_24" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -58,7 +59,7 @@
|
|||
android:id="@+id/listTabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@color/nav_bg"
|
||||
android:background="?attr/colorPrimaryContainer"
|
||||
app:tabContentStart="32dp"
|
||||
app:tabMode="scrollable"
|
||||
app:tabPaddingEnd="16dp"
|
||||
|
|
|
@ -41,13 +41,12 @@
|
|||
app:abb_animationDuration="300"
|
||||
app:abb_animationInterpolator="@anim/over_shoot"
|
||||
app:abb_badgeBackgroundColor="#F44336"
|
||||
|
||||
app:abb_indicatorColor="?attr/colorSecondary"
|
||||
app:abb_indicatorLocation="bottom"
|
||||
app:abb_indicatorMargin="28dp"
|
||||
app:abb_selectedTabType="text"
|
||||
app:abb_tabColor="@color/nav_tab"
|
||||
app:abb_tabColorDisabled="@color/nav_tab_disabled"
|
||||
app:abb_tabColor="?attr/colorSecondary"
|
||||
app:abb_tabColorDisabled="?attr/colorSecondaryContainer"
|
||||
app:abb_tabColorSelected="?attr/colorPrimary"
|
||||
app:abb_tabs="@menu/bottom_navbar_menu"
|
||||
app:abb_textAppearance="@style/NavBarText"
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textColor="?android:colorBackground"
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
|||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textColor="?android:colorBackground"
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -148,7 +148,7 @@
|
|||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textColor="?android:colorBackground"
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -185,7 +185,7 @@
|
|||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textColor="?android:colorBackground"
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
@ -268,7 +268,7 @@
|
|||
android:layout_marginEnd="48dp"
|
||||
android:fontFamily="@font/poppins"
|
||||
android:singleLine="false"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textColor="?android:colorBackground"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="TextContrastCheck"
|
||||
tools:text="@string/popular_anime" />
|
||||
|
@ -357,7 +357,7 @@
|
|||
app:labelStyle="@style/fontTooltip"
|
||||
app:thumbRadius="8dp"
|
||||
app:tickColor="#0000"
|
||||
app:trackColorInactive="@color/bg_white"
|
||||
app:trackColorInactive="?android:colorBackground"
|
||||
app:trackHeight="2dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
android:id="@+id/mediaAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:translationZ="5dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
|
@ -17,7 +17,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="false"
|
||||
app:contentScrim="@color/nav_bg"
|
||||
app:contentScrim="?android:colorBackground"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
||||
|
||||
<com.flaviofaria.kenburnsview.KenBurnsView
|
||||
|
@ -85,6 +85,7 @@
|
|||
android:singleLine="false"
|
||||
android:text="@string/slogan"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
android:transitionName="mediaTitle" />
|
||||
|
||||
<TextView
|
||||
|
@ -121,7 +122,7 @@
|
|||
android:singleLine="true"
|
||||
android:text="@string/add"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
|
@ -153,7 +154,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/nav_bg"
|
||||
app:contentScrim="?android:colorBackground"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
|
@ -188,7 +189,7 @@
|
|||
android:lineSpacingExtra="-8sp"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/fg"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
android:textSize="16sp"
|
||||
tools:text="Watched 10 out of 10" />
|
||||
|
||||
|
@ -200,7 +201,7 @@
|
|||
android:padding="8dp"
|
||||
android:tintMode="src_atop"
|
||||
app:srcCompat="@drawable/ic_round_favorite_border_24"
|
||||
app:tint="@color/nav_tab"
|
||||
app:tint="?attr/colorSecondary"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
<ImageView
|
||||
|
@ -210,7 +211,7 @@
|
|||
android:layout_marginStart="-8dp"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_round_share_24"
|
||||
app:tint="@color/nav_tab"
|
||||
app:tint="?attr/colorSecondary"
|
||||
app:tintMode="src_atop"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
|
@ -241,14 +242,14 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="0dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/nav_bg"
|
||||
android:background="?attr/colorPrimaryContainer"
|
||||
android:translationZ="1dp"
|
||||
app:itemActiveIndicatorStyle="@style/BottomNavBar"
|
||||
app:itemIconTint="@color/tab_layout_icon"
|
||||
app:itemRippleColor="?attr/colorSecondary"
|
||||
app:itemTextAppearanceActive="@style/NavBarText"
|
||||
app:itemTextAppearanceInactive="@style/NavBarText"
|
||||
app:itemTextColor="@color/tab_layout_text"
|
||||
app:itemTextColor="?attr/colorOnPrimaryContainer"
|
||||
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_thin"
|
||||
android:text="@string/sad"
|
||||
android:textColor="@color/pink_500"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="64sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -38,6 +38,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_internet"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/noInternetSad" />
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
android:background="@color/nav_bg_inv"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -106,7 +106,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/video_info"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
android:background="@color/nav_bg_inv"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -100,7 +100,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/source_info"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
@ -122,7 +122,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/show_system_bars"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -163,7 +163,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/auto_detect_webtoon"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -231,7 +231,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_amp_stories_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -249,7 +249,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_array_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -267,7 +267,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_column_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -320,7 +320,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:rotation="0"
|
||||
android:src="@drawable/ic_round_swipe_up_alt_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -374,7 +374,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_close_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -392,7 +392,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_screen_rotation_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -410,7 +410,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_menu_book_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -442,7 +442,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/over_scroll"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -462,7 +462,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/true_colors"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -494,7 +494,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/image_rotation"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -514,7 +514,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/crop_borders"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -535,7 +535,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/spaced_pages"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -555,7 +555,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/hide_page_numbers"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -575,7 +575,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/horizontal_scroll_bar"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -596,7 +596,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/keep_screen_on"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -616,7 +616,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/volume_buttons"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -636,7 +636,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/wrap_images"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -668,7 +668,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/image_long_clicking"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -703,7 +703,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/ask_update_progress_manga"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -738,7 +738,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/ask_update_progress_doujin"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
android:background="@color/nav_bg_inv"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -117,7 +117,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_brightness_high_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -136,7 +136,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_brightness_4_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -154,7 +154,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_brightness_auto_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
@ -172,11 +172,45 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/use_material_you"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.58"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/theme_" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:startIconDrawable="@drawable/ic_round_source_24">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/themeSwitcher"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:freezesText="false"
|
||||
android:inputType="none"
|
||||
android:padding="8dp"
|
||||
android:text="@string/watch"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</ani.dantotsu.others.Xpandable>
|
||||
|
||||
<ani.dantotsu.others.Xpandable
|
||||
|
@ -236,7 +270,7 @@
|
|||
android:fontFamily="@font/poppins_bold"
|
||||
android:padding="16dp"
|
||||
android:text="@string/logout"
|
||||
android:textColor="?attr/colorSecondaryVariant"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -312,7 +346,7 @@
|
|||
android:fontFamily="@font/poppins_bold"
|
||||
android:padding="16dp"
|
||||
android:text="@string/logout"
|
||||
android:textColor="?attr/colorSecondaryVariant"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -348,7 +382,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_discord"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<LinearLayout
|
||||
|
@ -380,7 +414,7 @@
|
|||
android:fontFamily="@font/poppins_bold"
|
||||
android:padding="16dp"
|
||||
android:text="@string/logout"
|
||||
android:textColor="?attr/colorSecondaryVariant"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -411,7 +445,7 @@
|
|||
android:layout_height="64dp"
|
||||
android:layout_marginStart="-32dp"
|
||||
android:layout_marginEnd="-32dp"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:drawablePadding="16dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -421,7 +455,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/account_help"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableStartCompat="@drawable/ic_round_help_24"
|
||||
app:drawableTint="?attr/colorPrimary" />
|
||||
|
@ -456,7 +490,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/force_legacy_installer"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -474,7 +508,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/skip_loading_extension_icons"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -499,6 +533,40 @@
|
|||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.58"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/extension_specific_dns" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:startIconDrawable="@drawable/ic_round_dns_24">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/settingsExtensionDns"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:freezesText="false"
|
||||
android:inputType="none"
|
||||
android:padding="8dp"
|
||||
android:text="@string/none"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</ani.dantotsu.others.Xpandable>
|
||||
|
||||
|
@ -547,7 +615,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_movie_filter_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -566,7 +634,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_home_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -584,7 +652,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_import_contacts_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -613,7 +681,7 @@
|
|||
android:text="@string/ui_settings"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_auto_awesome_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -687,7 +755,7 @@
|
|||
android:text="@string/download_manager_select"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_download_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -705,7 +773,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/downloadInSd"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -723,7 +791,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/always_continue_shows"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -741,7 +809,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/recentlyListOnly"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -777,7 +845,7 @@
|
|||
android:text="@string/subscriptions_checking_time_s"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_notifications_none_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -804,7 +872,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/notification_for_checking_subscriptions"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -873,7 +941,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/prefer_dub"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -892,7 +960,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/show_yt"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -927,7 +995,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_list_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -946,7 +1014,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_grid_view_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -964,7 +1032,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_comfy_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -995,7 +1063,7 @@
|
|||
android:text="@string/player_settings"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_video_settings_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -1090,7 +1158,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_list_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -1108,7 +1176,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_comfy_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -1138,7 +1206,7 @@
|
|||
android:text="@string/reader_settings"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_reader_settings"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -1178,7 +1246,7 @@
|
|||
android:layout_marginStart="-32dp"
|
||||
android:layout_marginEnd="-32dp"
|
||||
android:background="@drawable/ui_bg"
|
||||
android:backgroundTint="@color/bg_opp"
|
||||
android:backgroundTint="?attr/colorOnBackground"
|
||||
android:backgroundTintMode="src_atop"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:insetTop="0dp"
|
||||
|
@ -1188,7 +1256,7 @@
|
|||
android:text="@string/faq"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_help_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -1207,7 +1275,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/check_app_updates"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -1228,7 +1296,7 @@
|
|||
android:text="@string/devs"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_accessible_forward_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -1249,7 +1317,7 @@
|
|||
android:text="@string/forks"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_restaurant_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -1270,7 +1338,7 @@
|
|||
android:text="@string/disclaimer"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_info_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -1347,7 +1415,7 @@
|
|||
android:layout_weight="1"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_discord"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageView
|
||||
|
@ -1357,7 +1425,7 @@
|
|||
android:layout_margin="8dp"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_github"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/nav_bg"
|
||||
android:background="?attr/colorSecondary"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
|
@ -21,6 +21,7 @@
|
|||
android:singleLine="true"
|
||||
android:textAlignment="center"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?attr/colorOnSecondary"
|
||||
tools:text="@string/main_studio" />
|
||||
|
||||
|
||||
|
@ -56,7 +57,7 @@
|
|||
android:layout_gravity="end"
|
||||
android:layout_margin="16dp"
|
||||
android:translationZ="2dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?attr/colorSecondary"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterView
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
android:background="@color/nav_bg_inv"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/immersive_mode"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
@ -141,7 +141,7 @@
|
|||
android:text="@string/home_layout_show"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_playlist_add_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -169,7 +169,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/small_view"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -203,7 +203,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/banner_animations"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
@ -225,7 +225,7 @@
|
|||
android:paddingEnd="32dp"
|
||||
android:text="@string/layout_animations"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_amp_stories_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -108,7 +108,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_column_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -160,7 +160,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_close_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -178,7 +178,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_screen_rotation_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -196,7 +196,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_menu_book_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -231,7 +231,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -266,7 +266,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
@ -300,7 +300,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -334,7 +334,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
@ -368,7 +368,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -402,7 +402,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
@ -445,7 +445,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -479,7 +479,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
@ -505,7 +505,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="Use Dark Theme"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -524,7 +524,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/keep_screen_on"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -544,7 +544,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/volume_buttons"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_amp_stories_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_array_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_column_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -154,7 +154,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:rotation="0"
|
||||
android:src="@drawable/ic_round_swipe_up_alt_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -206,7 +206,7 @@
|
|||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_close_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -224,7 +224,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_screen_rotation_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -242,7 +242,7 @@
|
|||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_menu_book_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
@ -270,7 +270,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/over_scroll"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -288,7 +288,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/true_colors"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -316,7 +316,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/image_rotation"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -334,7 +334,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/crop_borders"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -353,7 +353,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/spaced_pages"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -371,7 +371,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/hide_page_numbers"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -389,7 +389,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/horizontal_scroll_bar"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -407,7 +407,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/keep_screen_on"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -425,7 +425,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/volume_buttons"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -443,7 +443,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/wrap_images"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
@ -470,7 +470,7 @@
|
|||
android:minHeight="64dp"
|
||||
android:text="@string/image_long_clicking"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:buttonTint="?attr/colorPrimary"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
@ -69,6 +70,7 @@
|
|||
android:insetBottom="0dp"
|
||||
android:padding="8dp"
|
||||
android:textSize="16sp"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="16dp"
|
||||
tools:ignore="SpeakableTextPresentCheck"
|
||||
|
@ -86,6 +88,7 @@
|
|||
android:insetBottom="0dp"
|
||||
android:padding="8dp"
|
||||
android:textSize="16sp"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="16dp"
|
||||
tools:ignore="SpeakableTextPresentCheck"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
android:layout_height="4dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="14dp"
|
||||
app:cardBackgroundColor="@color/nav_tab"
|
||||
app:cardBackgroundColor="?attr/colorPrimary"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="0dp"/>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_height="4dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
app:cardBackgroundColor="@color/nav_tab"
|
||||
app:cardBackgroundColor="?attr/colorPrimary"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="0dp" />
|
||||
|
||||
|
@ -99,6 +99,7 @@
|
|||
android:textSize="16sp"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="16dp"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
tools:ignore="SpeakableTextPresentCheck"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
@ -117,6 +118,7 @@
|
|||
android:text="@string/save"
|
||||
android:textSize="16sp"
|
||||
app:cornerRadius="16dp"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<Button
|
||||
|
@ -134,6 +136,7 @@
|
|||
android:text="@string/share"
|
||||
android:textSize="16sp"
|
||||
app:cornerRadius="16dp"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
app:boxCornerRadiusTopEnd="16dp"
|
||||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:startIconDrawable="@drawable/ic_round_playlist_play_24">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -73,6 +74,7 @@
|
|||
android:text="@string/watch"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
|
||||
android:textSize="14sp"
|
||||
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -96,6 +98,7 @@
|
|||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:endIconMode="none"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:startIconDrawable="@drawable/ic_round_add_circle_outline_24"
|
||||
app:suffixTextAppearance="@style/Suffix">
|
||||
|
||||
|
@ -124,7 +127,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="-2dp"
|
||||
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:elevation="0dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:insetTop="0dp"
|
||||
|
@ -154,6 +157,7 @@
|
|||
app:endIconMode="none"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:startIconDrawable="@drawable/ic_round_star_24"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:suffixText="@string/score_suffix"
|
||||
app:suffixTextAppearance="@style/Suffix">
|
||||
|
||||
|
@ -193,6 +197,7 @@
|
|||
app:endIconMode="none"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:startIconDrawable="@drawable/ic_round_date_range_24"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:suffixTextAppearance="@style/Suffix">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -227,6 +232,7 @@
|
|||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:endIconMode="none"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:suffixTextAppearance="@style/Suffix">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -362,6 +368,7 @@
|
|||
android:layout_width="128dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_gravity="center"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
|
@ -378,6 +385,7 @@
|
|||
android:layout_marginStart="16dp"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:padding="8dp"
|
||||
|
@ -392,7 +400,7 @@
|
|||
android:layout_height="4dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="14dp"
|
||||
app:cardBackgroundColor="@color/nav_tab"
|
||||
app:cardBackgroundColor="?attr/colorPrimary"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
app:boxCornerRadiusTopEnd="16dp"
|
||||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:startIconDrawable="@drawable/ic_round_playlist_play_24">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -92,6 +93,7 @@
|
|||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:endIconMode="none"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:startIconDrawable="@drawable/ic_round_add_circle_outline_24"
|
||||
app:suffixTextAppearance="@style/Suffix">
|
||||
|
||||
|
@ -122,6 +124,7 @@
|
|||
android:layout_marginTop="-2dp"
|
||||
android:elevation="0dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:minWidth="@null"
|
||||
|
@ -150,6 +153,7 @@
|
|||
app:hintAnimationEnabled="true"
|
||||
app:startIconDrawable="@drawable/ic_round_star_24"
|
||||
app:suffixText="@string/score_suffix"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:suffixTextAppearance="@style/Suffix">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -180,6 +184,7 @@
|
|||
android:layout_height="56dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:padding="8dp"
|
||||
|
@ -195,7 +200,7 @@
|
|||
android:layout_height="4dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="14dp"
|
||||
app:cardBackgroundColor="@color/nav_tab"
|
||||
app:cardBackgroundColor="?attr/colorPrimary"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="0dp" >
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
app:boxCornerRadiusBottomStart="16dp"
|
||||
app:boxCornerRadiusTopEnd="16dp"
|
||||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:hintAnimationEnabled="true">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -71,6 +72,7 @@
|
|||
app:boxCornerRadiusBottomStart="16dp"
|
||||
app:boxCornerRadiusTopEnd="16dp"
|
||||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:hintAnimationEnabled="true">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -110,6 +112,7 @@
|
|||
app:boxCornerRadiusBottomStart="16dp"
|
||||
app:boxCornerRadiusTopEnd="16dp"
|
||||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:hintAnimationEnabled="true">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -140,6 +143,7 @@
|
|||
app:boxCornerRadiusBottomStart="16dp"
|
||||
app:boxCornerRadiusTopEnd="16dp"
|
||||
app:boxCornerRadiusTopStart="16dp"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:hintAnimationEnabled="true">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -248,6 +252,7 @@
|
|||
<Button
|
||||
android:id="@+id/searchFilterCancel"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="8dp"
|
||||
|
@ -264,6 +269,7 @@
|
|||
<Button
|
||||
android:id="@+id/searchFilterApply"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
app:strokeColor="?attr/colorPrimaryContainer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="8dp"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
android:insetBottom="0dp"
|
||||
android:padding="8dp"
|
||||
android:text="@android:string/cancel"
|
||||
android:textColor="@color/pink_500"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
android:textSize="16sp"
|
||||
app:cornerRadius="16dp" />
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
android:fontFamily="@font/poppins_bold"
|
||||
android:padding="16dp"
|
||||
android:text="@string/logout"
|
||||
android:textColor="?attr/colorSecondaryVariant"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -85,7 +85,7 @@
|
|||
android:text="@string/search_by_image"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_image_search_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -104,7 +104,7 @@
|
|||
android:text="@string/downloads"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_round_download_24"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -123,7 +123,7 @@
|
|||
android:text="@string/anilist_settings"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_anilist"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -142,7 +142,7 @@
|
|||
android:text="@string/extension_settings"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:icon="@drawable/ic_extension"
|
||||
app:iconPadding="16dp"
|
||||
|
@ -162,7 +162,7 @@
|
|||
android:text="@string/settings"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
|
||||
app:icon="@drawable/ic_round_settings_24"
|
||||
|
|
|
@ -41,13 +41,14 @@
|
|||
android:layout_margin="16dp"
|
||||
android:hint="@string/search"
|
||||
android:transitionName="@string/search"
|
||||
app:boxBackgroundColor="@color/bg"
|
||||
app:boxBackgroundColor="?android:colorBackground"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCornerRadiusBottomEnd="28dp"
|
||||
app:boxCornerRadiusBottomStart="28dp"
|
||||
app:boxCornerRadiusTopEnd="28dp"
|
||||
app:boxCornerRadiusTopStart="28dp"
|
||||
app:endIconDrawable="@drawable/ic_round_search_24"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:hintAnimationEnabled="true">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -60,7 +61,6 @@
|
|||
android:inputType="textPersonName"
|
||||
android:padding="8dp"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="LabelFor,TextContrastCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
|
|
@ -529,8 +529,8 @@
|
|||
android:layout_height="24dp"
|
||||
app:ad_marker_color="#A9FFFFFF"
|
||||
app:bar_height="2dp"
|
||||
app:played_color="@color/pink_700"
|
||||
app:scrubber_color="@color/pink_500"
|
||||
app:played_color="?attr/colorPrimary"
|
||||
app:scrubber_color="?attr/colorPrimaryContainer"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
android:valueTo="10"
|
||||
app:labelBehavior="gone"
|
||||
app:thumbElevation="0dp"
|
||||
app:trackColorInactive="@color/pink_500_25"
|
||||
app:trackColorInactive="?attr/colorSecondary"
|
||||
app:trackHeight="24dp" />
|
||||
|
||||
<ImageView
|
||||
|
@ -290,7 +290,7 @@
|
|||
android:valueTo="10"
|
||||
app:labelBehavior="gone"
|
||||
app:thumbElevation="0dp"
|
||||
app:trackColorInactive="@color/pink_500_25"
|
||||
app:trackColorInactive="?attr/colorSecondary"
|
||||
app:trackHeight="24dp" />
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:contentPadding="12dp">
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_max="256dp"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
|
@ -230,6 +231,7 @@
|
|||
app:layout_constraintStart_toEndOf="@+id/homeAnimeList"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_max="256dp"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
tools:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
|
@ -389,7 +391,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/ic_round_heart_broken_24"
|
||||
app:tint="@color/fav"
|
||||
app:tint="?attr/colorPrimary"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
|
@ -615,7 +617,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/ic_round_heart_broken_24"
|
||||
app:tint="@color/fav"
|
||||
app:tint="?attr/colorPrimary"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
android:layout_margin="32dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/login"
|
||||
android:textColor="@color/button_icon"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
app:cornerRadius="16dp"
|
||||
app:icon="@drawable/ic_anilist"
|
||||
app:iconTint="@color/button_icon" />
|
||||
|
@ -63,7 +63,7 @@
|
|||
android:layout_weight="1"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_discord"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorSecondary"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<ImageView
|
||||
|
@ -73,7 +73,7 @@
|
|||
android:layout_margin="8dp"
|
||||
android:padding="6dp"
|
||||
android:src="@drawable/ic_github"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorSecondary"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:contentPadding="12dp">
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardBackgroundColor="@color/bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="0dp"
|
||||
app:cardElevation="0dp"
|
||||
tools:context=".media.MediaInfoFragment"
|
||||
|
|
|
@ -34,15 +34,16 @@
|
|||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="@string/anime"
|
||||
android:textColorHint="@color/bg_opp"
|
||||
android:textColorHint="?attr/colorOnPrimaryContainer"
|
||||
android:transitionName="@string/search"
|
||||
app:boxBackgroundColor="@color/status"
|
||||
app:boxBackgroundColor="?attr/colorPrimaryContainer"
|
||||
app:boxCornerRadiusBottomEnd="28dp"
|
||||
app:boxCornerRadiusBottomStart="28dp"
|
||||
app:boxCornerRadiusTopEnd="28dp"
|
||||
app:boxCornerRadiusTopStart="28dp"
|
||||
app:endIconDrawable="@drawable/ic_round_search_24"
|
||||
app:endIconTint="@color/bg_opp"
|
||||
app:endIconTint="?attr/colorOnPrimaryContainer"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:hintAnimationEnabled="true">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -54,7 +55,6 @@
|
|||
android:fontFamily="@font/poppins_bold"
|
||||
android:inputType="none"
|
||||
android:padding="8dp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="LabelFor,TextContrastCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
@ -63,7 +63,7 @@
|
|||
android:layout_width="52dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="4dp"
|
||||
android:backgroundTint="@color/status"
|
||||
android:backgroundTint="?attr/colorPrimaryContainer"
|
||||
app:cardCornerRadius="26dp">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
|
@ -71,6 +71,7 @@
|
|||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:scaleType="center"
|
||||
android:tint="?attr/colorOnPrimaryContainer"
|
||||
app:srcCompat="@drawable/ic_round_settings_24"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
|
@ -108,6 +109,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/this_season"
|
||||
app:chipStrokeColor="?attr/colorPrimaryContainer"
|
||||
android:textAppearance="@style/Suffix" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
|
@ -116,6 +118,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/next_season"
|
||||
app:chipStrokeColor="?attr/colorPrimaryContainer"
|
||||
android:textAppearance="@style/Suffix" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
|
@ -123,6 +126,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/previous_season"
|
||||
app:chipStrokeColor="?attr/colorPrimaryContainer"
|
||||
android:textAppearance="@style/Suffix" />
|
||||
|
||||
|
||||
|
|
|
@ -24,15 +24,15 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:backgroundTint="@color/fav"
|
||||
android:backgroundTint="?attr/colorSecondaryContainer"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:text="@string/play_yt"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textColor="?attr/colorOnSecondaryContainer"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="12dp"
|
||||
app:icon="@drawable/ic_round_play_circle_24"
|
||||
app:iconTint="@color/bg_white"
|
||||
app:iconTint="?attr/colorOnSecondaryContainer"
|
||||
tools:ignore="TextContrastCheck" />
|
||||
|
||||
<TextView
|
||||
|
@ -66,6 +66,7 @@
|
|||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:hintAnimationEnabled="true"
|
||||
app:boxStrokeColor="@color/text_input_layout_stroke_color"
|
||||
app:startIconDrawable="@drawable/ic_round_source_24">
|
||||
|
||||
<AutoCompleteTextView
|
||||
|
@ -90,7 +91,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_round_notifications_none_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -170,7 +171,7 @@
|
|||
android:alpha="0.33"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_round_view_list_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
<ImageView
|
||||
|
@ -180,7 +181,7 @@
|
|||
android:alpha="0.33"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_round_grid_view_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
<ImageView
|
||||
|
@ -190,7 +191,7 @@
|
|||
android:alpha="0.33"
|
||||
android:padding="8dp"
|
||||
app:srcCompat="@drawable/ic_round_view_comfy_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
|
||||
<ImageView
|
||||
|
@ -201,7 +202,7 @@
|
|||
android:padding="8dp"
|
||||
android:rotation="90"
|
||||
app:srcCompat="@drawable/ic_round_arrow_back_ios_new_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -263,7 +264,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/pink_500" />
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<View
|
||||
android:id="@+id/itemEpisodeProgressEmpty"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="12dp">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -75,7 +75,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.33"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
<com.google.android.material.chip.Chip xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="-4dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:textAppearance="@style/Suffix"
|
||||
app:chipStrokeColor="?attr/colorPrimaryContainer"
|
||||
android:textSize="14sp">
|
||||
|
||||
</com.google.android.material.chip.Chip>
|
|
@ -17,6 +17,7 @@
|
|||
android:fontFamily="@font/poppins_bold"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
tools:text="Episode 2 will be released in" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:focusable="false">
|
||||
|
||||
<ani.dantotsu.NoGestureSubsamplingImageView
|
||||
|
@ -52,7 +52,7 @@
|
|||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:focusable="false">
|
||||
|
||||
<ani.dantotsu.NoGestureSubsamplingImageView
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_margin="8dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -20,7 +20,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/pink_500" />
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<View
|
||||
android:id="@+id/itemEpisodeProgressEmpty"
|
||||
|
@ -50,6 +50,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.33"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:visibility="gone" />
|
||||
</androidx.cardview.widget.CardView>
|
|
@ -8,7 +8,7 @@
|
|||
android:layout_margin="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:translationZ="8dp"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?android:colorBackground"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
|
@ -96,7 +96,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/pink_500" />
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<View
|
||||
android:id="@+id/itemEpisodeProgressEmpty"
|
||||
|
@ -122,6 +122,6 @@
|
|||
android:layout_margin="8dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@drawable/ic_round_remove_red_eye_24"
|
||||
app:tint="@color/bg_opp"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription" />
|
||||
</androidx.cardview.widget.CardView>
|
|
@ -8,7 +8,7 @@
|
|||
android:layout_margin="8dp"
|
||||
android:backgroundTintMode="src_atop"
|
||||
android:longClickable="true"
|
||||
app:cardBackgroundColor="@color/nav_bg"
|
||||
app:cardBackgroundColor="?attr/colorSurface"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<View
|
||||
|
@ -58,7 +58,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:layout_marginTop="-18dp"
|
||||
app:cardBackgroundColor="@color/bg_opp"
|
||||
app:cardBackgroundColor="?attr/colorOnBackground"
|
||||
app:cardCornerRadius="16dp">
|
||||
|
||||
<TextView
|
||||
|
@ -70,7 +70,7 @@
|
|||
android:layout_marginTop="19dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:textColor="@color/bg"
|
||||
android:textColor="?android:colorBackground"
|
||||
android:textSize="20sp"
|
||||
tools:text="12" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
@ -88,7 +88,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="0"
|
||||
android:background="@color/pink_500" />
|
||||
android:background="?attr/colorPrimary" />
|
||||
|
||||
<View
|
||||
android:id="@+id/itemEpisodeProgressEmpty"
|
||||
|
@ -153,7 +153,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0.33"
|
||||
android:background="@color/bg"
|
||||
android:background="?android:colorBackground"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue