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:
parent
51237e8aef
commit
35bd0f46a4
@ -153,20 +153,20 @@ class PlayerActivity : AppCompatActivity() {
|
||||
|
||||
private fun updateShuffleSwitchUI(shuffleModeEnabled: Boolean) {
|
||||
val resId =
|
||||
if (shuffleModeEnabled) R.drawable.exo_controls_shuffle_on
|
||||
else R.drawable.exo_controls_shuffle_off
|
||||
if (shuffleModeEnabled) R.drawable.exo_styled_controls_shuffle_on
|
||||
else R.drawable.exo_styled_controls_shuffle_off
|
||||
findViewById<ImageView>(R.id.shuffle_switch)
|
||||
.setImageDrawable(ContextCompat.getDrawable(this, resId))
|
||||
}
|
||||
|
||||
private fun updateRepeatSwitchUI(repeatMode: Int) {
|
||||
var resId: Int
|
||||
when (repeatMode) {
|
||||
Player.REPEAT_MODE_OFF -> resId = R.drawable.exo_controls_repeat_off
|
||||
Player.REPEAT_MODE_ONE -> resId = R.drawable.exo_controls_repeat_one
|
||||
Player.REPEAT_MODE_ALL -> resId = R.drawable.exo_controls_repeat_all
|
||||
else -> resId = R.drawable.exo_icon_repeat_off
|
||||
}
|
||||
val resId: Int =
|
||||
when (repeatMode) {
|
||||
Player.REPEAT_MODE_OFF -> R.drawable.exo_styled_controls_repeat_off
|
||||
Player.REPEAT_MODE_ONE -> R.drawable.exo_styled_controls_repeat_one
|
||||
Player.REPEAT_MODE_ALL -> R.drawable.exo_styled_controls_repeat_all
|
||||
else -> R.drawable.exo_styled_controls_repeat_off
|
||||
}
|
||||
findViewById<ImageView>(R.id.repeat_switch)
|
||||
.setImageDrawable(ContextCompat.getDrawable(this, resId))
|
||||
}
|
||||
|
@ -46,7 +46,7 @@
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="10dp"
|
||||
android:textColor="@color/white"
|
||||
android:drawableLeft="@drawable/exo_controls_shuffle_on"
|
||||
android:drawableLeft="@drawable/exo_styled_controls_shuffle_on"
|
||||
android:text="@string/shuffle" />
|
||||
|
||||
<Button
|
||||
|
@ -79,7 +79,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/shuffle"
|
||||
android:src="@drawable/exo_controls_shuffle_off"
|
||||
android:src="@drawable/exo_styled_controls_shuffle_off"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
android:id="@+id/repeat_switch"
|
||||
android:layout_width="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:contentDescription="@string/repeat"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user