Merge branch 'libre-tube:master' into master

This commit is contained in:
XelXen 2022-09-28 18:50:12 +05:30 committed by GitHub
commit 1798390018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
40 changed files with 749 additions and 258 deletions

View File

@ -52,7 +52,9 @@
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
@ -70,7 +72,9 @@
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -88,7 +92,9 @@
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -106,7 +112,9 @@
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -142,7 +150,9 @@
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -160,7 +170,9 @@
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>
@ -178,7 +190,9 @@
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter> </intent-filter>
</activity-alias> </activity-alias>

View File

@ -77,6 +77,7 @@ object PreferenceKeys {
const val PICTURE_IN_PICTURE = "picture_in_picture" const val PICTURE_IN_PICTURE = "picture_in_picture"
const val PLAYER_RESIZE_MODE = "player_resize_mode" const val PLAYER_RESIZE_MODE = "player_resize_mode"
const val SB_SKIP_MANUALLY = "sb_skip_manually_key" const val SB_SKIP_MANUALLY = "sb_skip_manually_key"
const val LIMIT_HLS = "limit_hls"
/** /**
* Background mode * Background mode
@ -101,8 +102,6 @@ object PreferenceKeys {
const val CLEAR_WATCH_HISTORY = "clear_watch_history" const val CLEAR_WATCH_HISTORY = "clear_watch_history"
const val CLEAR_WATCH_POSITIONS = "clear_watch_positions" const val CLEAR_WATCH_POSITIONS = "clear_watch_positions"
const val SHARE_WITH_TIME_CODE = "share_with_time_code" const val SHARE_WITH_TIME_CODE = "share_with_time_code"
const val BACKUP_SETTINGS = "backup_settings"
const val RESTORE_SETTINGS = "restore_settings"
/** /**
* History * History

View File

@ -1,27 +0,0 @@
package com.github.libretube.extensions
import android.view.View
import android.widget.FrameLayout
import androidx.core.content.res.ResourcesCompat
import com.github.libretube.R
import com.google.android.material.snackbar.Snackbar
fun View.getStyledSnackBar(text: Int): Snackbar {
val snackBar = Snackbar.make(this, text, Snackbar.LENGTH_SHORT)
snackBar.setTextMaxLines(3)
snackBar.animationMode = Snackbar.ANIMATION_MODE_SLIDE
val params = snackBar.view.layoutParams as FrameLayout.LayoutParams
val sideMargin = 70
params.setMargins(
sideMargin,
params.topMargin,
sideMargin,
sideMargin + 50
)
snackBar.view.layoutParams = params
snackBar.view.background = ResourcesCompat.getDrawable(resources, R.drawable.snackbar_shape, null)
return snackBar
}

View File

@ -29,6 +29,7 @@ import com.github.libretube.util.PreferenceHelper
import com.google.android.exoplayer2.C import com.google.android.exoplayer2.C
import com.google.android.exoplayer2.ExoPlayer import com.google.android.exoplayer2.ExoPlayer
import com.google.android.exoplayer2.MediaItem import com.google.android.exoplayer2.MediaItem
import com.google.android.exoplayer2.PlaybackException
import com.google.android.exoplayer2.Player import com.google.android.exoplayer2.Player
import com.google.android.exoplayer2.audio.AudioAttributes import com.google.android.exoplayer2.audio.AudioAttributes
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
@ -213,7 +214,7 @@ class BackgroundMode : Service() {
* Plays the next video when the current one ended * Plays the next video when the current one ended
*/ */
player?.addListener(object : Player.Listener { player?.addListener(object : Player.Listener {
override fun onPlaybackStateChanged(@Player.State state: Int) { override fun onPlaybackStateChanged(state: Int) {
when (state) { when (state) {
Player.STATE_ENDED -> { Player.STATE_ENDED -> {
if (autoplay) playNextVideo() if (autoplay) playNextVideo()
@ -221,6 +222,8 @@ class BackgroundMode : Service() {
Player.STATE_IDLE -> { Player.STATE_IDLE -> {
onDestroy() onDestroy()
} }
Player.STATE_BUFFERING -> {}
Player.STATE_READY -> {}
PlaybackState.STATE_PAUSED -> { PlaybackState.STATE_PAUSED -> {
query { query {
DatabaseHelper.saveWatchPosition( DatabaseHelper.saveWatchPosition(
@ -229,8 +232,17 @@ class BackgroundMode : Service() {
) )
} }
} }
Player.STATE_BUFFERING -> {} }
Player.STATE_READY -> {} }
override fun onPlayerError(error: PlaybackException) {
// show a toast on errors
Handler(Looper.getMainLooper()).post {
Toast.makeText(
this@BackgroundMode.applicationContext,
error.localizedMessage,
Toast.LENGTH_SHORT
).show()
} }
} }
}) })

View File

@ -16,7 +16,6 @@ import com.github.libretube.constants.PIPED_GITHUB_URL
import com.github.libretube.constants.WEBLATE_URL import com.github.libretube.constants.WEBLATE_URL
import com.github.libretube.constants.WEBSITE_URL import com.github.libretube.constants.WEBSITE_URL
import com.github.libretube.databinding.ActivityAboutBinding import com.github.libretube.databinding.ActivityAboutBinding
import com.github.libretube.extensions.getStyledSnackBar
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
@ -103,12 +102,16 @@ class AboutActivity : BaseActivity() {
val clip = ClipData.newPlainText(getString(R.string.copied), href) val clip = ClipData.newPlainText(getString(R.string.copied), href)
clipboard.setPrimaryClip(clip) clipboard.setPrimaryClip(clip)
// show the snackBar with open action // show the snackBar with open action
val snackBar = binding.root.getStyledSnackBar(R.string.copied_to_clipboard) Snackbar.make(
snackBar.setAction(R.string.open_copied) { binding.root,
openLinkFromHref(href) R.string.copied_to_clipboard,
} Snackbar.LENGTH_LONG
snackBar.animationMode = Snackbar.ANIMATION_MODE_FADE )
snackBar.show() .setAction(R.string.open_copied) {
openLinkFromHref(href)
}
.setAnimationMode(Snackbar.ANIMATION_MODE_FADE)
.show()
} }
private fun showLicense() { private fun showLicense() {

View File

@ -106,20 +106,15 @@ class MainActivity : BaseActivity() {
binding.bottomNav.setOnItemSelectedListener { binding.bottomNav.setOnItemSelectedListener {
// clear backstack if it's the start fragment // clear backstack if it's the start fragment
if (startFragmentId == it.itemId) navController.backQueue.clear() if (startFragmentId == it.itemId) navController.backQueue.clear()
// set menu item on click listeners
removeSearchFocus() if (it.itemId == R.id.subscriptionsFragment) {
when (it.itemId) { binding.bottomNav.removeBadge(R.id.subscriptionsFragment)
R.id.homeFragment -> {
navController.navigate(R.id.homeFragment)
}
R.id.subscriptionsFragment -> {
binding.bottomNav.removeBadge(R.id.subscriptionsFragment)
navController.navigate(R.id.subscriptionsFragment)
}
R.id.libraryFragment -> {
navController.navigate(R.id.libraryFragment)
}
} }
removeSearchFocus()
// navigate to the selected fragment
navController.navigate(it.itemId)
false false
} }

View File

@ -5,11 +5,11 @@ import android.os.Bundle
import androidx.activity.OnBackPressedCallback import androidx.activity.OnBackPressedCallback
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.databinding.ActivityNointernetBinding import com.github.libretube.databinding.ActivityNointernetBinding
import com.github.libretube.extensions.getStyledSnackBar
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.fragments.DownloadsFragment import com.github.libretube.ui.fragments.DownloadsFragment
import com.github.libretube.util.NavigationHelper
import com.github.libretube.util.NetworkHelper import com.github.libretube.util.NetworkHelper
import com.github.libretube.util.ThemeHelper import com.google.android.material.snackbar.Snackbar
class NoInternetActivity : BaseActivity() { class NoInternetActivity : BaseActivity() {
private lateinit var binding: ActivityNointernetBinding private lateinit var binding: ActivityNointernetBinding
@ -21,9 +21,9 @@ class NoInternetActivity : BaseActivity() {
// retry button // retry button
binding.retryButton.setOnClickListener { binding.retryButton.setOnClickListener {
if (NetworkHelper.isNetworkAvailable(this)) { if (NetworkHelper.isNetworkAvailable(this)) {
ThemeHelper.restartMainActivity(this) NavigationHelper.restartMainActivity(this)
} else { } else {
binding.root.getStyledSnackBar(R.string.turnInternetOn).show() Snackbar.make(binding.root, R.string.turnInternetOn, Snackbar.LENGTH_LONG).show()
} }
} }
binding.noInternetSettingsImageView.setOnClickListener { binding.noInternetSettingsImageView.setOnClickListener {

View File

@ -9,7 +9,7 @@ import com.github.libretube.R
import com.github.libretube.constants.IntentData import com.github.libretube.constants.IntentData
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.ui.base.BaseActivity import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.util.ThemeHelper import com.github.libretube.util.NavigationHelper
class RouterActivity : BaseActivity() { class RouterActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
@ -23,7 +23,7 @@ class RouterActivity : BaseActivity() {
handleSendText(uri!!) handleSendText(uri!!)
} else { } else {
// start app as normal if URI not in host list // start app as normal if URI not in host list
ThemeHelper.restartMainActivity(this) NavigationHelper.restartMainActivity(this)
} }
} }

View File

@ -11,6 +11,7 @@ import com.github.libretube.databinding.DownloadedMediaRowBinding
import com.github.libretube.obj.DownloadedFile import com.github.libretube.obj.DownloadedFile
import com.github.libretube.ui.activities.OfflinePlayerActivity import com.github.libretube.ui.activities.OfflinePlayerActivity
import com.github.libretube.ui.viewholders.DownloadsViewHolder import com.github.libretube.ui.viewholders.DownloadsViewHolder
import com.github.libretube.util.DownloadHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import java.io.File import java.io.File
@ -49,15 +50,19 @@ class DownloadsAdapter(
) { _, index -> ) { _, index ->
when (index) { when (index) {
0 -> { 0 -> {
val downloadDir = File( val audioDir = DownloadHelper.getAudioDir(root.context)
root.context.getExternalFilesDir(null), val videoDir = DownloadHelper.getVideoDir(root.context)
"video"
)
File( listOf(audioDir, videoDir).forEach {
downloadDir, val f = File(it, file.name)
file.name if (f.exists()) {
).delete() try {
f.delete()
} catch (e: Exception) {
e.printStackTrace()
}
}
}
files.removeAt(position) files.removeAt(position)
notifyItemRemoved(position) notifyItemRemoved(position)

View File

@ -4,7 +4,7 @@ import android.app.Dialog
import android.os.Bundle import android.os.Bundle
import androidx.fragment.app.DialogFragment import androidx.fragment.app.DialogFragment
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.util.ThemeHelper import com.github.libretube.util.NavigationHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
class RequireRestartDialog : DialogFragment() { class RequireRestartDialog : DialogFragment() {
@ -15,7 +15,7 @@ class RequireRestartDialog : DialogFragment() {
.setMessage(R.string.require_restart_message) .setMessage(R.string.require_restart_message)
.setPositiveButton(R.string.okay) { _, _ -> .setPositiveButton(R.string.okay) { _, _ ->
activity?.recreate() activity?.recreate()
ThemeHelper.restartMainActivity(requireContext()) NavigationHelper.restartMainActivity(requireContext())
} }
.setNegativeButton(R.string.cancel, null) .setNegativeButton(R.string.cancel, null)
.show() .show()

View File

@ -16,13 +16,13 @@ import com.github.libretube.api.RetrofitInstance
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.databinding.FragmentHomeBinding import com.github.libretube.databinding.FragmentHomeBinding
import com.github.libretube.extensions.TAG import com.github.libretube.extensions.TAG
import com.github.libretube.extensions.getStyledSnackBar
import com.github.libretube.ui.activities.SettingsActivity import com.github.libretube.ui.activities.SettingsActivity
import com.github.libretube.ui.adapters.ChannelAdapter import com.github.libretube.ui.adapters.ChannelAdapter
import com.github.libretube.ui.adapters.TrendingAdapter import com.github.libretube.ui.adapters.TrendingAdapter
import com.github.libretube.ui.base.BaseFragment import com.github.libretube.ui.base.BaseFragment
import com.github.libretube.util.LocaleHelper import com.github.libretube.util.LocaleHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.util.PreferenceHelper
import com.google.android.material.snackbar.Snackbar
import retrofit2.HttpException import retrofit2.HttpException
import java.io.IOException import java.io.IOException
@ -86,8 +86,10 @@ class HomeFragment : BaseFragment() {
// show a [SnackBar] if there are no trending videos available // show a [SnackBar] if there are no trending videos available
if (response.isEmpty()) { if (response.isEmpty()) {
binding.root.getStyledSnackBar( Snackbar.make(
R.string.change_region binding.root,
R.string.change_region,
Snackbar.LENGTH_LONG
) )
.setAction( .setAction(
R.string.settings R.string.settings

View File

@ -1358,6 +1358,18 @@ class PlayerFragment : BaseFragment() {
// control for the track sources like subtitles and audio source // control for the track sources like subtitles and audio source
trackSelector = DefaultTrackSelector(requireContext()) trackSelector = DefaultTrackSelector(requireContext())
// limit hls to full hd
if (
PreferenceHelper.getBoolean(
PreferenceKeys.LIMIT_HLS,
false
)
) {
val newParams = trackSelector.buildUponParameters()
.setMaxVideoSize(1920, 1080)
trackSelector.setParameters(newParams)
}
exoPlayer = ExoPlayer.Builder(requireContext()) exoPlayer = ExoPlayer.Builder(requireContext())
.setMediaSourceFactory(DefaultMediaSourceFactory(dataSourceFactory)) .setMediaSourceFactory(DefaultMediaSourceFactory(dataSourceFactory))
.setLoadControl(loadControl) .setLoadControl(loadControl)

View File

@ -12,6 +12,7 @@ import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.ui.activities.SettingsActivity import com.github.libretube.ui.activities.SettingsActivity
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.ui.dialogs.NavBarOptionsDialog
import com.github.libretube.ui.dialogs.RequireRestartDialog import com.github.libretube.ui.dialogs.RequireRestartDialog
import com.github.libretube.util.PreferenceHelper import com.github.libretube.util.PreferenceHelper
import com.github.libretube.util.ThemeHelper import com.github.libretube.util.ThemeHelper
@ -59,6 +60,15 @@ class AppearanceSettings : BasePreferenceFragment() {
true true
} }
val navBarOptions = findPreference<Preference>(PreferenceKeys.NAVBAR_ITEMS)
navBarOptions?.setOnPreferenceClickListener {
NavBarOptionsDialog().show(
childFragmentManager,
null
)
true
}
val systemCaptionStyle = val systemCaptionStyle =
findPreference<SwitchPreferenceCompat>(PreferenceKeys.SYSTEM_CAPTION_STYLE) findPreference<SwitchPreferenceCompat>(PreferenceKeys.SYSTEM_CAPTION_STYLE)
val captionSettings = findPreference<Preference>(PreferenceKeys.CAPTION_SETTINGS) val captionSettings = findPreference<Preference>(PreferenceKeys.CAPTION_SETTINGS)

View File

@ -9,7 +9,6 @@ import com.github.libretube.R
import com.github.libretube.constants.PreferenceKeys import com.github.libretube.constants.PreferenceKeys
import com.github.libretube.ui.activities.SettingsActivity import com.github.libretube.ui.activities.SettingsActivity
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.ui.dialogs.NavBarOptionsDialog
import com.github.libretube.ui.dialogs.RequireRestartDialog import com.github.libretube.ui.dialogs.RequireRestartDialog
import com.github.libretube.util.LocaleHelper import com.github.libretube.util.LocaleHelper
import com.github.libretube.util.PreferenceHelper import com.github.libretube.util.PreferenceHelper
@ -39,15 +38,6 @@ class GeneralSettings : BasePreferenceFragment() {
true true
} }
val navBarOptions = findPreference<Preference>(PreferenceKeys.NAVBAR_ITEMS)
navBarOptions?.setOnPreferenceClickListener {
NavBarOptionsDialog().show(
childFragmentManager,
null
)
true
}
val breakReminder = val breakReminder =
findPreference<SwitchPreferenceCompat>(PreferenceKeys.BREAK_REMINDER_TOGGLE) findPreference<SwitchPreferenceCompat>(PreferenceKeys.BREAK_REMINDER_TOGGLE)
val breakReminderTime = findPreference<EditTextPreference>(PreferenceKeys.BREAK_REMINDER) val breakReminderTime = findPreference<EditTextPreference>(PreferenceKeys.BREAK_REMINDER)

View File

@ -165,12 +165,14 @@ class InstanceSettings : BasePreferenceFragment() {
// fetch official public instances // fetch official public instances
val response = try { val response = try {
RetrofitInstance.externalApi.getInstances() RetrofitInstance.externalApi.getInstances().toMutableList()
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
emptyList() mutableListOf()
} }
response.sortBy { it.name }
response.forEach { response.forEach {
if (it.name != null && it.api_url != null) { if (it.name != null && it.api_url != null) {
instanceNames += it.name!! instanceNames += it.name!!

View File

@ -6,11 +6,11 @@ import androidx.preference.Preference
import com.github.libretube.BuildConfig import com.github.libretube.BuildConfig
import com.github.libretube.R import com.github.libretube.R
import com.github.libretube.api.RetrofitInstance import com.github.libretube.api.RetrofitInstance
import com.github.libretube.extensions.getStyledSnackBar
import com.github.libretube.ui.activities.SettingsActivity import com.github.libretube.ui.activities.SettingsActivity
import com.github.libretube.ui.base.BasePreferenceFragment import com.github.libretube.ui.base.BasePreferenceFragment
import com.github.libretube.ui.dialogs.UpdateDialog import com.github.libretube.ui.dialogs.UpdateDialog
import com.github.libretube.util.NetworkHelper import com.github.libretube.util.NetworkHelper
import com.google.android.material.snackbar.Snackbar
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@ -97,8 +97,14 @@ class MainSettings : BasePreferenceFragment() {
update?.setOnPreferenceClickListener { update?.setOnPreferenceClickListener {
CoroutineScope(Dispatchers.IO).launch { CoroutineScope(Dispatchers.IO).launch {
if (!NetworkHelper.isNetworkAvailable(requireContext())) { if (!NetworkHelper.isNetworkAvailable(requireContext())) {
(activity as? SettingsActivity)?.binding?.root?.getStyledSnackBar(R.string.unknown_error) (activity as? SettingsActivity)?.binding?.let {
?.show() Snackbar.make(
it.root,
R.string.unknown_error,
Snackbar.LENGTH_SHORT
)
.show()
}
return@launch return@launch
} }
// check for update // check for update
@ -109,8 +115,14 @@ class MainSettings : BasePreferenceFragment() {
} }
if (updateInfo.name == null) { if (updateInfo.name == null) {
// request failed // request failed
(activity as? SettingsActivity)?.binding?.root?.getStyledSnackBar(R.string.unknown_error) (activity as? SettingsActivity)?.binding?.let {
?.show() Snackbar.make(
it.root,
R.string.unknown_error,
Snackbar.LENGTH_SHORT
)
.show()
}
} else if (BuildConfig.VERSION_NAME != updateInfo.name) { } else if (BuildConfig.VERSION_NAME != updateInfo.name) {
// show the UpdateAvailableDialog if there's an update available // show the UpdateAvailableDialog if there's an update available
val updateAvailableDialog = UpdateDialog(updateInfo) val updateAvailableDialog = UpdateDialog(updateInfo)
@ -120,8 +132,14 @@ class MainSettings : BasePreferenceFragment() {
) )
} else { } else {
// otherwise show the no update available snackBar // otherwise show the no update available snackBar
(activity as? SettingsActivity)?.binding?.root?.getStyledSnackBar(R.string.app_uptodate) (activity as? SettingsActivity)?.binding?.let {
?.show() Snackbar.make(
it.root,
R.string.unknown_error,
Snackbar.LENGTH_SHORT
)
.show()
}
} }
} }
true true

View File

@ -37,7 +37,8 @@ object NavBarHelper {
defaultNavBarItems.add( defaultNavBarItems.add(
NavBarItem( NavBarItem(
it.itemId, it.itemId,
it.title.toString() it.title.toString(),
it.isEnabled
) )
) )
} }
@ -90,6 +91,6 @@ object NavBarHelper {
).icon = menuItem.icon ).icon = menuItem.icon
} }
} }
return navBarItems[0].id return navBarItems.filter { it.isEnabled }[0].id
} }
} }

View File

@ -1,6 +1,9 @@
package com.github.libretube.util package com.github.libretube.util
import android.app.NotificationManager
import android.content.Context import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Bundle import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
@ -66,4 +69,21 @@ object NavigationHelper {
activity.navController.navigate(R.id.playlistFragment, bundle) activity.navController.navigate(R.id.playlistFragment, bundle)
} }
} }
/**
* Needed due to different MainActivity Aliases because of the app icons
*/
fun restartMainActivity(context: Context) {
// kill player notification
val nManager = context
.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
nManager.cancelAll()
// start a new Intent of the app
val pm: PackageManager = context.packageManager
val intent = pm.getLaunchIntentForPackage(context.packageName)
intent?.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
context.startActivity(intent)
// kill the old application
android.os.Process.killProcess(android.os.Process.myPid())
}
} }

View File

@ -1,10 +1,8 @@
package com.github.libretube.util package com.github.libretube.util
import android.app.Activity import android.app.Activity
import android.app.NotificationManager
import android.content.ComponentName import android.content.ComponentName
import android.content.Context import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.text.Spanned import android.text.Spanned
import android.util.TypedValue import android.util.TypedValue
@ -128,23 +126,6 @@ object ThemeHelper {
) )
} }
/**
* Needed due to different MainActivity Aliases because of the app icons
*/
fun restartMainActivity(context: Context) {
// kill player notification
val nManager = context
.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
nManager.cancelAll()
// start a new Intent of the app
val pm: PackageManager = context.packageManager
val intent = pm.getLaunchIntentForPackage(context.packageName)
intent?.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK
context.startActivity(intent)
// kill the old application
android.os.Process.killProcess(android.os.Process.myPid())
}
/** /**
* Get a color by a resource code * Get a color by a resource code
*/ */

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/colorSurface" />
<corners android:radius="10dp" />
</shape>

View File

@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="10dp"> android:paddingTop="20dp">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/options_recycler" android:id="@+id/options_recycler"

View File

@ -5,13 +5,27 @@
android:id="@+id/homeFragment" android:id="@+id/homeFragment"
android:icon="@drawable/ic_home" android:icon="@drawable/ic_home"
android:title="@string/startpage" /> android:title="@string/startpage" />
<item <item
android:id="@+id/subscriptionsFragment" android:id="@+id/subscriptionsFragment"
android:icon="@drawable/ic_subscriptions" android:icon="@drawable/ic_subscriptions"
android:title="@string/subscriptions" /> android:title="@string/subscriptions" />
<item <item
android:id="@+id/libraryFragment" android:id="@+id/libraryFragment"
android:icon="@drawable/ic_library" android:icon="@drawable/ic_library"
android:title="@string/library" /> android:title="@string/library" />
<item
android:id="@+id/downloadsFragment"
android:icon="@drawable/ic_download_filled"
android:title="@string/downloads"
android:enabled="false" />
<item
android:id="@+id/watchHistoryFragment"
android:icon="@drawable/ic_history_filled"
android:title="@string/history"
android:enabled="false" />
</menu> </menu>

View File

@ -338,4 +338,5 @@
<string name="play_next">تشغيل التالي</string> <string name="play_next">تشغيل التالي</string>
<string name="navigation_bar">شريط التنقل</string> <string name="navigation_bar">شريط التنقل</string>
<string name="select_at_least_one">يرجى اختيار عنصر واحد على الأقل</string> <string name="select_at_least_one">يرجى اختيار عنصر واحد على الأقل</string>
<string name="change_region">المتصدرة يبدو أنها غير متاحة في المنطقة الحالية . الرجاء اختيار آخر في الإعداد .</string>
</resources> </resources>

View File

@ -338,4 +338,5 @@
<string name="play_next">Növbəti oynadın</string> <string name="play_next">Növbəti oynadın</string>
<string name="navigation_bar">Naviqasiya paneli</string> <string name="navigation_bar">Naviqasiya paneli</string>
<string name="select_at_least_one">Ən azı bir element seçin</string> <string name="select_at_least_one">Ən azı bir element seçin</string>
<string name="change_region">Trend\'in cari region üçün əlçatan olmadığı görünür.Tənzimləmələrdə başqasını seçin.</string>
</resources> </resources>

View File

@ -338,4 +338,5 @@
<string name="play_next">Přehrát jako další</string> <string name="play_next">Přehrát jako další</string>
<string name="navigation_bar">Navigační lišta</string> <string name="navigation_bar">Navigační lišta</string>
<string name="select_at_least_one">Vyberte prosím alespoň jednu položku</string> <string name="select_at_least_one">Vyberte prosím alespoň jednu položku</string>
<string name="change_region">Zdá se, že trendy nejsou pro aktuální oblast k dispozici. V nastavení prosím vyberte jinou.</string>
</resources> </resources>

View File

@ -98,7 +98,7 @@
<string name="category_selfpromo">No remunerado/Autopromoción</string> <string name="category_selfpromo">No remunerado/Autopromoción</string>
<string name="category_intro">Intermedio/Animación de entrada</string> <string name="category_intro">Intermedio/Animación de entrada</string>
<string name="category_outro">Tarjetas finales y créditos</string> <string name="category_outro">Tarjetas finales y créditos</string>
<string name="category_outro_description">Información después del final. No para conclusiones con información.</string> <string name="category_outro_description">Información después del final. No para conclusiones con info.</string>
<string name="category_intro_description">Un intervalo sin contenido real. Puede ser una pausa, un fotograma estático, una animación que se repite. No debe utilizarse para transiciones que contengan información.</string> <string name="category_intro_description">Un intervalo sin contenido real. Puede ser una pausa, un fotograma estático, una animación que se repite. No debe utilizarse para transiciones que contengan información.</string>
<string name="license">Licencia</string> <string name="license">Licencia</string>
<string name="color_red">Rojo</string> <string name="color_red">Rojo</string>
@ -338,4 +338,5 @@
<string name="play_next">Reproducir el siguiente</string> <string name="play_next">Reproducir el siguiente</string>
<string name="navigation_bar">Barra de navegación</string> <string name="navigation_bar">Barra de navegación</string>
<string name="select_at_least_one">Por favor, seleccione al menos un artículo</string> <string name="select_at_least_one">Por favor, seleccione al menos un artículo</string>
<string name="change_region">Las tendencias parecen no estar disponibles para la región actual. Seleccione otro en la configuración.</string>
</resources> </resources>

View File

@ -338,4 +338,5 @@
<string name="play_next">Main berikutnya</string> <string name="play_next">Main berikutnya</string>
<string name="navigation_bar">Bilah navigasi</string> <string name="navigation_bar">Bilah navigasi</string>
<string name="select_at_least_one">Mohon pilih setidaknya satu item</string> <string name="select_at_least_one">Mohon pilih setidaknya satu item</string>
<string name="change_region">Sedang Tren sepertinya tidak tersedia untuk wilayah saat ini. Pilih yang lain di pengaturan.</string>
</resources> </resources>

View File

@ -338,4 +338,5 @@
<string name="legacy_subscriptions">Visualizzazione iscrizioni legacy</string> <string name="legacy_subscriptions">Visualizzazione iscrizioni legacy</string>
<string name="navigation_bar">Barra di navigazione</string> <string name="navigation_bar">Barra di navigazione</string>
<string name="select_at_least_one">Seleziona almeno un elemento</string> <string name="select_at_least_one">Seleziona almeno un elemento</string>
<string name="change_region">La Tendenza sembra non essere disponibile per la regione attuale. Selezionane un\'altra nelle impostazioni.</string>
</resources> </resources>

View File

@ -11,6 +11,8 @@
@style/Preference.SwitchPreferenceCompat.Material3 @style/Preference.SwitchPreferenceCompat.Material3
</item> </item>
<item name="snackbarStyle">@style/snackBarStyle</item>
</style> </style>
<style name="StartupTheme" parent="BaseTheme"> <style name="StartupTheme" parent="BaseTheme">
@ -22,71 +24,156 @@
<style name="Theme.Red" parent="BaseTheme"> <style name="Theme.Red" parent="BaseTheme">
<item name="colorPrimary">@color/red_dark_accentLight</item> <item name="colorPrimary">@color/red_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/red_dark_accentDark</item> <item name="colorOnPrimary">@color/red_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/red_dark_accentLight</item> <item name="colorPrimaryContainer">@color/red_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/red_dark_accentLight</item> <item name="colorOnPrimaryContainer">@color/red_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/red_dark_accentLight</item> <item name="colorSecondary">@color/red_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/red_dark_accentDark</item> <item name="colorOnSecondary">@color/red_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/red_dark_accentDark</item> <item name="colorSecondaryContainer">@color/red_md_theme_dark_secondaryContainer</item>
<item name="android:colorBackground">@color/red_dark_background</item> <item name="colorOnSecondaryContainer">@color/red_md_theme_dark_onSecondaryContainer</item>
<item name="colorOnBackground">@color/red_dark_background</item> <item name="colorTertiary">@color/red_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/red_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/red_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/red_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/red_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/red_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/red_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/red_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/red_md_theme_dark_background</item>
<item name="colorOnBackground">@color/red_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/red_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/red_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/red_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/red_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/red_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/red_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/red_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/red_md_theme_dark_inversePrimary</item>
</style> </style>
<style name="Theme.Blue" parent="BaseTheme"> <style name="Theme.Blue" parent="BaseTheme">
<item name="colorPrimary">@color/blue_dark_accentLight</item> <item name="colorPrimary">@color/blue_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/blue_dark_accentDark</item> <item name="colorOnPrimary">@color/blue_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/blue_dark_accentLight</item> <item name="colorPrimaryContainer">@color/blue_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/blue_dark_accentLight</item> <item name="colorOnPrimaryContainer">@color/blue_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/blue_dark_accentLight</item> <item name="colorSecondary">@color/blue_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/blue_dark_accentDark</item> <item name="colorOnSecondary">@color/blue_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/blue_dark_accentDark</item> <item name="colorSecondaryContainer">@color/blue_md_theme_dark_secondaryContainer</item>
<item name="android:colorBackground">@color/blue_dark_background</item> <item name="colorOnSecondaryContainer">@color/blue_md_theme_dark_onSecondaryContainer</item>
<item name="colorOnBackground">@color/blue_dark_background</item> <item name="colorTertiary">@color/blue_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/blue_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/blue_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/blue_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/blue_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/blue_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/blue_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/blue_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/blue_md_theme_dark_background</item>
<item name="colorOnBackground">@color/blue_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/blue_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/blue_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/blue_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/blue_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/blue_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/blue_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/blue_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/blue_md_theme_dark_inversePrimary</item>
</style> </style>
<style name="Theme.Yellow" parent="BaseTheme"> <style name="Theme.Yellow" parent="BaseTheme">
<item name="colorPrimary">@color/yellow_dark_accentLight</item> <item name="colorPrimary">@color/yellow_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/yellow_dark_accentDark</item> <item name="colorOnPrimary">@color/yellow_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/yellow_dark_accentLight</item> <item name="colorPrimaryContainer">@color/yellow_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/yellow_dark_accentLight</item> <item name="colorOnPrimaryContainer">@color/yellow_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/yellow_dark_accentLight</item> <item name="colorSecondary">@color/yellow_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/yellow_dark_accentDark</item> <item name="colorOnSecondary">@color/yellow_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/yellow_dark_accentDark</item> <item name="colorSecondaryContainer">@color/yellow_md_theme_dark_secondaryContainer</item>
<item name="android:colorBackground">@color/yellow_dark_background</item> <item name="colorOnSecondaryContainer">@color/yellow_md_theme_dark_onSecondaryContainer</item>
<item name="colorOnBackground">@color/yellow_dark_background</item> <item name="colorTertiary">@color/yellow_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/yellow_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/yellow_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/yellow_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/yellow_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/yellow_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/yellow_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/yellow_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/yellow_md_theme_dark_background</item>
<item name="colorOnBackground">@color/yellow_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/yellow_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/yellow_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/yellow_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/yellow_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/yellow_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/yellow_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/yellow_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/yellow_md_theme_dark_inversePrimary</item>
</style> </style>
<style name="Theme.Green" parent="BaseTheme"> <style name="Theme.Green" parent="BaseTheme">
<item name="colorPrimary">@color/green_dark_accentLight</item> <item name="colorPrimary">@color/green_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/green_dark_accentDark</item> <item name="colorOnPrimary">@color/green_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/green_dark_accentLight</item> <item name="colorPrimaryContainer">@color/green_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/green_dark_accentLight</item> <item name="colorOnPrimaryContainer">@color/green_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/green_dark_accentLight</item> <item name="colorSecondary">@color/green_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/green_dark_accentDark</item> <item name="colorOnSecondary">@color/green_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/green_dark_accentDark</item> <item name="colorSecondaryContainer">@color/green_md_theme_dark_secondaryContainer</item>
<item name="android:colorBackground">@color/green_dark_background</item> <item name="colorOnSecondaryContainer">@color/green_md_theme_dark_onSecondaryContainer</item>
<item name="colorOnBackground">@color/green_dark_background</item> <item name="colorTertiary">@color/green_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/green_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/green_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/green_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/green_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/green_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/green_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/green_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/green_md_theme_dark_background</item>
<item name="colorOnBackground">@color/green_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/green_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/green_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/green_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/green_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/green_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/green_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/green_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/green_md_theme_dark_inversePrimary</item>
</style> </style>
<style name="Theme.Purple" parent="BaseTheme"> <style name="Theme.Purple" parent="BaseTheme">
<item name="colorPrimary">@color/purple_dark_accentLight</item> <item name="colorPrimary">@color/purple_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/purple_dark_accentDark</item> <item name="colorOnPrimary">@color/purple_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/purple_dark_accentLight</item> <item name="colorPrimaryContainer">@color/purple_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/purple_dark_accentLight</item> <item name="colorOnPrimaryContainer">@color/purple_md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/purple_dark_accentLight</item> <item name="colorSecondary">@color/purple_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/purple_dark_accentDark</item> <item name="colorOnSecondary">@color/purple_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/purple_dark_accentDark</item> <item name="colorSecondaryContainer">@color/purple_md_theme_dark_secondaryContainer</item>
<item name="android:colorBackground">@color/purple_dark_background</item> <item name="colorOnSecondaryContainer">@color/purple_md_theme_dark_onSecondaryContainer</item>
<item name="colorOnBackground">@color/purple_dark_background</item> <item name="colorTertiary">@color/purple_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/purple_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/purple_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/purple_md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/purple_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/purple_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/purple_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/purple_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/purple_md_theme_dark_background</item>
<item name="colorOnBackground">@color/purple_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/purple_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/purple_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/purple_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/purple_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/purple_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/purple_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/purple_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/purple_md_theme_dark_inversePrimary</item>
</style> </style>

View File

@ -338,4 +338,5 @@
<string name="play_next">Odtwórz następne</string> <string name="play_next">Odtwórz następne</string>
<string name="navigation_bar">Pasek nawigacyjny</string> <string name="navigation_bar">Pasek nawigacyjny</string>
<string name="select_at_least_one">Proszę wybrać co najmniej jedną pozycję</string> <string name="select_at_least_one">Proszę wybrać co najmniej jedną pozycję</string>
<string name="change_region">Filmy na czasie wydają się być niedostępne dla bieżącego regionu. Proszę wybrać inny w ustawieniach.</string>
</resources> </resources>

View File

@ -338,4 +338,5 @@
<string name="play_next">Проиграть следующий</string> <string name="play_next">Проиграть следующий</string>
<string name="navigation_bar">Панель навигации</string> <string name="navigation_bar">Панель навигации</string>
<string name="select_at_least_one">Выберите как минимум один</string> <string name="select_at_least_one">Выберите как минимум один</string>
<string name="change_region">Похоже, что тренды не доступны в текущем регионе. Выберите другой регион в настройках.</string>
</resources> </resources>

View File

@ -338,4 +338,5 @@
<string name="play_next">Sonrakini oynat</string> <string name="play_next">Sonrakini oynat</string>
<string name="navigation_bar">Gezinme çubuğu</string> <string name="navigation_bar">Gezinme çubuğu</string>
<string name="select_at_least_one">Lütfen en az bir öge seçin</string> <string name="select_at_least_one">Lütfen en az bir öge seçin</string>
<string name="change_region">Trendler mevcut bölge için kullanılamıyor gibi görünüyor. Lütfen ayarlarda başka bir tane seçin.</string>
</resources> </resources>

View File

@ -338,4 +338,5 @@
<string name="play_next">播放下一个</string> <string name="play_next">播放下一个</string>
<string name="select_at_least_one">请选择至少一个项目</string> <string name="select_at_least_one">请选择至少一个项目</string>
<string name="navigation_bar">导航栏</string> <string name="navigation_bar">导航栏</string>
<string name="change_region">“时下流行”似乎对当前地区不可用。请在设置中另选一个地区。</string>
</resources> </resources>

View File

@ -3,44 +3,299 @@
<color name="duration_background_color">#AA000000</color> <color name="duration_background_color">#AA000000</color>
<color name="duration_text_color">#EEFFFFFF</color> <color name="duration_text_color">#EEFFFFFF</color>
<color name="red_light_accentLight">#F1395E</color> <color name="blue_md_theme_light_primary">#0058CB</color>
<color name="red_light_accentDark">#EF5350</color> <color name="blue_md_theme_light_onPrimary">#FFFFFF</color>
<color name="red_light_background">#EDE3E4</color> <color name="blue_md_theme_light_primaryContainer">#D9E2FF</color>
<color name="blue_md_theme_light_onPrimaryContainer">#001945</color>
<color name="blue_md_theme_light_secondary">#575E71</color>
<color name="blue_md_theme_light_onSecondary">#FFFFFF</color>
<color name="blue_md_theme_light_secondaryContainer">#DCE2F9</color>
<color name="blue_md_theme_light_onSecondaryContainer">#141B2C</color>
<color name="blue_md_theme_light_tertiary">#725572</color>
<color name="blue_md_theme_light_onTertiary">#FFFFFF</color>
<color name="blue_md_theme_light_tertiaryContainer">#FDD7FA</color>
<color name="blue_md_theme_light_onTertiaryContainer">#2A132C</color>
<color name="blue_md_theme_light_error">#BA1A1A</color>
<color name="blue_md_theme_light_errorContainer">#FFDAD6</color>
<color name="blue_md_theme_light_onError">#FFFFFF</color>
<color name="blue_md_theme_light_onErrorContainer">#410002</color>
<color name="blue_md_theme_light_background">#FEFBFF</color>
<color name="blue_md_theme_light_onBackground">#1B1B1F</color>
<color name="blue_md_theme_light_surface">#FEFBFF</color>
<color name="blue_md_theme_light_onSurface">#1B1B1F</color>
<color name="blue_md_theme_light_surfaceVariant">#E1E2EC</color>
<color name="blue_md_theme_light_onSurfaceVariant">#44464F</color>
<color name="blue_md_theme_light_outline">#757780</color>
<color name="blue_md_theme_light_inverseOnSurface">#F2F0F4</color>
<color name="blue_md_theme_light_inverseSurface">#303034</color>
<color name="blue_md_theme_light_inversePrimary">#B0C6FF</color>
<color name="blue_md_theme_light_shadow">#000000</color>
<color name="blue_md_theme_light_surfaceTint">#0058CB</color>
<color name="blue_md_theme_light_surfaceTintColor">#0058CB</color>
<color name="blue_md_theme_dark_primary">#B0C6FF</color>
<color name="blue_md_theme_dark_onPrimary">#002D6F</color>
<color name="blue_md_theme_dark_primaryContainer">#00429B</color>
<color name="blue_md_theme_dark_onPrimaryContainer">#D9E2FF</color>
<color name="blue_md_theme_dark_secondary">#C0C6DC</color>
<color name="blue_md_theme_dark_onSecondary">#293042</color>
<color name="blue_md_theme_dark_secondaryContainer">#404659</color>
<color name="blue_md_theme_dark_onSecondaryContainer">#DCE2F9</color>
<color name="blue_md_theme_dark_tertiary">#E0BBDD</color>
<color name="blue_md_theme_dark_onTertiary">#412742</color>
<color name="blue_md_theme_dark_tertiaryContainer">#593D5A</color>
<color name="blue_md_theme_dark_onTertiaryContainer">#FDD7FA</color>
<color name="blue_md_theme_dark_error">#FFB4AB</color>
<color name="blue_md_theme_dark_errorContainer">#93000A</color>
<color name="blue_md_theme_dark_onError">#690005</color>
<color name="blue_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="blue_md_theme_dark_background">#1B1B1F</color>
<color name="blue_md_theme_dark_onBackground">#E3E2E6</color>
<color name="blue_md_theme_dark_surface">#1B1B1F</color>
<color name="blue_md_theme_dark_onSurface">#E3E2E6</color>
<color name="blue_md_theme_dark_surfaceVariant">#44464F</color>
<color name="blue_md_theme_dark_onSurfaceVariant">#C5C6D0</color>
<color name="blue_md_theme_dark_outline">#8F9099</color>
<color name="blue_md_theme_dark_inverseOnSurface">#1B1B1F</color>
<color name="blue_md_theme_dark_inverseSurface">#E3E2E6</color>
<color name="blue_md_theme_dark_inversePrimary">#0058CB</color>
<color name="blue_md_theme_dark_shadow">#000000</color>
<color name="blue_md_theme_dark_surfaceTint">#B0C6FF</color>
<color name="blue_md_theme_dark_surfaceTintColor">#B0C6FF</color>
<color name="red_dark_accentLight">#C96052</color> <color name="red_md_theme_light_primary">#9F4034</color>
<color name="red_dark_accentDark">#D25545</color> <color name="red_md_theme_light_onPrimary">#FFFFFF</color>
<color name="red_dark_background">#1B0B09</color> <color name="red_md_theme_light_primaryContainer">#FFDAD5</color>
<color name="red_md_theme_light_onPrimaryContainer">#410000</color>
<color name="red_md_theme_light_secondary">#775652</color>
<color name="red_md_theme_light_onSecondary">#FFFFFF</color>
<color name="red_md_theme_light_secondaryContainer">#FFDAD5</color>
<color name="red_md_theme_light_onSecondaryContainer">#2C1512</color>
<color name="red_md_theme_light_tertiary">#705C2E</color>
<color name="red_md_theme_light_onTertiary">#FFFFFF</color>
<color name="red_md_theme_light_tertiaryContainer">#FCDFA6</color>
<color name="red_md_theme_light_onTertiaryContainer">#251A00</color>
<color name="red_md_theme_light_error">#BA1A1A</color>
<color name="red_md_theme_light_errorContainer">#FFDAD6</color>
<color name="red_md_theme_light_onError">#FFFFFF</color>
<color name="red_md_theme_light_onErrorContainer">#410002</color>
<color name="red_md_theme_light_background">#FFFBFF</color>
<color name="red_md_theme_light_onBackground">#201A19</color>
<color name="red_md_theme_light_surface">#FFFBFF</color>
<color name="red_md_theme_light_onSurface">#201A19</color>
<color name="red_md_theme_light_surfaceVariant">#F5DDDA</color>
<color name="red_md_theme_light_onSurfaceVariant">#534341</color>
<color name="red_md_theme_light_outline">#857370</color>
<color name="red_md_theme_light_inverseOnSurface">#FBEEEC</color>
<color name="red_md_theme_light_inverseSurface">#362F2E</color>
<color name="red_md_theme_light_inversePrimary">#FFB4A9</color>
<color name="red_md_theme_light_shadow">#000000</color>
<color name="red_md_theme_light_surfaceTint">#9F4034</color>
<color name="red_md_theme_light_surfaceTintColor">#9F4034</color>
<color name="red_md_theme_dark_primary">#FFB4A9</color>
<color name="red_md_theme_dark_onPrimary">#61120C</color>
<color name="red_md_theme_dark_primaryContainer">#7F291F</color>
<color name="red_md_theme_dark_onPrimaryContainer">#FFDAD5</color>
<color name="red_md_theme_dark_secondary">#E7BDB6</color>
<color name="red_md_theme_dark_onSecondary">#442925</color>
<color name="red_md_theme_dark_secondaryContainer">#5D3F3B</color>
<color name="red_md_theme_dark_onSecondaryContainer">#FFDAD5</color>
<color name="red_md_theme_dark_tertiary">#DEC38C</color>
<color name="red_md_theme_dark_onTertiary">#3E2E04</color>
<color name="red_md_theme_dark_tertiaryContainer">#574419</color>
<color name="red_md_theme_dark_onTertiaryContainer">#FCDFA6</color>
<color name="red_md_theme_dark_error">#FFB4AB</color>
<color name="red_md_theme_dark_errorContainer">#93000A</color>
<color name="red_md_theme_dark_onError">#690005</color>
<color name="red_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="red_md_theme_dark_background">#201A19</color>
<color name="red_md_theme_dark_onBackground">#EDE0DE</color>
<color name="red_md_theme_dark_surface">#201A19</color>
<color name="red_md_theme_dark_onSurface">#EDE0DE</color>
<color name="red_md_theme_dark_surfaceVariant">#534341</color>
<color name="red_md_theme_dark_onSurfaceVariant">#D8C2BE</color>
<color name="red_md_theme_dark_outline">#A08C89</color>
<color name="red_md_theme_dark_inverseOnSurface">#201A19</color>
<color name="red_md_theme_dark_inverseSurface">#EDE0DE</color>
<color name="red_md_theme_dark_inversePrimary">#9F4034</color>
<color name="red_md_theme_dark_shadow">#000000</color>
<color name="red_md_theme_dark_surfaceTint">#FFB4A9</color>
<color name="red_md_theme_dark_surfaceTintColor">#FFB4A9</color>
<color name="blue_light_accentLight">#1F75FE</color> <color name="yellow_md_theme_light_primary">#745B00</color>
<color name="blue_light_accentDark">#66A1FE</color> <color name="yellow_md_theme_light_onPrimary">#FFFFFF</color>
<color name="blue_light_background">#e3e1fb</color> <color name="yellow_md_theme_light_primaryContainer">#FFE08D</color>
<color name="yellow_md_theme_light_onPrimaryContainer">#241A00</color>
<color name="yellow_md_theme_light_secondary">#695D3F</color>
<color name="yellow_md_theme_light_onSecondary">#FFFFFF</color>
<color name="yellow_md_theme_light_secondaryContainer">#F2E1BB</color>
<color name="yellow_md_theme_light_onSecondaryContainer">#231B04</color>
<color name="yellow_md_theme_light_tertiary">#47664A</color>
<color name="yellow_md_theme_light_onTertiary">#FFFFFF</color>
<color name="yellow_md_theme_light_tertiaryContainer">#C9ECC8</color>
<color name="yellow_md_theme_light_onTertiaryContainer">#04210B</color>
<color name="yellow_md_theme_light_error">#BA1A1A</color>
<color name="yellow_md_theme_light_errorContainer">#FFDAD6</color>
<color name="yellow_md_theme_light_onError">#FFFFFF</color>
<color name="yellow_md_theme_light_onErrorContainer">#410002</color>
<color name="yellow_md_theme_light_background">#FFFBFF</color>
<color name="yellow_md_theme_light_onBackground">#1E1B16</color>
<color name="yellow_md_theme_light_surface">#FFFBFF</color>
<color name="yellow_md_theme_light_onSurface">#1E1B16</color>
<color name="yellow_md_theme_light_surfaceVariant">#EBE1CF</color>
<color name="yellow_md_theme_light_onSurfaceVariant">#4C4639</color>
<color name="yellow_md_theme_light_outline">#7E7667</color>
<color name="yellow_md_theme_light_inverseOnSurface">#F7F0E7</color>
<color name="yellow_md_theme_light_inverseSurface">#33302A</color>
<color name="yellow_md_theme_light_inversePrimary">#EBC248</color>
<color name="yellow_md_theme_light_shadow">#000000</color>
<color name="yellow_md_theme_light_surfaceTint">#745B00</color>
<color name="yellow_md_theme_light_surfaceTintColor">#745B00</color>
<color name="yellow_md_theme_dark_primary">#EBC248</color>
<color name="yellow_md_theme_dark_onPrimary">#3D2F00</color>
<color name="yellow_md_theme_dark_primaryContainer">#584400</color>
<color name="yellow_md_theme_dark_onPrimaryContainer">#FFE08D</color>
<color name="yellow_md_theme_dark_secondary">#D5C5A1</color>
<color name="yellow_md_theme_dark_onSecondary">#392F15</color>
<color name="yellow_md_theme_dark_secondaryContainer">#50462A</color>
<color name="yellow_md_theme_dark_onSecondaryContainer">#F2E1BB</color>
<color name="yellow_md_theme_dark_tertiary">#ADCFAD</color>
<color name="yellow_md_theme_dark_onTertiary">#19361F</color>
<color name="yellow_md_theme_dark_tertiaryContainer">#304D34</color>
<color name="yellow_md_theme_dark_onTertiaryContainer">#C9ECC8</color>
<color name="yellow_md_theme_dark_error">#FFB4AB</color>
<color name="yellow_md_theme_dark_errorContainer">#93000A</color>
<color name="yellow_md_theme_dark_onError">#690005</color>
<color name="yellow_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="yellow_md_theme_dark_background">#1E1B16</color>
<color name="yellow_md_theme_dark_onBackground">#E8E1D9</color>
<color name="yellow_md_theme_dark_surface">#1E1B16</color>
<color name="yellow_md_theme_dark_onSurface">#E8E1D9</color>
<color name="yellow_md_theme_dark_surfaceVariant">#4C4639</color>
<color name="yellow_md_theme_dark_onSurfaceVariant">#CFC5B4</color>
<color name="yellow_md_theme_dark_outline">#989080</color>
<color name="yellow_md_theme_dark_inverseOnSurface">#1E1B16</color>
<color name="yellow_md_theme_dark_inverseSurface">#E8E1D9</color>
<color name="yellow_md_theme_dark_inversePrimary">#745B00</color>
<color name="yellow_md_theme_dark_shadow">#000000</color>
<color name="yellow_md_theme_dark_surfaceTint">#EBC248</color>
<color name="yellow_md_theme_dark_surfaceTintColor">#EBC248</color>
<color name="blue_dark_accentLight">#1F75FE</color> <color name="green_md_theme_light_primary">#3E6A00</color>
<color name="blue_dark_accentDark">#0146B6</color> <color name="green_md_theme_light_onPrimary">#FFFFFF</color>
<color name="blue_dark_background">#0A0B15</color> <color name="green_md_theme_light_primaryContainer">#B9F474</color>
<color name="green_md_theme_light_onPrimaryContainer">#0F2000</color>
<color name="green_md_theme_light_secondary">#576249</color>
<color name="green_md_theme_light_onSecondary">#FFFFFF</color>
<color name="green_md_theme_light_secondaryContainer">#DBE7C8</color>
<color name="green_md_theme_light_onSecondaryContainer">#151E0B</color>
<color name="green_md_theme_light_tertiary">#386663</color>
<color name="green_md_theme_light_onTertiary">#FFFFFF</color>
<color name="green_md_theme_light_tertiaryContainer">#BBECE8</color>
<color name="green_md_theme_light_onTertiaryContainer">#00201E</color>
<color name="green_md_theme_light_error">#BA1A1A</color>
<color name="green_md_theme_light_errorContainer">#FFDAD6</color>
<color name="green_md_theme_light_onError">#FFFFFF</color>
<color name="green_md_theme_light_onErrorContainer">#410002</color>
<color name="green_md_theme_light_background">#FDFCF5</color>
<color name="green_md_theme_light_onBackground">#1B1C18</color>
<color name="green_md_theme_light_surface">#FDFCF5</color>
<color name="green_md_theme_light_onSurface">#1B1C18</color>
<color name="green_md_theme_light_surfaceVariant">#E1E4D5</color>
<color name="green_md_theme_light_onSurfaceVariant">#44483D</color>
<color name="green_md_theme_light_outline">#75796C</color>
<color name="green_md_theme_light_inverseOnSurface">#F2F1E9</color>
<color name="green_md_theme_light_inverseSurface">#30312C</color>
<color name="green_md_theme_light_inversePrimary">#9ED75B</color>
<color name="green_md_theme_light_shadow">#000000</color>
<color name="green_md_theme_light_surfaceTint">#3E6A00</color>
<color name="green_md_theme_light_surfaceTintColor">#3E6A00</color>
<color name="green_md_theme_dark_primary">#9ED75B</color>
<color name="green_md_theme_dark_onPrimary">#1E3700</color>
<color name="green_md_theme_dark_primaryContainer">#2E4F00</color>
<color name="green_md_theme_dark_onPrimaryContainer">#B9F474</color>
<color name="green_md_theme_dark_secondary">#BFCBAD</color>
<color name="green_md_theme_dark_onSecondary">#2A331E</color>
<color name="green_md_theme_dark_secondaryContainer">#404A33</color>
<color name="green_md_theme_dark_onSecondaryContainer">#DBE7C8</color>
<color name="green_md_theme_dark_tertiary">#A0D0CC</color>
<color name="green_md_theme_dark_onTertiary">#003735</color>
<color name="green_md_theme_dark_tertiaryContainer">#1F4E4B</color>
<color name="green_md_theme_dark_onTertiaryContainer">#BBECE8</color>
<color name="green_md_theme_dark_error">#FFB4AB</color>
<color name="green_md_theme_dark_errorContainer">#93000A</color>
<color name="green_md_theme_dark_onError">#690005</color>
<color name="green_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="green_md_theme_dark_background">#1B1C18</color>
<color name="green_md_theme_dark_onBackground">#E3E3DB</color>
<color name="green_md_theme_dark_surface">#1B1C18</color>
<color name="green_md_theme_dark_onSurface">#E3E3DB</color>
<color name="green_md_theme_dark_surfaceVariant">#44483D</color>
<color name="green_md_theme_dark_onSurfaceVariant">#C5C8BA</color>
<color name="green_md_theme_dark_outline">#8E9285</color>
<color name="green_md_theme_dark_inverseOnSurface">#1B1C18</color>
<color name="green_md_theme_dark_inverseSurface">#E3E3DB</color>
<color name="green_md_theme_dark_inversePrimary">#3E6A00</color>
<color name="green_md_theme_dark_shadow">#000000</color>
<color name="green_md_theme_dark_surfaceTint">#9ED75B</color>
<color name="green_md_theme_dark_surfaceTintColor">#9ED75B</color>
<color name="yellow_light_accentLight">#FFA000</color> <color name="purple_md_theme_light_primary">#9B3489</color>
<color name="yellow_light_accentDark">#FFB300</color> <color name="purple_md_theme_light_onPrimary">#FFFFFF</color>
<color name="yellow_light_background">#FFF8E1</color> <color name="purple_md_theme_light_primaryContainer">#FFD7F0</color>
<color name="purple_md_theme_light_onPrimaryContainer">#3A0032</color>
<color name="yellow_dark_accentLight">#D9B95C</color> <color name="purple_md_theme_light_secondary">#6F5767</color>
<color name="yellow_dark_accentDark">#D1B956</color> <color name="purple_md_theme_light_onSecondary">#FFFFFF</color>
<color name="yellow_dark_background">#19160B</color> <color name="purple_md_theme_light_secondaryContainer">#F9DAEC</color>
<color name="purple_md_theme_light_onSecondaryContainer">#281623</color>
<color name="green_light_accentLight">#7CB342</color> <color name="purple_md_theme_light_tertiary">#815341</color>
<color name="green_light_accentDark">#8BC34A</color> <color name="purple_md_theme_light_onTertiary">#FFFFFF</color>
<color name="green_light_background">#E8EFE2</color> <color name="purple_md_theme_light_tertiaryContainer">#FFDBCE</color>
<color name="purple_md_theme_light_onTertiaryContainer">#321205</color>
<color name="green_dark_accentLight">#8BC34A</color> <color name="purple_md_theme_light_error">#BA1A1A</color>
<color name="green_dark_accentDark">#33681E</color> <color name="purple_md_theme_light_errorContainer">#FFDAD6</color>
<color name="green_dark_background">#0B1307</color> <color name="purple_md_theme_light_onError">#FFFFFF</color>
<color name="purple_md_theme_light_onErrorContainer">#410002</color>
<color name="purple_light_accentLight">#7E57C2</color> <color name="purple_md_theme_light_background">#FFFBFF</color>
<color name="purple_light_accentDark">#B39DDB</color> <color name="purple_md_theme_light_onBackground">#1F1A1D</color>
<color name="purple_light_background">#EFEBF6</color> <color name="purple_md_theme_light_surface">#FFFBFF</color>
<color name="purple_md_theme_light_onSurface">#1F1A1D</color>
<color name="purple_dark_accentLight">#AA6F6B</color> <color name="purple_md_theme_light_surfaceVariant">#EFDEE6</color>
<color name="purple_dark_accentDark">#8F415B</color> <color name="purple_md_theme_light_onSurfaceVariant">#4F444A</color>
<color name="purple_dark_background">#201015</color> <color name="purple_md_theme_light_outline">#81737B</color>
<color name="purple_md_theme_light_inverseOnSurface">#F8EEF1</color>
<color name="purple_md_theme_light_inverseSurface">#342F32</color>
<color name="purple_md_theme_light_inversePrimary">#FFACE7</color>
<color name="purple_md_theme_light_shadow">#000000</color>
<color name="purple_md_theme_light_surfaceTint">#9B3489</color>
<color name="purple_md_theme_light_surfaceTintColor">#9B3489</color>
<color name="purple_md_theme_dark_primary">#FFACE7</color>
<color name="purple_md_theme_dark_onPrimary">#5E0052</color>
<color name="purple_md_theme_dark_primaryContainer">#7E186F</color>
<color name="purple_md_theme_dark_onPrimaryContainer">#FFD7F0</color>
<color name="purple_md_theme_dark_secondary">#DCBED0</color>
<color name="purple_md_theme_dark_onSecondary">#3E2A38</color>
<color name="purple_md_theme_dark_secondaryContainer">#56404F</color>
<color name="purple_md_theme_dark_onSecondaryContainer">#F9DAEC</color>
<color name="purple_md_theme_dark_tertiary">#F5B9A2</color>
<color name="purple_md_theme_dark_onTertiary">#4B2617</color>
<color name="purple_md_theme_dark_tertiaryContainer">#663C2B</color>
<color name="purple_md_theme_dark_onTertiaryContainer">#FFDBCE</color>
<color name="purple_md_theme_dark_error">#FFB4AB</color>
<color name="purple_md_theme_dark_errorContainer">#93000A</color>
<color name="purple_md_theme_dark_onError">#690005</color>
<color name="purple_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="purple_md_theme_dark_background">#1F1A1D</color>
<color name="purple_md_theme_dark_onBackground">#EAE0E3</color>
<color name="purple_md_theme_dark_surface">#1F1A1D</color>
<color name="purple_md_theme_dark_onSurface">#EAE0E3</color>
<color name="purple_md_theme_dark_surfaceVariant">#4F444A</color>
<color name="purple_md_theme_dark_onSurfaceVariant">#D2C2CA</color>
<color name="purple_md_theme_dark_outline">#9B8D94</color>
<color name="purple_md_theme_dark_inverseOnSurface">#1F1A1D</color>
<color name="purple_md_theme_dark_inverseSurface">#EAE0E3</color>
<color name="purple_md_theme_dark_inversePrimary">#9B3489</color>
<color name="purple_md_theme_dark_shadow">#000000</color>
<color name="purple_md_theme_dark_surfaceTint">#FFACE7</color>
<color name="purple_md_theme_dark_surfaceTintColor">#FFACE7</color>
</resources> </resources>

View File

@ -333,6 +333,7 @@
<string name="navigation_bar">Navigation bar</string> <string name="navigation_bar">Navigation bar</string>
<string name="select_at_least_one">Please select at least one item</string> <string name="select_at_least_one">Please select at least one item</string>
<string name="change_region">Trending seems to be unavailable for the current region. Please select another in the settings.</string> <string name="change_region">Trending seems to be unavailable for the current region. Please select another in the settings.</string>
<string name="limit_hls">Limit HLS to 1080p</string>
<!-- Notification channel strings --> <!-- Notification channel strings -->
<string name="download_channel_name">Download Service</string> <string name="download_channel_name">Download Service</string>

View File

@ -171,4 +171,12 @@
</style> </style>
<style name="snackBarStyle" parent="@style/Widget.Material3.Snackbar">
<item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.ExtraLarge</item>
<item name="android:paddingStart">20dp</item>
<item name="android:paddingEnd">20dp</item>
<item name="maxLines">2</item>
<item name="animationMode">slide</item>
</style>
</resources> </resources>

View File

@ -11,6 +11,8 @@
@style/Preference.SwitchPreferenceCompat.Material3 @style/Preference.SwitchPreferenceCompat.Material3
</item> </item>
<item name="snackbarStyle">@style/snackBarStyle</item>
</style> </style>
<style name="StartupTheme" parent="BaseTheme"> <style name="StartupTheme" parent="BaseTheme">
@ -22,76 +24,156 @@
<style name="Theme.Red" parent="BaseTheme"> <style name="Theme.Red" parent="BaseTheme">
<item name="colorPrimary">@color/red_light_accentLight</item> <item name="colorPrimary">@color/red_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/red_light_accentDark</item> <item name="colorOnPrimary">@color/red_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/red_light_accentLight</item> <item name="colorPrimaryContainer">@color/red_md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/red_light_accentLight</item> <item name="colorOnPrimaryContainer">@color/red_md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/red_light_accentLight</item> <item name="colorSecondary">@color/red_md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/red_light_accentDark</item> <item name="colorOnSecondary">@color/red_md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/red_light_accentDark</item> <item name="colorSecondaryContainer">@color/red_md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/red_light_background</item> <item name="colorOnSecondaryContainer">@color/red_md_theme_light_onSecondaryContainer</item>
<item name="android:colorBackground">@color/red_light_background</item> <item name="colorTertiary">@color/red_md_theme_light_tertiary</item>
<item name="colorOnBackground">@color/red_light_background</item> <item name="colorOnTertiary">@color/red_md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/red_md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/red_md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/red_md_theme_light_error</item>
<item name="colorErrorContainer">@color/red_md_theme_light_errorContainer</item>
<item name="colorOnError">@color/red_md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/red_md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/red_md_theme_light_background</item>
<item name="colorOnBackground">@color/red_md_theme_light_onBackground</item>
<item name="colorSurface">@color/red_md_theme_light_surface</item>
<item name="colorOnSurface">@color/red_md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/red_md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/red_md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/red_md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/red_md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/red_md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/red_md_theme_light_inversePrimary</item>
</style> </style>
<style name="Theme.Blue" parent="BaseTheme"> <style name="Theme.Blue" parent="BaseTheme">
<item name="colorPrimary">@color/blue_light_accentLight</item> <item name="colorPrimary">@color/blue_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/blue_light_accentDark</item> <item name="colorOnPrimary">@color/blue_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/blue_light_accentLight</item> <item name="colorPrimaryContainer">@color/blue_md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/blue_light_accentLight</item> <item name="colorOnPrimaryContainer">@color/blue_md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/blue_light_accentLight</item> <item name="colorSecondary">@color/blue_md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/blue_light_accentDark</item> <item name="colorOnSecondary">@color/blue_md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/blue_light_accentDark</item> <item name="colorSecondaryContainer">@color/blue_md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/blue_light_background</item> <item name="colorOnSecondaryContainer">@color/blue_md_theme_light_onSecondaryContainer</item>
<item name="android:colorBackground">@color/blue_light_background</item> <item name="colorTertiary">@color/blue_md_theme_light_tertiary</item>
<item name="colorOnBackground">@color/blue_light_background</item> <item name="colorOnTertiary">@color/blue_md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/blue_md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/blue_md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/blue_md_theme_light_error</item>
<item name="colorErrorContainer">@color/blue_md_theme_light_errorContainer</item>
<item name="colorOnError">@color/blue_md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/blue_md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/blue_md_theme_light_background</item>
<item name="colorOnBackground">@color/blue_md_theme_light_onBackground</item>
<item name="colorSurface">@color/blue_md_theme_light_surface</item>
<item name="colorOnSurface">@color/blue_md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/blue_md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/blue_md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/blue_md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/blue_md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/blue_md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/blue_md_theme_light_inversePrimary</item>
</style> </style>
<style name="Theme.Yellow" parent="BaseTheme"> <style name="Theme.Yellow" parent="BaseTheme">
<item name="colorPrimary">@color/yellow_light_accentLight</item> <item name="colorPrimary">@color/yellow_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/yellow_light_accentDark</item> <item name="colorOnPrimary">@color/yellow_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/yellow_light_accentLight</item> <item name="colorPrimaryContainer">@color/yellow_md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/yellow_light_accentLight</item> <item name="colorOnPrimaryContainer">@color/yellow_md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/yellow_light_accentLight</item> <item name="colorSecondary">@color/yellow_md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/yellow_light_accentDark</item> <item name="colorOnSecondary">@color/yellow_md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/yellow_light_accentDark</item> <item name="colorSecondaryContainer">@color/yellow_md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/yellow_light_background</item> <item name="colorOnSecondaryContainer">@color/yellow_md_theme_light_onSecondaryContainer</item>
<item name="android:colorBackground">@color/yellow_light_background</item> <item name="colorTertiary">@color/yellow_md_theme_light_tertiary</item>
<item name="colorOnBackground">@color/yellow_light_background</item> <item name="colorOnTertiary">@color/yellow_md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/yellow_md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/yellow_md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/yellow_md_theme_light_error</item>
<item name="colorErrorContainer">@color/yellow_md_theme_light_errorContainer</item>
<item name="colorOnError">@color/yellow_md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/yellow_md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/yellow_md_theme_light_background</item>
<item name="colorOnBackground">@color/yellow_md_theme_light_onBackground</item>
<item name="colorSurface">@color/yellow_md_theme_light_surface</item>
<item name="colorOnSurface">@color/yellow_md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/yellow_md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/yellow_md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/yellow_md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/yellow_md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/yellow_md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/yellow_md_theme_light_inversePrimary</item>
</style> </style>
<style name="Theme.Green" parent="BaseTheme"> <style name="Theme.Green" parent="BaseTheme">
<item name="colorPrimary">@color/green_light_accentLight</item> <item name="colorPrimary">@color/green_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/green_light_accentDark</item> <item name="colorOnPrimary">@color/green_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/green_light_accentLight</item> <item name="colorPrimaryContainer">@color/green_md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/green_light_accentLight</item> <item name="colorOnPrimaryContainer">@color/green_md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/green_light_accentLight</item> <item name="colorSecondary">@color/green_md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/green_light_accentDark</item> <item name="colorOnSecondary">@color/green_md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/green_light_accentDark</item> <item name="colorSecondaryContainer">@color/green_md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/green_light_background</item> <item name="colorOnSecondaryContainer">@color/green_md_theme_light_onSecondaryContainer</item>
<item name="android:colorBackground">@color/green_light_background</item> <item name="colorTertiary">@color/green_md_theme_light_tertiary</item>
<item name="colorOnBackground">@color/green_light_background</item> <item name="colorOnTertiary">@color/green_md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/green_md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/green_md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/green_md_theme_light_error</item>
<item name="colorErrorContainer">@color/green_md_theme_light_errorContainer</item>
<item name="colorOnError">@color/green_md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/green_md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/green_md_theme_light_background</item>
<item name="colorOnBackground">@color/green_md_theme_light_onBackground</item>
<item name="colorSurface">@color/green_md_theme_light_surface</item>
<item name="colorOnSurface">@color/green_md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/green_md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/green_md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/green_md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/green_md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/green_md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/green_md_theme_light_inversePrimary</item>
</style> </style>
<style name="Theme.Purple" parent="BaseTheme"> <style name="Theme.Purple" parent="BaseTheme">
<item name="colorPrimary">@color/purple_light_accentLight</item> <item name="colorPrimary">@color/purple_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/purple_light_accentDark</item> <item name="colorOnPrimary">@color/purple_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/purple_light_accentLight</item> <item name="colorPrimaryContainer">@color/purple_md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/purple_light_accentLight</item> <item name="colorOnPrimaryContainer">@color/purple_md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/purple_light_accentLight</item> <item name="colorSecondary">@color/purple_md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/purple_light_accentDark</item> <item name="colorOnSecondary">@color/purple_md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/purple_light_accentDark</item> <item name="colorSecondaryContainer">@color/purple_md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/purple_light_background</item> <item name="colorOnSecondaryContainer">@color/purple_md_theme_light_onSecondaryContainer</item>
<item name="android:colorBackground">@color/purple_light_background</item> <item name="colorTertiary">@color/purple_md_theme_light_tertiary</item>
<item name="colorOnBackground">@color/purple_light_background</item> <item name="colorOnTertiary">@color/purple_md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/purple_md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/purple_md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/purple_md_theme_light_error</item>
<item name="colorErrorContainer">@color/purple_md_theme_light_errorContainer</item>
<item name="colorOnError">@color/purple_md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/purple_md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/purple_md_theme_light_background</item>
<item name="colorOnBackground">@color/purple_md_theme_light_onBackground</item>
<item name="colorSurface">@color/purple_md_theme_light_surface</item>
<item name="colorOnSurface">@color/purple_md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/purple_md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/purple_md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/purple_md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/purple_md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/purple_md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/purple_md_theme_light_inversePrimary</item>
</style> </style>

View File

@ -38,6 +38,12 @@
app:title="@string/app_icon" app:title="@string/app_icon"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<Preference
android:icon="@drawable/ic_home"
app:key="nav_bar_items"
app:title="@string/navigation_bar" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory app:title="@string/app_behavior"> <PreferenceCategory app:title="@string/app_behavior">

View File

@ -66,6 +66,12 @@
app:title="@string/playerAudioFormat" app:title="@string/playerAudioFormat"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:icon="@drawable/ic_play_filled"
android:title="@string/limit_hls"
app:key="limit_hls" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory app:title="@string/background_mode"> <PreferenceCategory app:title="@string/background_mode">

View File

@ -38,15 +38,6 @@
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory app:title="@string/behavior">
<Preference
android:icon="@drawable/ic_home"
app:key="nav_bar_items"
app:title="@string/navigation_bar" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/misc"> <PreferenceCategory app:title="@string/misc">
<SwitchPreferenceCompat <SwitchPreferenceCompat