Android Question Exoplayer Background Color

Dieter Baumgartner

Member
Licensed User
Longtime User
Does anyone know, why the background color in Exoplayer or Simpleexoplayer is not changeable any longer. It run for quite a time like Erel wrote in the past post
https://www.b4x.com/android/forum/t...ckground-color-from-player.77285/#post-575004
but know it stays always black, no matter what color you put in the manifest file.
manifest:
'Für Exoplayer Hintergrundfarbe
CreateResource(values, colors.xml,
<resources>
    <color name="exoplayer_background">#f3a6c0</color>
</resources>
)
CreateResource(layout,  exo_simple_player_view.xml,

<merge xmlns:android="http://schemas.android.com/apk/res/android">

  <com.google.android.exoplayer2.ui.AspectRatioFrameLayout android:id="@id/exo_content_frame"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_gravity="center">

    <!-- Video surface will be inserted as the first child of the content frame. -->

    <View android:id="@id/exo_shutter"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/exoplayer_background"/>

    <ImageView android:id="@id/exo_artwork"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY"/>

    <com.google.android.exoplayer2.ui.SubtitleView android:id="@id/exo_subtitles"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

  </com.google.android.exoplayer2.ui.AspectRatioFrameLayout>

  <View android:id="@id/exo_controller_placeholder"
      android:layout_width="match_parent"
      android:layout_height="match_parent"/>

  <FrameLayout android:id="@id/exo_overlay"
      android:layout_width="match_parent"
      android:layout_height="match_parent"/>

</merge>
)
CreateResource(layout, exo_playback_control_view.xml,
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_gravity="bottom"
  android:layoutDirection="ltr"
  android:background="@color/exoplayer_background"
  android:orientation="vertical">

  <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:paddingTop="4dp"
    android:orientation="horizontal">

    <ImageButton android:id="@id/exo_prev"
      style="@style/ExoMediaButton.Previous"/>

    <ImageButton android:id="@id/exo_rew"
      style="@style/ExoMediaButton.Rewind"/>

    <ImageButton android:id="@id/exo_repeat_toggle"
      style="@style/ExoMediaButton"/>

    <ImageButton android:id="@id/exo_play"
      style="@style/ExoMediaButton.Play"/>

    <ImageButton android:id="@id/exo_pause"
      style="@style/ExoMediaButton.Pause"/>

    <ImageButton android:id="@id/exo_ffwd"
      style="@style/ExoMediaButton.FastForward"/>

    <ImageButton android:id="@id/exo_next"
      style="@style/ExoMediaButton.Next"/>

  </LinearLayout>

  <LinearLayout
    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:textSize="14sp"
      android:textStyle="bold"
      android:paddingLeft="4dp"
      android:paddingRight="4dp"
      android:includeFontPadding="false"
      android:textColor="#FFBEBEBE"/>

    <com.google.android.exoplayer2.ui.DefaultTimeBar
      android:id="@id/exo_progress"
      android:layout_width="0dp"
      android:layout_weight="1"
      android:layout_height="26dp"/>

    <TextView android:id="@id/exo_duration"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textSize="14sp"
      android:textStyle="bold"
      android:paddingLeft="4dp"
      android:paddingRight="4dp"
      android:includeFontPadding="false"
      android:textColor="#FFBEBEBE"/>

  </LinearLayout>

</LinearLayout>
 

Dieter Baumgartner

Member
Licensed User
Longtime User
Sorry, but it doesn*t change anything. Playerview always stays black colored. Use Exoplayer 1.52 and the newest additional libraries.

It worked in former versions, but now i am unable to change the colors. I deleted the entries in the manifest file.
Any other ideas how to change the color of simpleexoplayerview ?
 
Upvote 0

Dieter Baumgartner

Member
Licensed User
Longtime User
This is a good example, it changes the color of the background, but i wanted to change the color of the control panel that is still black and cannot find a way to touch this again ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…