partially revert c34b95795f
This commit is contained in:
parent
8eb737a831
commit
4c55bb771f
@ -385,14 +385,44 @@ class PlayerActivity : AppCompatActivity() {
|
|||||||
return (model.currentEpisode.nextEpisodeId != null && !model.currentEpisodeIsLastEpisode())
|
return (model.currentEpisode.nextEpisodeId != null && !model.currentEpisodeIsLastEpisode())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO set position of rewind/fast forward indicators programmatically
|
||||||
|
*/
|
||||||
|
|
||||||
private fun rewind() {
|
private fun rewind() {
|
||||||
model.seekToOffset(rwdTime)
|
model.seekToOffset(rwdTime)
|
||||||
controlsBinding.rwd10.runOnClickAnimation()
|
|
||||||
|
// 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()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fastForward() {
|
private fun fastForward() {
|
||||||
model.seekToOffset(fwdTime)
|
model.seekToOffset(fwdTime)
|
||||||
controlsBinding.ffwd10.runOnClickAnimation()
|
|
||||||
|
// 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()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun playNextEpisode() {
|
private fun playNextEpisode() {
|
||||||
|
@ -27,6 +27,50 @@
|
|||||||
app:indicatorColor="@color/player_white"
|
app:indicatorColor="@color/player_white"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/exo_double_tap_indicator"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<org.mosad.teapod.ui.components.RewindButton
|
||||||
|
android:id="@+id/rwd_10_indicator"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="1dp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<org.mosad.teapod.ui.components.FastForwardButton
|
||||||
|
android:id="@+id/ffwd_10_indicator"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/button_next_ep"
|
android:id="@+id/button_next_ep"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
Loading…
Reference in New Issue
Block a user