From 04cec8f355f075397efd205205788a9f94aa674e Mon Sep 17 00:00:00 2001 From: Mattias Buelens Date: Fri, 30 Jun 2023 12:12:20 +0200 Subject: [PATCH] Add reload button to demo --- .../java/com/theoplayer/android/ui/demo/MainActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt b/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt index f8f579f..1a1055f 100644 --- a/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt +++ b/app/src/main/java/com/theoplayer/android/ui/demo/MainActivity.kt @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Brush +import androidx.compose.material.icons.rounded.Refresh import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable @@ -60,6 +61,12 @@ fun MainContent() { Text(text = "Demo") }, actions = { + IconButton(onClick = { + player.source = source + player.play() + }) { + Icon(Icons.Rounded.Refresh, contentDescription = "Reload") + } IconButton(onClick = { themeMenuOpen = true }) { Icon(Icons.Rounded.Brush, contentDescription = "Theme") }