playback: gracefully handle multi-window mode

Add a new layout that handles the edge-case where splitscreen is used
on a sufficently small device. Previously it would result in a squashed
landscape layout, but now it will show a layout that should fit fine in
most situations.
This commit is contained in:
OxygenCobalt
2021-11-26 09:54:59 -07:00
parent eaac1ad1a8
commit 35eb07410d
4 changed files with 209 additions and 18 deletions
@@ -22,7 +22,6 @@ import android.content.Context
import android.util.AttributeSet
import android.view.WindowInsets
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.postDelayed
import androidx.core.view.updatePadding
import com.google.android.material.color.MaterialColors
import org.oxycblt.auxio.R
@@ -89,5 +88,6 @@ class PlaybackBarView @JvmOverloads constructor(
fun clearCallback() {
mCallback = null
binding.callback = null
binding.executePendingBindings()
}
}
@@ -145,6 +145,8 @@ class PlaybackFragment : Fragment() {
}
}
logD(resources.configuration.smallestScreenWidthDp)
logD("Fragment Created.")
return binding.root