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
This commit is contained in:
ibaker 2021-12-14 16:56:02 +00:00 committed by tonihei
parent 51237e8aef
commit 35bd0f46a4
3 changed files with 13 additions and 13 deletions

View File

@ -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))

View File

@ -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

View File

@ -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 @@
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"
/> />