Skip to content

Commit

Permalink
Exoplayer: Increase space between rewind, pause, ffwd buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
mcclure committed Oct 25, 2023
1 parent a7cf5fc commit 84288d0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/main/res/layout/exo_player_control_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@
<ImageButton android:id="@id/exo_prev"
style="@style/ExoStyledControls.Button.Center.Previous"/>

<include layout="@layout/exo_player_control_rewind_button" />
<!-- Change from media3 default: Additional wrappers around rewind and ffwd to add spacing -->
<LinearLayout style="@style/TuskyExoPlayerRewindWrapper" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layoutDirection="ltr" android:layout_gravity="center">
<include layout="@layout/exo_player_control_rewind_button" />
</LinearLayout>

<ImageButton android:id="@id/exo_play_pause"
style="@style/ExoStyledControls.Button.Center.PlayPause"/>

<include layout="@layout/exo_player_control_ffwd_button" />
<LinearLayout style="@style/TuskyExoPlayerFfwdWrapper" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layoutDirection="ltr" android:layout_gravity="center">
<include layout="@layout/exo_player_control_ffwd_button" />
</LinearLayout>

<ImageButton android:id="@id/exo_next"
style="@style/ExoStyledControls.Button.Center.Next"/>
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,15 @@
<item name="materialDrawerMaskDrawable">@drawable/materialdrawer_shape_small</item>
<item name="materialDrawerDrawCircularShadow">false</item>
</style>

<!-- Used by exo_player_control_view.xml -->
<style name="TuskyExoPlayerRewindWrapper">
<item name="android:paddingRight">15dp</item>
</style>

<!-- Used by exo_player_control_view.xml -->
<style name="TuskyExoPlayerFfwdWrapper">
<item name="android:paddingLeft">15dp</item>
</style>

</resources>

0 comments on commit 84288d0

Please sign in to comment.