Use bottom toolbar in ViewImgurVideoFragment is available.

This commit is contained in:
Alex Ning
2021-08-04 14:01:42 +08:00
parent 123898c946
commit 27173031a1
5 changed files with 111 additions and 29 deletions

View File

@@ -83,4 +83,44 @@
</LinearLayout>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottom_navigation_exo_playback_control_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:backgroundTint="#80000000"
android:visibility="gone"
style="@style/Widget.MaterialComponents.BottomAppBar">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/title_text_view_exo_playback_control_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:textColor="#FFFFFF"
android:textSize="?attr/font_20"
android:fontFamily="?attr/font_family"
android:maxLines="1"
android:ellipsize="end" />
<ImageView
android:id="@+id/download_image_view_exo_playback_control_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:src="@drawable/ic_file_download_toolbar_white_24dp"
android:background="?attr/selectableItemBackgroundBorderless" />
</LinearLayout>
</com.google.android.material.bottomappbar.BottomAppBar>
</LinearLayout>

View File

@@ -1,15 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.exoplayer2.ui.PlayerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/player_view_view_imgur_video_fragment"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".fragments.ViewImgurVideoFragment">
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/player_view_view_imgur_video_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:controller_layout_id="@layout/exo_playback_control_view"/>
</RelativeLayout>
app:controller_layout_id="@layout/exo_playback_control_view"
tools:context=".fragments.ViewImgurVideoFragment" />