playback: actually fix controls not working
Turns out playback controls wouldn't actually work because the view would detach but not the actual fragment, resulting in onCreateView never being called and the entire system falling apart. This fixes it by just giving PlaybackLayout the viewmodel instance it needs. I'll need to release a hotfix for this issue since this is really easy the trigger and really hard to fix unless you know why it occurs. Android lifecycles suck so much.
This commit is contained in:
@@ -10,10 +10,6 @@
|
||||
name="song"
|
||||
type="org.oxycblt.auxio.music.Song" />
|
||||
|
||||
<variable
|
||||
name="callback"
|
||||
type="org.oxycblt.auxio.playback.PlaybackLayout.ActionCallback" />
|
||||
|
||||
</data>
|
||||
|
||||
<merge
|
||||
@@ -69,7 +65,6 @@
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
android:onClick="@{() -> callback.onPrev()}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@@ -84,7 +79,6 @@
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
android:onClick="@{() -> callback.onPlayPauseClick()}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_skip_next"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@@ -99,7 +93,6 @@
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
android:onClick="@{() -> callback.onNext()}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
name="song"
|
||||
type="org.oxycblt.auxio.music.Song" />
|
||||
|
||||
<variable
|
||||
name="callback"
|
||||
type="org.oxycblt.auxio.playback.PlaybackLayout.ActionCallback" />
|
||||
|
||||
</data>
|
||||
|
||||
<merge
|
||||
@@ -70,7 +66,6 @@
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
android:onClick="@{() -> callback.onPlayPauseClick()}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
Reference in New Issue
Block a user