diff options
author | Thomas <tschneider.ac@gmail.com> | 2024-01-30 16:43:10 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2024-01-30 16:43:10 +0100 |
commit | 4b051a42aeb94b155a4b6e960b5e6538f5846acd (patch) | |
tree | 61576546785e3f9bfb09ee28569aa13e43048a28 | |
parent | 6b751189267485d5026e0b3eaa77f549ecef8064 (diff) |
Add position/time for videos
-rw-r--r-- | app/src/main/res/layouts/mastodon/layout/fragment_slide_media.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/layouts/mastodon/layout/player_control_view.xml | 47 |
2 files changed, 48 insertions, 0 deletions
diff --git a/app/src/main/res/layouts/mastodon/layout/fragment_slide_media.xml b/app/src/main/res/layouts/mastodon/layout/fragment_slide_media.xml index 6b1c0a67a..e82be301d 100644 --- a/app/src/main/res/layouts/mastodon/layout/fragment_slide_media.xml +++ b/app/src/main/res/layouts/mastodon/layout/fragment_slide_media.xml @@ -77,6 +77,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" + app:controller_layout_id="@layout/player_control_view" android:layout_marginBottom="50dp" app:show_timeout="0" /> diff --git a/app/src/main/res/layouts/mastodon/layout/player_control_view.xml b/app/src/main/res/layouts/mastodon/layout/player_control_view.xml new file mode 100644 index 000000000..d0dff8442 --- /dev/null +++ b/app/src/main/res/layouts/mastodon/layout/player_control_view.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:orientation="vertical"> + + <ImageButton + android:layout_gravity="center" + android:id="@id/exo_play_pause" + style="@style/ExoMediaButton.Pause" /> + + <androidx.appcompat.widget.LinearLayoutCompat + android:id="@+id/seekbar_controller" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + + <TextView + android:id="@id/exo_position" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:includeFontPadding="false" + android:paddingLeft="4dp" + android:paddingRight="4dp" + android:textSize="12sp" /> + + <androidx.media3.ui.DefaultTimeBar + android:id="@id/exo_progress" + android:layout_width="wrap_content" + app:bar_height="6dp" + android:layout_height="26dp" + android:layout_weight="1" /> + + <TextView + android:id="@id/exo_duration" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:includeFontPadding="false" + android:paddingLeft="4dp" + android:paddingRight="4dp" + android:textSize="12sp" /> + + </androidx.appcompat.widget.LinearLayoutCompat> +</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file |