From 7c22a1181421b91fea8244e22c81e007f3999a24 Mon Sep 17 00:00:00 2001 From: Rino Russo Date: Mon, 2 Sep 2024 22:50:43 +0200 Subject: [PATCH] Implemented widget #3485 #3455 #3188 #2690 #2526 #2177 #1539 #1430 #1323 #906 #588 #496 #288 #134 --- app/src/main/AndroidManifest.xml | 9 + .../fast4x/rimusic/service/PlayerService.kt | 10 + .../it/fast4x/rimusic/ui/widgets/Contents.kt | 215 ++++++++++++++++++ .../ui/widgets/PlayerHorizontalWidget.kt | 98 ++++++++ .../ui/widgets/PlayerVerticalWidget.kt | 7 +- .../res/drawable/player_horizontal_widget.xml | 190 ++++++++++++++++ app/src/main/res/values-af/strings.xml | 1 + app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-ba/strings.xml | 1 + app/src/main/res/values-bn/strings.xml | 1 + app/src/main/res/values-ca/strings.xml | 1 + app/src/main/res/values-cs/strings.xml | 1 + app/src/main/res/values-da/strings.xml | 1 + app/src/main/res/values-de/strings.xml | 1 + app/src/main/res/values-el/strings.xml | 1 + app/src/main/res/values-en/strings.xml | 1 + app/src/main/res/values-eo/strings.xml | 1 + app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-et/strings.xml | 1 + app/src/main/res/values-fa/strings.xml | 1 + app/src/main/res/values-fi/strings.xml | 1 + app/src/main/res/values-fil/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-ga/strings.xml | 1 + app/src/main/res/values-gl/strings.xml | 1 + app/src/main/res/values-he/strings.xml | 1 + app/src/main/res/values-hi/strings.xml | 1 + app/src/main/res/values-hu/strings.xml | 1 + app/src/main/res/values-ia/strings.xml | 1 + app/src/main/res/values-id/strings.xml | 1 + app/src/main/res/values-in/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-iw/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values-ko/strings.xml | 1 + app/src/main/res/values-ml/strings.xml | 1 + app/src/main/res/values-nl/strings.xml | 1 + app/src/main/res/values-no/strings.xml | 1 + app/src/main/res/values-or/strings.xml | 1 + app/src/main/res/values-pl/strings.xml | 1 + app/src/main/res/values-pt-rBR/strings.xml | 1 + app/src/main/res/values-pt/strings.xml | 1 + app/src/main/res/values-ro/strings.xml | 1 + app/src/main/res/values-ru/strings.xml | 1 + app/src/main/res/values-si/strings.xml | 1 + app/src/main/res/values-sr-rCS/strings.xml | 1 + app/src/main/res/values-sr/strings.xml | 1 + app/src/main/res/values-sv/strings.xml | 1 + app/src/main/res/values-te/strings.xml | 1 + app/src/main/res/values-tr/strings.xml | 1 + app/src/main/res/values-uk/strings.xml | 1 + app/src/main/res/values-vi/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values-zh/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + .../res/xml/player_horizontal_widget_info.xml | 10 + .../res/xml/player_vertical_widget_info.xml | 2 +- 58 files changed, 587 insertions(+), 4 deletions(-) create mode 100644 app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/Contents.kt create mode 100644 app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerHorizontalWidget.kt create mode 100644 app/src/main/res/drawable/player_horizontal_widget.xml create mode 100644 app/src/main/res/xml/player_horizontal_widget_info.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b575a09681..935d5c8e53 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -151,6 +151,15 @@ android:name="android.appwidget.provider" android:resource="@xml/player_vertical_widget_info" /> + + + + + + (null) @@ -2020,6 +2022,14 @@ class PlayerService : InvincibleService(), bitmap = bitmapProvider.bitmap, player = player ) + playerHorizontalWidget.updateInfo( + context = applicationContext, + songTitle = songTitle, + songArtist = songArtist, + isPlaying = isPlaying, + bitmap = bitmapProvider.bitmap, + player = player + ) } } diff --git a/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/Contents.kt b/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/Contents.kt new file mode 100644 index 0000000000..6c6082cc48 --- /dev/null +++ b/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/Contents.kt @@ -0,0 +1,215 @@ +package it.fast4x.rimusic.ui.widgets + +import android.content.Context +import androidx.annotation.OptIn +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import androidx.datastore.preferences.core.Preferences +import androidx.glance.GlanceModifier +import androidx.glance.GlanceTheme +import androidx.glance.Image +import androidx.glance.ImageProvider +import androidx.glance.action.actionStartActivity +import androidx.glance.action.clickable +import androidx.glance.background +import androidx.glance.currentState +import androidx.glance.layout.Alignment +import androidx.glance.layout.Column +import androidx.glance.layout.Row +import androidx.glance.layout.fillMaxWidth +import androidx.glance.layout.height +import androidx.glance.layout.padding +import androidx.glance.layout.width +import androidx.glance.text.Text +import androidx.media3.common.util.UnstableApi +import it.fast4x.rimusic.MainActivity +import it.fast4x.rimusic.R +import it.fast4x.rimusic.ui.widgets.PlayerHorizontalWidget.Companion.isPlayingKey +import it.fast4x.rimusic.ui.widgets.PlayerHorizontalWidget.Companion.songArtistKey +import it.fast4x.rimusic.ui.widgets.PlayerHorizontalWidget.Companion.songTitleKey +import it.fast4x.rimusic.ui.widgets.PlayerHorizontalWidget.Companion.widgetBitmap +import it.fast4x.rimusic.ui.widgets.PlayerHorizontalWidget.Companion.widgetPlayer + + +@OptIn(UnstableApi::class) +@Composable +fun WidgetActiveVerticalContent(context: Context) { + val preferences = currentState() + Column( + modifier = GlanceModifier.fillMaxWidth() + .background(GlanceTheme.colors.widgetBackground) + .padding(4.dp), + verticalAlignment = Alignment.Top, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text(text = preferences[PlayerVerticalWidget.songTitleKey] ?: "", modifier = GlanceModifier) + Text(text = preferences[PlayerVerticalWidget.songArtistKey] ?: "", modifier = GlanceModifier) + //Text(text = "isPlaying: ${preferences[isPlayingKey]}", modifier = GlanceModifier) + + Row( + modifier = GlanceModifier.fillMaxWidth() + .background(GlanceTheme.colors.widgetBackground) + .padding(vertical = 12.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalAlignment = Alignment.CenterHorizontally + ) { + + Image( + provider = ImageProvider(R.drawable.play_skip_back), + contentDescription = "back", + modifier = GlanceModifier + .clickable { + PlayerVerticalWidget.widgetPlayer.seekToPrevious() + } + ) + + Image( + provider = ImageProvider( + if (preferences[PlayerVerticalWidget.isPlayingKey] == true) { + R.drawable.pause + } else { + R.drawable.play + } + ), + contentDescription = "play/pause", + modifier = GlanceModifier.padding(horizontal = 20.dp) + .clickable { + if (preferences[PlayerVerticalWidget.isPlayingKey] == true) { + PlayerVerticalWidget.widgetPlayer.pause() + } else { + PlayerVerticalWidget.widgetPlayer.play() + } + } + ) + + Image( + provider = ImageProvider(R.drawable.play_skip_forward), + contentDescription = "next", + modifier = GlanceModifier + .clickable { + PlayerVerticalWidget.widgetPlayer.seekToNext() + } + ) + + } + + + Image( + provider = ImageProvider(PlayerVerticalWidget.widgetBitmap), + contentDescription = "cover", + modifier = GlanceModifier.padding(horizontal = 5.dp) + .clickable ( + onClick = actionStartActivity() + /* + onClick = actionStartActivity( + Intent( context, MainActivity::class.java) + .putExtra("expandPlayerBottomSheet", true) + + ) + */ + ) + + ) + + + } + +} + +@OptIn(UnstableApi::class) +@Composable +fun WidgetActiveHorizontalContent(context: Context) { + val preferences = currentState() + Row( + modifier = GlanceModifier.fillMaxWidth() + .background(GlanceTheme.colors.widgetBackground) + .padding(4.dp), + verticalAlignment = Alignment.Top, + horizontalAlignment = Alignment.Start + ) { + + Image( + provider = ImageProvider(widgetBitmap), + contentDescription = "cover", + modifier = GlanceModifier.padding(start = 5.dp, end = 20.dp) + .width(120.dp).height(120.dp) + .clickable ( + onClick = actionStartActivity() + /* + onClick = actionStartActivity( + Intent( context, MainActivity::class.java) + .putExtra("expandPlayerBottomSheet", true) + + ) + */ + ) + + ) + + Column( + modifier = GlanceModifier.fillMaxWidth() + //.background(GlanceTheme.colors.widgetBackground) + .padding(vertical = 12.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text(text = preferences[songTitleKey] ?: "", modifier = GlanceModifier) + Text(text = preferences[songArtistKey] ?: "", modifier = GlanceModifier) + //Text(text = "isPlaying: ${preferences[isPlayingKey]}", modifier = GlanceModifier) + + + Row( + modifier = GlanceModifier + //.background(GlanceTheme.colors.widgetBackground) + .padding(vertical = 12.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalAlignment = Alignment.CenterHorizontally + ) { + + Image( + provider = ImageProvider(R.drawable.play_skip_back), + contentDescription = "back", + modifier = GlanceModifier + .clickable { + widgetPlayer.seekToPrevious() + } + ) + + Image( + provider = ImageProvider( + if (preferences[isPlayingKey] == true) { + R.drawable.pause + } else { + R.drawable.play + } + ), + contentDescription = "play/pause", + modifier = GlanceModifier.padding(horizontal = 20.dp) + .clickable { + if (preferences[isPlayingKey] == true) { + widgetPlayer.pause() + } else { + widgetPlayer.play() + } + } + ) + + Image( + provider = ImageProvider(R.drawable.play_skip_forward), + contentDescription = "next", + modifier = GlanceModifier + .clickable { + widgetPlayer.seekToNext() + } + ) + + } + } + + + + + } + +} diff --git a/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerHorizontalWidget.kt b/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerHorizontalWidget.kt new file mode 100644 index 0000000000..3c5aaa8cfe --- /dev/null +++ b/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerHorizontalWidget.kt @@ -0,0 +1,98 @@ +package it.fast4x.rimusic.ui.widgets + +import android.content.Context +import android.graphics.Bitmap +import androidx.annotation.OptIn +import androidx.compose.runtime.Composable +import androidx.compose.ui.unit.dp +import androidx.datastore.preferences.core.Preferences +import androidx.datastore.preferences.core.booleanPreferencesKey +import androidx.datastore.preferences.core.stringPreferencesKey +import androidx.glance.GlanceId +import androidx.glance.GlanceModifier +import androidx.glance.GlanceTheme +import androidx.glance.Image +import androidx.glance.ImageProvider +import androidx.glance.action.actionStartActivity +import androidx.glance.action.clickable +import androidx.glance.appwidget.GlanceAppWidget +import androidx.glance.appwidget.GlanceAppWidgetManager +import androidx.glance.appwidget.GlanceAppWidgetReceiver +import androidx.glance.appwidget.provideContent +import androidx.glance.appwidget.state.updateAppWidgetState +import androidx.glance.background +import androidx.glance.currentState +import androidx.glance.layout.Alignment +import androidx.glance.layout.Column +import androidx.glance.layout.Row +import androidx.glance.layout.fillMaxWidth +import androidx.glance.layout.padding +import androidx.glance.state.GlanceStateDefinition +import androidx.glance.state.PreferencesGlanceStateDefinition +import androidx.glance.text.Text +import androidx.media3.common.util.UnstableApi +import androidx.media3.exoplayer.ExoPlayer +import it.fast4x.rimusic.MainActivity +import it.fast4x.rimusic.R +import it.fast4x.rimusic.ui.widgets.PlayerVerticalWidget.Companion.isPlayingKey +import it.fast4x.rimusic.ui.widgets.PlayerVerticalWidget.Companion.songArtistKey +import it.fast4x.rimusic.ui.widgets.PlayerVerticalWidget.Companion.songTitleKey +import it.fast4x.rimusic.ui.widgets.PlayerVerticalWidget.Companion.widgetBitmap +import it.fast4x.rimusic.ui.widgets.PlayerVerticalWidget.Companion.widgetPlayer +import it.fast4x.rimusic.utils.cleanPrefix + +class PlayerHorizontalWidgetReceiver : GlanceAppWidgetReceiver() { + override val glanceAppWidget: GlanceAppWidget = PlayerHorizontalWidget() +} + +class PlayerHorizontalWidget: GlanceAppWidget() { + companion object { + val songTitleKey = stringPreferencesKey("songTitleKey") + val songArtistKey = stringPreferencesKey("songArtistKey") + val isPlayingKey = booleanPreferencesKey("isPlayingKey") + var widgetBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888) + lateinit var widgetPlayer: ExoPlayer + } + + override val stateDefinition: GlanceStateDefinition<*> = PreferencesGlanceStateDefinition + + override suspend fun provideGlance(context: Context, id: GlanceId) { + + provideContent { + GlanceTheme { + WidgetActiveHorizontalContent(context) + } + } + } + + @OptIn(UnstableApi::class) + suspend fun updateInfo( + context: Context, + songTitle: String, + songArtist: String, + isPlaying: Boolean, + bitmap: Bitmap, + player: ExoPlayer + ) { + + val glanceId = + GlanceAppWidgetManager(context).getGlanceIds(PlayerHorizontalWidget::class.java).firstOrNull() + ?: return + + updateAppWidgetState(context, PreferencesGlanceStateDefinition, glanceId) { preferences -> + preferences.toMutablePreferences().apply { + this[songTitleKey] = cleanPrefix(songTitle) + this[songArtistKey] = songArtist + this[isPlayingKey] = isPlaying + } + } + + widgetBitmap = bitmap + widgetPlayer = player + PlayerHorizontalWidget().update(context, glanceId) + } + +} + + + diff --git a/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerVerticalWidget.kt b/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerVerticalWidget.kt index 8761e8a194..cdced5e378 100644 --- a/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerVerticalWidget.kt +++ b/app/src/main/kotlin/it/fast4x/rimusic/ui/widgets/PlayerVerticalWidget.kt @@ -64,7 +64,7 @@ class PlayerVerticalWidget: GlanceAppWidget() { provideContent { GlanceTheme { - WidgetActiveContent(context) + WidgetActiveVerticalContent(context) } } } @@ -119,10 +119,11 @@ fun WidgetContent() { } +/* @OptIn(UnstableApi::class) @Composable -fun WidgetActiveContent(context: Context) { +fun WidgetActiveVerticalContent(context: Context) { val preferences = currentState() Column( modifier = GlanceModifier.fillMaxWidth() @@ -204,4 +205,4 @@ fun WidgetActiveContent(context: Context) { } } - +*/ diff --git a/app/src/main/res/drawable/player_horizontal_widget.xml b/app/src/main/res/drawable/player_horizontal_widget.xml new file mode 100644 index 0000000000..1fe102ee9a --- /dev/null +++ b/app/src/main/res/drawable/player_horizontal_widget.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values-af/strings.xml b/app/src/main/res/values-af/strings.xml index 27e664cda8..fac55d2772 100644 --- a/app/src/main/res/values-af/strings.xml +++ b/app/src/main/res/values-af/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 79b14b5f31..e7ede6ba41 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ba/strings.xml b/app/src/main/res/values-ba/strings.xml index e0090f69da..1b9c2d939d 100644 --- a/app/src/main/res/values-ba/strings.xml +++ b/app/src/main/res/values-ba/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml index b13e9b8182..bc60600b70 100644 --- a/app/src/main/res/values-bn/strings.xml +++ b/app/src/main/res/values-bn/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 5f81f46f75..8c5398e0f5 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 39f496cd49..edc3cfe087 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index d748d91f2b..9f728253b9 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index ce8e38bad5..64863db1f3 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 9e173e4527..984476728c 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml index f510ccaef7..ead6dd9892 100644 --- a/app/src/main/res/values-en/strings.xml +++ b/app/src/main/res/values-en/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index a8d05ccf50..5aafc69d1c 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 46279b8eb1..a24ce5f432 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 25516e38fe..d5d170028c 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml index 1296233f3c..6ac9d272e1 100644 --- a/app/src/main/res/values-fa/strings.xml +++ b/app/src/main/res/values-fa/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index cdb64dc893..2a1fd6f0dc 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-fil/strings.xml b/app/src/main/res/values-fil/strings.xml index e565358317..3090ed6e20 100644 --- a/app/src/main/res/values-fil/strings.xml +++ b/app/src/main/res/values-fil/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f04ea08f9c..0ab477c591 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -733,4 +733,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ga/strings.xml b/app/src/main/res/values-ga/strings.xml index 89f0837217..ceb3519641 100644 --- a/app/src/main/res/values-ga/strings.xml +++ b/app/src/main/res/values-ga/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 92dd166266..4666cf5de9 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml index d90e378208..0ddd1bf711 100644 --- a/app/src/main/res/values-he/strings.xml +++ b/app/src/main/res/values-he/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 65dd87395c..e7d1142dff 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 8905e532bb..e4c144a622 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index d1ebab7271..e16e3c5a5b 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 8e222c782e..e4c829ca31 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index e0e4884f6c..64c04ec92e 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 0caee6b444..0dcede05d0 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 73dc1a5e49..6b3f49686a 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 8ba513d427..677d7e3bed 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 65098024e3..e1e66b5e49 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index b4d52690a1..9ea7b9b05e 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 1f95972128..7732710d53 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-no/strings.xml b/app/src/main/res/values-no/strings.xml index a6a7eb136d..d8426c26e6 100644 --- a/app/src/main/res/values-no/strings.xml +++ b/app/src/main/res/values-no/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-or/strings.xml b/app/src/main/res/values-or/strings.xml index 74a77454c5..681c2392cd 100644 --- a/app/src/main/res/values-or/strings.xml +++ b/app/src/main/res/values-or/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index faeab66f52..063b8d2c43 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 217cec1a54..46e189831c 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index f26bb7b52f..c9bd082401 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 0758393252..463e78bf41 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 7f8ec54880..9b7243d9d0 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-si/strings.xml b/app/src/main/res/values-si/strings.xml index ece95a56c9..ee6fbe5099 100644 --- a/app/src/main/res/values-si/strings.xml +++ b/app/src/main/res/values-si/strings.xml @@ -732,4 +732,5 @@ CC-BY-SA 3.0 Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-sr-rCS/strings.xml b/app/src/main/res/values-sr-rCS/strings.xml index dde541a4a7..fd5279eac4 100644 --- a/app/src/main/res/values-sr-rCS/strings.xml +++ b/app/src/main/res/values-sr-rCS/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 2b87a11f1e..ebed44351f 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index f4ea9f6f9b..03a85ceb04 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-te/strings.xml b/app/src/main/res/values-te/strings.xml index 7d669d8c71..128ddcb6b0 100644 --- a/app/src/main/res/values-te/strings.xml +++ b/app/src/main/res/values-te/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 038605938a..510358e1e2 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index a8de8df556..df76213ac0 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index dae28aa5e1..de78449e1b 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index a5c560ae53..930747b99a 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 942a414580..60a8306ce7 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index d75a90b3d7..be0b6774f5 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7075adf6bb..dafab202ee 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -731,4 +731,5 @@ Do you really want to refetch this song? Playback time and cached data will be wiped.\\nThis action is irreversible. Does not save playback events used for statistics, history and suggestions in quick pics Vertical widget + Horizontal widget diff --git a/app/src/main/res/xml/player_horizontal_widget_info.xml b/app/src/main/res/xml/player_horizontal_widget_info.xml new file mode 100644 index 0000000000..06e78e3ef5 --- /dev/null +++ b/app/src/main/res/xml/player_horizontal_widget_info.xml @@ -0,0 +1,10 @@ + + diff --git a/app/src/main/res/xml/player_vertical_widget_info.xml b/app/src/main/res/xml/player_vertical_widget_info.xml index 93351f9953..e58b90e49c 100644 --- a/app/src/main/res/xml/player_vertical_widget_info.xml +++ b/app/src/main/res/xml/player_vertical_widget_info.xml @@ -6,5 +6,5 @@ android:minHeight="150dp" android:previewImage="@drawable/player_vertical_widget" android:resizeMode="horizontal|vertical" - android:updatePeriodMillis="3600000" + android:updatePeriodMillis="0" android:widgetCategory="home_screen" />