diff --git a/app/components/src/main/java/cc/wordview/app/components/media/AudioPlayer.kt b/app/components/src/main/java/cc/wordview/app/components/media/AudioPlayer.kt
index c1a763cf..587a0e1b 100644
--- a/app/components/src/main/java/cc/wordview/app/components/media/AudioPlayer.kt
+++ b/app/components/src/main/java/cc/wordview/app/components/media/AudioPlayer.kt
@@ -106,6 +106,19 @@ class AudioPlayer {
}
}
+ /**
+ * Sets the specified playback speed and toggles the player state,
+ * if it is playing it will pause and vice-versa.
+ */
+ fun togglePlay(playbackSpeed: Float) {
+ player.setPlaybackSpeed(playbackSpeed)
+
+ when (player.isPlaying) {
+ true -> pause()
+ false -> play()
+ }
+ }
+
fun play() {
player.play()
startPositionCheck()
diff --git a/app/components/src/main/java/cc/wordview/app/components/ui/FadeInAsyncImage.kt b/app/components/src/main/java/cc/wordview/app/components/ui/FadeInAsyncImage.kt
index e9306809..ce26c707 100644
--- a/app/components/src/main/java/cc/wordview/app/components/ui/FadeInAsyncImage.kt
+++ b/app/components/src/main/java/cc/wordview/app/components/ui/FadeInAsyncImage.kt
@@ -25,9 +25,10 @@ import coil3.compose.AsyncImage
* when the image is displayed.
*
* @param image The [Bitmap] image to be displayed. Can be null, in which case no image is shown.
+ * @param enabled If the image is enabled, defaults to `true`
*/
@Composable
-fun FadeInAsyncImage(image: Bitmap?) {
+fun FadeInAsyncImage(image: Bitmap?, enabled: Boolean = true) {
var isVisible by rememberSaveable { mutableStateOf(false) }
// This prevents the background from "flashing" due to recompositions (probably)
@@ -38,6 +39,10 @@ fun FadeInAsyncImage(image: Bitmap?) {
isVisible = true
}
+ LaunchedEffect(enabled) {
+ isVisible = enabled
+ }
+
AnimatedVisibility(
modifier = Modifier.fillMaxSize(),
visible = isVisible,
diff --git a/app/src/androidTest/java/cc/wordview/app/misc/AppSettingsTest.kt b/app/src/androidTest/java/cc/wordview/app/misc/AppSettingsTest.kt
index f7615371..cb567576 100644
--- a/app/src/androidTest/java/cc/wordview/app/misc/AppSettingsTest.kt
+++ b/app/src/androidTest/java/cc/wordview/app/misc/AppSettingsTest.kt
@@ -23,6 +23,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import cc.wordview.app.ComposeTest
+import cc.wordview.app.settings.AppSettings
import me.zhanghai.compose.preference.LocalPreferenceFlow
import me.zhanghai.compose.preference.ProvidePreferenceLocals
import org.junit.Test
@@ -52,19 +53,4 @@ class AppSettingsTest : ComposeTest() {
assert(langTag.length == 2)
}
}
-
- @Test
- fun getComposerMode() {
- setup {
- val composerMode = AppSettings.composerMode.get()
- }
- }
-
- @Test
- fun getComposerModePassingPreferences() {
- setup {
- val preferences by LocalPreferenceFlow.current.collectAsStateWithLifecycle()
- val composerMode = AppSettings.composerMode.get(preferences)
- }
- }
}
\ No newline at end of file
diff --git a/app/src/main/java/cc/wordview/app/settings/AppSettings.kt b/app/src/main/java/cc/wordview/app/settings/AppSettings.kt
new file mode 100644
index 00000000..0cb95215
--- /dev/null
+++ b/app/src/main/java/cc/wordview/app/settings/AppSettings.kt
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2025 Arthur Araujo
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package cc.wordview.app.settings
+
+object AppSettings {
+ val language = Setting(key = "language", defaultValue = "ja")
+}
\ No newline at end of file
diff --git a/app/src/main/java/cc/wordview/app/settings/PlayerSettings.kt b/app/src/main/java/cc/wordview/app/settings/PlayerSettings.kt
new file mode 100644
index 00000000..fcdf62e7
--- /dev/null
+++ b/app/src/main/java/cc/wordview/app/settings/PlayerSettings.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2025 Arthur Araujo
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package cc.wordview.app.settings
+
+object PlayerSettings {
+ val playbackSpeed = Setting(key = "player_playback_speed", defaultValue = 1.0f)
+ val backgroundImage = Setting(key = "player_background_image", defaultValue = true)
+ val composerMode = Setting(key = "player_composer_mode", defaultValue = false)
+}
\ No newline at end of file
diff --git a/app/src/main/java/cc/wordview/app/misc/AppSettings.kt b/app/src/main/java/cc/wordview/app/settings/Setting.kt
similarity index 55%
rename from app/src/main/java/cc/wordview/app/misc/AppSettings.kt
rename to app/src/main/java/cc/wordview/app/settings/Setting.kt
index 95e0035f..c585f814 100644
--- a/app/src/main/java/cc/wordview/app/misc/AppSettings.kt
+++ b/app/src/main/java/cc/wordview/app/settings/Setting.kt
@@ -15,7 +15,7 @@
* along with this program. If not, see .
*/
-package cc.wordview.app.misc
+package cc.wordview.app.settings
import android.annotation.SuppressLint
import androidx.compose.runtime.Composable
@@ -24,31 +24,26 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import me.zhanghai.compose.preference.LocalPreferenceFlow
import me.zhanghai.compose.preference.Preferences
-object AppSettings {
- val language = Setting(key = "language", defaultValue = "ja")
- val composerMode = Setting(key = "composer_mode", defaultValue = false)
-}
-
class Setting(val key: String, val defaultValue: T) {
- /**
- * Returns the saved setting value, if the value was not yet registered, this will
- * return the `defaultValue`
- */
- @SuppressLint("ComposableNaming")
- @Composable
- fun get(): T {
- val preferences by LocalPreferenceFlow.current.collectAsStateWithLifecycle()
- return get(preferences)
- }
+ /**
+ * Returns the saved setting value, if the value was not yet registered, this will
+ * return the `defaultValue`
+ */
+ @SuppressLint("ComposableNaming")
+ @Composable
+ fun get(): T {
+ val preferences by LocalPreferenceFlow.current.collectAsStateWithLifecycle()
+ return get(preferences)
+ }
- /**
- * Using the specified preferences instance, returns the saved
- * setting value, if the value was not yet registered, this will
- * return the `defaultValue`
- *
- * @param preferences The preferences that will be used
- */
- fun get(preferences: Preferences): T {
- return preferences.get(key) ?: defaultValue
- }
+ /**
+ * Using the specified preferences instance, returns the saved
+ * setting value, if the value was not yet registered, this will
+ * return the `defaultValue`
+ *
+ * @param preferences The preferences that will be used
+ */
+ fun get(preferences: Preferences): T {
+ return preferences.get(key) ?: defaultValue
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/cc/wordview/app/ui/activities/home/composables/Settings.kt b/app/src/main/java/cc/wordview/app/ui/activities/home/composables/Settings.kt
index a7b0d0bf..c653cb63 100644
--- a/app/src/main/java/cc/wordview/app/ui/activities/home/composables/Settings.kt
+++ b/app/src/main/java/cc/wordview/app/ui/activities/home/composables/Settings.kt
@@ -22,7 +22,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material.icons.Icons
-import androidx.compose.material.icons.outlined.Carpenter
import androidx.compose.material.icons.outlined.ImportExport
import androidx.compose.material.icons.outlined.NetworkPing
import androidx.compose.material.icons.outlined.Translate
@@ -39,7 +38,7 @@ import cc.wordview.app.components.ui.BackTopAppBar
import cc.wordview.app.extensions.localizedDisplayName
import cc.wordview.app.log.WordViewTree
import cc.wordview.app.log.exportLogs
-import cc.wordview.app.misc.AppSettings
+import cc.wordview.app.settings.AppSettings
import cc.wordview.app.ui.theme.poppinsFamily
import cc.wordview.gengolex.Language
import com.composegears.tiamat.compose.back
@@ -47,10 +46,8 @@ import com.composegears.tiamat.compose.navController
import com.composegears.tiamat.compose.navDestination
import com.composegears.tiamat.navigation.NavDestination
import me.zhanghai.compose.preference.ListPreferenceType
-import me.zhanghai.compose.preference.basicPreference
import me.zhanghai.compose.preference.listPreference
import me.zhanghai.compose.preference.preference
-import me.zhanghai.compose.preference.switchPreference
import timber.log.Timber
val SettingsScreen: NavDestination by navDestination {
@@ -152,26 +149,6 @@ val SettingsScreen: NavDestination by navDestination {
exportLogs(context, logs)
}
)
- @Suppress("KotlinConstantConditions", "SimplifyBooleanWithConstants")
- if (BuildConfig.BUILD_TYPE == "debug") {
- switchPreference(
- key = AppSettings.composerMode.key,
- defaultValue = AppSettings.composerMode.defaultValue,
- title = {
- Text(
- text = stringResource(R.string.composer_mode),
- fontFamily = poppinsFamily
- )
- },
- icon = {
- Icon(
- imageVector = Icons.Outlined.Carpenter,
- contentDescription = null
- )
- },
- summary = { Text(text = stringResource(R.string.provides_more_information_in_the_player_that_helps_writing_lyrics)) }
- )
- }
}
}
}
diff --git a/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/Home.kt b/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/Home.kt
index 8accaa21..e5d64527 100644
--- a/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/Home.kt
+++ b/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/Home.kt
@@ -48,10 +48,8 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import cc.wordview.app.R
-import cc.wordview.app.api.getStoredJwt
-import cc.wordview.app.components.ui.OneTimeEffect
import cc.wordview.app.extensions.getFlag
-import cc.wordview.app.misc.AppSettings
+import cc.wordview.app.settings.AppSettings
import cc.wordview.app.ui.activities.home.composables.ProfileScreen
import cc.wordview.app.ui.activities.home.composables.SettingsScreen
import cc.wordview.app.ui.activities.home.composables.history.HistoryScreen
@@ -64,7 +62,6 @@ import com.composegears.tiamat.compose.navDestination
import com.composegears.tiamat.compose.navigate
import com.composegears.tiamat.navigation.NavDestination
import kotlinx.coroutines.launch
-import timber.log.Timber
@OptIn(ExperimentalMaterial3Api::class)
val HomeScreen: NavDestination by navDestination {
diff --git a/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/LearnTab.kt b/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/LearnTab.kt
index 9f8f702d..993c021c 100644
--- a/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/LearnTab.kt
+++ b/app/src/main/java/cc/wordview/app/ui/activities/home/composables/home/LearnTab.kt
@@ -66,7 +66,7 @@ import me.vponomarenko.compose.shimmer.shimmer
import androidx.compose.ui.res.stringResource
import cc.wordview.app.database.entity.ViewedVideo
import cc.wordview.app.components.extensions.openActivity
-import cc.wordview.app.misc.AppSettings
+import cc.wordview.app.settings.AppSettings
import cc.wordview.app.ui.components.ContinueWatchingCard
@OptIn(ExperimentalMaterial3Api::class)
diff --git a/app/src/main/java/cc/wordview/app/ui/activities/player/PlayerActivity.kt b/app/src/main/java/cc/wordview/app/ui/activities/player/PlayerActivity.kt
index 47d6350b..5d8e6496 100644
--- a/app/src/main/java/cc/wordview/app/ui/activities/player/PlayerActivity.kt
+++ b/app/src/main/java/cc/wordview/app/ui/activities/player/PlayerActivity.kt
@@ -36,7 +36,7 @@ import androidx.core.view.WindowInsetsControllerCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import cc.wordview.app.components.extensions.setOrientationSensorLandscape
import cc.wordview.app.components.ui.CircularProgressIndicator
-import cc.wordview.app.misc.AppSettings
+import cc.wordview.app.settings.AppSettings
import cc.wordview.app.ui.activities.WordViewActivity
import cc.wordview.app.ui.activities.player.composables.ErrorScreen
import cc.wordview.app.ui.activities.player.composables.Player
diff --git a/app/src/main/java/cc/wordview/app/ui/activities/player/composables/Player.kt b/app/src/main/java/cc/wordview/app/ui/activities/player/composables/Player.kt
index 529d6d03..ba2eff33 100644
--- a/app/src/main/java/cc/wordview/app/ui/activities/player/composables/Player.kt
+++ b/app/src/main/java/cc/wordview/app/ui/activities/player/composables/Player.kt
@@ -25,8 +25,6 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
-import androidx.compose.foundation.layout.WindowInsets
-import androidx.compose.foundation.layout.displayCutout
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
@@ -35,6 +33,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.ClosedCaption
import androidx.compose.material.icons.filled.ClosedCaptionOff
+import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.filled.SkipNext
import androidx.compose.material.icons.filled.SkipPrevious
import androidx.compose.material3.ExperimentalMaterial3Api
@@ -56,12 +55,10 @@ import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.testTag
-import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.zIndex
import androidx.lifecycle.compose.collectAsStateWithLifecycle
-import cc.wordview.app.misc.AppSettings
import cc.wordview.app.components.ui.CircularProgressIndicator
import cc.wordview.app.components.ui.CrossfadeIconButton
import cc.wordview.app.components.ui.FadeInAsyncImage
@@ -72,9 +69,9 @@ import cc.wordview.app.components.ui.OneTimeEffect
import cc.wordview.app.components.ui.PlayerTopBar
import cc.wordview.app.components.ui.Seekbar
import cc.wordview.app.components.ui.findBiggerCutout
+import cc.wordview.app.settings.PlayerSettings
import cc.wordview.app.ui.components.TextCue
-
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun Player(videoId: String, viewModel: PlayerViewModel, innerPadding: PaddingValues) {
@@ -87,9 +84,12 @@ fun Player(videoId: String, viewModel: PlayerViewModel, innerPadding: PaddingVal
val activity = LocalActivity.current!!
val density = LocalDensity.current
- val composerMode = AppSettings.composerMode.get()
+ val composerMode = PlayerSettings.composerMode.get()
+ val playbackSpeed = PlayerSettings.playbackSpeed.get()
+ val backgroundImage = PlayerSettings.backgroundImage.get()
var captionsEnabled by remember { mutableStateOf(true) }
+ var showSettings by remember { mutableStateOf(false) }
LaunchedEffect(uiState.finalized) {
if (uiState.finalized) {
@@ -103,14 +103,27 @@ fun Player(videoId: String, viewModel: PlayerViewModel, innerPadding: PaddingVal
}
BackHandler { back() }
- OneTimeEffect { uiState.player.togglePlay() }
+ OneTimeEffect { uiState.player.togglePlay(playbackSpeed) }
Box(
modifier = Modifier
.fillMaxSize()
.testTag("interface")
) {
- FadeInAsyncImage(uiState.videoStream.getHQThumbnail())
+ FadeInAsyncImage(
+ image = uiState.videoStream.getHQThumbnail(),
+ enabled = backgroundImage,
+ )
+
+ if (showSettings) {
+ PlayerSettingsBottomSheet(
+ onDismissRequest = {
+ uiState.player.togglePlay(playbackSpeed)
+ showSettings = false
+ }
+ )
+ }
+
Column(
modifier = Modifier.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
@@ -187,6 +200,18 @@ fun Player(videoId: String, viewModel: PlayerViewModel, innerPadding: PaddingVal
contentDescription = "Back"
)
}
+ IconButton(
+ onClick = {
+ uiState.player.pause()
+ showSettings = true
+ },
+ modifier = Modifier.testTag("settings-toggle-button"),
+ ) {
+ Icon(
+ imageVector = Icons.Filled.Settings,
+ contentDescription = "Settings"
+ )
+ }
},
)
Seekbar(
diff --git a/app/src/main/java/cc/wordview/app/ui/activities/player/composables/PlayerSettingsBottomSheet.kt b/app/src/main/java/cc/wordview/app/ui/activities/player/composables/PlayerSettingsBottomSheet.kt
new file mode 100644
index 00000000..0ef12654
--- /dev/null
+++ b/app/src/main/java/cc/wordview/app/ui/activities/player/composables/PlayerSettingsBottomSheet.kt
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2025 Arthur Araujo
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package cc.wordview.app.ui.activities.player.composables
+
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.outlined.Hardware
+import androidx.compose.material.icons.outlined.PhotoSizeSelectActual
+import androidx.compose.material.icons.outlined.Speed
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.Icon
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.ModalBottomSheet
+import androidx.compose.material3.Text
+import androidx.compose.material3.rememberModalBottomSheetState
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.buildAnnotatedString
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import cc.wordview.app.BuildConfig
+import cc.wordview.app.R
+import cc.wordview.app.components.ui.Space
+import cc.wordview.app.settings.PlayerSettings
+import cc.wordview.app.ui.theme.poppinsFamily
+import me.zhanghai.compose.preference.ListPreferenceType
+import me.zhanghai.compose.preference.listPreference
+import me.zhanghai.compose.preference.switchPreference
+
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+fun PlayerSettingsBottomSheet(onDismissRequest: () -> Unit = {}) {
+ val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = false)
+
+ ModalBottomSheet(
+ onDismissRequest = onDismissRequest,
+ sheetState = sheetState,
+ containerColor = MaterialTheme.colorScheme.surfaceContainerLow
+ ) {
+ Row(
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(horizontal = 8.dp, vertical = 8.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ Text(
+ text = stringResource(R.string.player_settings),
+ style = MaterialTheme.typography.titleLarge,
+ modifier = Modifier
+ .padding(start = 6.dp)
+ .weight(1f),
+ textAlign = TextAlign.Left
+ )
+ }
+
+ Space(16.dp)
+
+ LazyColumn(modifier = Modifier.fillMaxSize()) {
+ listPreference(
+ key = PlayerSettings.playbackSpeed.key,
+ defaultValue = PlayerSettings.playbackSpeed.defaultValue,
+ values = listOf(
+ 1.5f,
+ 1.25f,
+ 1.0f,
+ 0.75f,
+ 0.5f,
+ ),
+ valueToText = { value ->
+ buildAnnotatedString {
+ append("${value}x")
+ }
+ },
+ title = {
+ Text(
+ text = stringResource(R.string.playback_speed),
+ fontFamily = poppinsFamily,
+ color = MaterialTheme.colorScheme.onSurface
+ )
+ },
+ summary = {
+ Text(
+ text = "${it}x",
+ fontFamily = poppinsFamily,
+ color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.7f)
+ )
+ },
+ icon = {
+ Icon(
+ imageVector = Icons.Outlined.Speed,
+ contentDescription = null,
+ tint = MaterialTheme.colorScheme.onSurface
+ )
+ },
+ type = ListPreferenceType.DROPDOWN_MENU,
+ )
+ switchPreference(
+ key = PlayerSettings.backgroundImage.key,
+ defaultValue = PlayerSettings.backgroundImage.defaultValue,
+ title = {
+ Text(
+ text = stringResource(R.string.background_image),
+ fontFamily = poppinsFamily,
+ color = MaterialTheme.colorScheme.onSurface
+ )
+ },
+ summary = {
+ Text(
+ text = stringResource(R.string.toggles_the_visibility_of_the_background_image),
+ fontFamily = poppinsFamily,
+ color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.7f)
+ )
+ },
+ icon = {
+ Icon(
+ imageVector = Icons.Outlined.PhotoSizeSelectActual,
+ contentDescription = null,
+ tint = MaterialTheme.colorScheme.onSurface
+ )
+ },
+ )
+ @Suppress("KotlinConstantConditions", "SimplifyBooleanWithConstants")
+ if (BuildConfig.BUILD_TYPE == "debug") {
+ switchPreference(
+ key = PlayerSettings.composerMode.key,
+ defaultValue = PlayerSettings.composerMode.defaultValue,
+ title = {
+ Text(
+ text = stringResource(R.string.composer_mode),
+ fontFamily = poppinsFamily,
+ color = MaterialTheme.colorScheme.onSurface
+ )
+ },
+ summary = {
+ Text(
+ text = stringResource(R.string.provides_more_information_in_the_player_that_helps_writing_lyrics),
+ fontFamily = poppinsFamily,
+ color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.7f)
+ )
+ },
+ icon = {
+ Icon(
+ imageVector = Icons.Outlined.Hardware,
+ contentDescription = null,
+ tint = MaterialTheme.colorScheme.onSurface
+ )
+ },
+ )
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/cc/wordview/app/ui/components/FontSizeUtils.kt b/app/src/main/java/cc/wordview/app/ui/components/FontSizeUtils.kt
index e789da0b..87d6c726 100644
--- a/app/src/main/java/cc/wordview/app/ui/components/FontSizeUtils.kt
+++ b/app/src/main/java/cc/wordview/app/ui/components/FontSizeUtils.kt
@@ -20,7 +20,7 @@ package cc.wordview.app.ui.components
import androidx.compose.runtime.Composable
import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.sp
-import cc.wordview.app.misc.AppSettings
+import cc.wordview.app.settings.AppSettings
import cc.wordview.gengolex.Language
@Composable
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 9ca24190..9a5fc075 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -61,4 +61,8 @@
O app encontrou um erro inesperado.\n
Reiniciar o aplicativo
Exportar a log de crash
+ Altera a visibilidade da imagem de fundo
+ Imagem de fundo
+ Velocidade de reprodução
+ Configurações do Player
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 329fd3b7..54dc3403 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -62,4 +62,8 @@
The app encountered an unexpected error.\n
Restart Application
Export Crash Logs
+ Toggles the visibility of the background image
+ Background image
+ Playback speed
+ Player Settings
\ No newline at end of file