diff --git a/app/src/main/java/org/mosad/teapod/ui/activity/player/PlayerActivity.kt b/app/src/main/java/org/mosad/teapod/ui/activity/player/PlayerActivity.kt
index 2fbc175..c3326db 100644
--- a/app/src/main/java/org/mosad/teapod/ui/activity/player/PlayerActivity.kt
+++ b/app/src/main/java/org/mosad/teapod/ui/activity/player/PlayerActivity.kt
@@ -229,7 +229,11 @@ class PlayerActivity : AppCompatActivity() {
else -> View.GONE
}
- controlsBinding.exoPlayPause.isVisible = !playerBinding.loading.isVisible
+ // don't use isVisible to hide exoPlayPause, as it will set the visibility to GONE
+ controlsBinding.exoPlayPause.visibility = when(playerBinding.loading.isVisible) {
+ true -> View.INVISIBLE
+ false -> View.VISIBLE
+ }
if (state == ExoPlayer.STATE_ENDED && hasNextEpisode() && Preferences.autoplay) {
playNextEpisode()
@@ -383,44 +387,14 @@ class PlayerActivity : AppCompatActivity() {
return (model.currentEpisode.nextEpisodeId != null && !model.currentEpisodeIsLastEpisode())
}
- /**
- * TODO set position of rewind/fast forward indicators programmatically
- */
-
private fun rewind() {
model.seekToOffset(rwdTime)
-
- // hide/show needed components
- playerBinding.exoDoubleTapIndicator.visibility = View.VISIBLE
- playerBinding.ffwd10Indicator.visibility = View.INVISIBLE
- controlsBinding.rwd10.visibility = View.INVISIBLE
-
- playerBinding.rwd10Indicator.onAnimationEndCallback = {
- playerBinding.exoDoubleTapIndicator.visibility = View.GONE
- playerBinding.ffwd10Indicator.visibility = View.VISIBLE
- controlsBinding.rwd10.visibility = View.VISIBLE
- }
-
- // run animation
- playerBinding.rwd10Indicator.runOnClickAnimation()
+ controlsBinding.rwd10.runOnClickAnimation()
}
private fun fastForward() {
model.seekToOffset(fwdTime)
-
- // hide/show needed components
- playerBinding.exoDoubleTapIndicator.visibility = View.VISIBLE
- playerBinding.rwd10Indicator.visibility = View.INVISIBLE
- controlsBinding.ffwd10.visibility = View.INVISIBLE
-
- playerBinding.ffwd10Indicator.onAnimationEndCallback = {
- playerBinding.exoDoubleTapIndicator.visibility = View.GONE
- playerBinding.rwd10Indicator.visibility = View.VISIBLE
- controlsBinding.ffwd10.visibility = View.VISIBLE
- }
-
- // run animation
- playerBinding.ffwd10Indicator.runOnClickAnimation()
+ controlsBinding.ffwd10.runOnClickAnimation()
}
private fun playNextEpisode() {
diff --git a/app/src/main/res/layout/activity_player.xml b/app/src/main/res/layout/activity_player.xml
index 81699da..3c89116 100644
--- a/app/src/main/res/layout/activity_player.xml
+++ b/app/src/main/res/layout/activity_player.xml
@@ -27,50 +27,6 @@
app:indicatorColor="@color/player_white"
tools:visibility="visible" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-