use custom rewind/fast forward button with animations

This commit is contained in:
2020-11-16 19:23:06 +01:00
parent fd099e97e6
commit 6ce263832b
12 changed files with 215 additions and 17 deletions

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/imageButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentStart="true"
android:background="@android:color/transparent"
android:contentDescription="@string/forward_10"
android:scaleX="1.5"
android:scaleY="1.5"
app:srcCompat="@drawable/ic_baseline_forward_10_24" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerInParent="true"
android:layout_marginStart="42dp"
android:text="@string/fwd_10_s"
android:textColor="@color/exo_white"
android:visibility="gone" />
</RelativeLayout>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true">
<ImageButton
android:id="@+id/imageButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:background="@android:color/transparent"
android:contentDescription="@string/forward_10"
android:scaleX="1.5"
android:scaleY="1.5"
app:srcCompat="@drawable/ic_baseline_rewind_10_24" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerInParent="true"
android:layout_marginEnd="42dp"
android:text="@string/rwd_10_s"
android:textColor="@color/exo_white"
android:visibility="gone" />
</RelativeLayout>

View File

@ -2,6 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ff_test"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
@ -14,7 +15,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"

View File

@ -48,14 +48,10 @@
android:layout_height="1dp"
android:layout_weight="1" />
<ImageButton
android:id="@+id/exo_rew_10"
style="@style/ExoStyledControls.Button.Center.RewWithAmount"
android:layout_width="42dp"
android:layout_height="42dp"
android:contentDescription="@string/rewind_10"
android:tint="@color/exo_white" />
<org.mosad.teapod.ui.components.RewindButton
android:id="@+id/rwd_10"
android:layout_width="100dp"
android:layout_height="wrap_content" />
<Space
android:layout_width="0dp"
@ -75,12 +71,10 @@
android:layout_height="1dp"
android:layout_weight="1" />
<ImageButton
android:id="@+id/exo_ffwd_10"
style="@style/ExoStyledControls.Button.Center.FfwdWithAmount"
android:layout_width="42dp"
android:layout_height="42dp"
android:contentDescription="@string/forward_10" />
<org.mosad.teapod.ui.components.FastForwardButton
android:id="@+id/ffwd_10"
android:layout_width="100dp"
android:layout_height="wrap_content" />
<Space
android:layout_width="0dp"