Commit 35bd0f46 by ibaker Committed by tonihei

Update the session demo app to refer to exo_styled drawables

This app uses the StyledPlayerView, so it should use the styled_
drawables.

PiperOrigin-RevId: 416315889
parent 51237e8a
...@@ -153,19 +153,19 @@ class PlayerActivity : AppCompatActivity() { ...@@ -153,19 +153,19 @@ class PlayerActivity : AppCompatActivity() {
private fun updateShuffleSwitchUI(shuffleModeEnabled: Boolean) { private fun updateShuffleSwitchUI(shuffleModeEnabled: Boolean) {
val resId = val resId =
if (shuffleModeEnabled) R.drawable.exo_controls_shuffle_on if (shuffleModeEnabled) R.drawable.exo_styled_controls_shuffle_on
else R.drawable.exo_controls_shuffle_off else R.drawable.exo_styled_controls_shuffle_off
findViewById<ImageView>(R.id.shuffle_switch) findViewById<ImageView>(R.id.shuffle_switch)
.setImageDrawable(ContextCompat.getDrawable(this, resId)) .setImageDrawable(ContextCompat.getDrawable(this, resId))
} }
private fun updateRepeatSwitchUI(repeatMode: Int) { private fun updateRepeatSwitchUI(repeatMode: Int) {
var resId: Int val resId: Int =
when (repeatMode) { when (repeatMode) {
Player.REPEAT_MODE_OFF -> resId = R.drawable.exo_controls_repeat_off Player.REPEAT_MODE_OFF -> R.drawable.exo_styled_controls_repeat_off
Player.REPEAT_MODE_ONE -> resId = R.drawable.exo_controls_repeat_one Player.REPEAT_MODE_ONE -> R.drawable.exo_styled_controls_repeat_one
Player.REPEAT_MODE_ALL -> resId = R.drawable.exo_controls_repeat_all Player.REPEAT_MODE_ALL -> R.drawable.exo_styled_controls_repeat_all
else -> resId = R.drawable.exo_icon_repeat_off else -> R.drawable.exo_styled_controls_repeat_off
} }
findViewById<ImageView>(R.id.repeat_switch) findViewById<ImageView>(R.id.repeat_switch)
.setImageDrawable(ContextCompat.getDrawable(this, resId)) .setImageDrawable(ContextCompat.getDrawable(this, resId))
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
android:layout_weight="1" android:layout_weight="1"
android:layout_margin="10dp" android:layout_margin="10dp"
android:textColor="@color/white" android:textColor="@color/white"
android:drawableLeft="@drawable/exo_controls_shuffle_on" android:drawableLeft="@drawable/exo_styled_controls_shuffle_on"
android:text="@string/shuffle" /> android:text="@string/shuffle" />
<Button <Button
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/shuffle" android:contentDescription="@string/shuffle"
android:src="@drawable/exo_controls_shuffle_off" android:src="@drawable/exo_styled_controls_shuffle_off"
android:textColor="@color/white" /> android:textColor="@color/white" />
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
android:id="@+id/repeat_switch" android:id="@+id/repeat_switch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/exo_controls_repeat_off" android:src="@drawable/exo_styled_controls_repeat_off"
android:textColor="@color/white" android:textColor="@color/white"
android:contentDescription="@string/repeat" android:contentDescription="@string/repeat"
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment