Workaround layout problems with Material Design
In some contexts (e.g. BottomSheetDialogFrament), Material Design themes will override the default of singleLine=false to true. This causes layout problems because the forward/rewind buttons are no longer visible with singleLine=true. This problem can be avoided by explicitly requesting the default value of false in our layout files. Issue: androidx/media#511 #minor-release PiperOrigin-RevId: 582604131
This commit is contained in:
parent
bd7615c0b8
commit
310e2edcca
@ -55,6 +55,9 @@
|
||||
`MediaMetadata.extras`
|
||||
([#756](https://github.com/androidx/media/issues/756)).
|
||||
* UI:
|
||||
* Fix issue where forward and rewind buttons are not visible when used
|
||||
with Material Design in a BottomSheetDialogFragment
|
||||
([#511](https://github.com/androidx/media/issues/511)).
|
||||
* Downloads:
|
||||
* OkHttp Extension:
|
||||
* Cronet Extension:
|
||||
|
@ -15,6 +15,10 @@
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Override of singleLine needed to avoid layout bugs with Material Design.
|
||||
See https://github.com/androidx/media/issues/511.
|
||||
-->
|
||||
<Button android:id="@+id/exo_ffwd_with_amount"
|
||||
android:singleLine="false"
|
||||
style="@style/ExoStyledControls.Button.Center.FfwdWithAmount"/>
|
||||
</merge>
|
||||
|
@ -15,6 +15,10 @@
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Override of singleLine needed to avoid layout bugs with Material Design.
|
||||
See https://github.com/androidx/media/issues/511.
|
||||
-->
|
||||
<Button android:id="@+id/exo_rew_with_amount"
|
||||
android:singleLine="false"
|
||||
style="@style/ExoStyledControls.Button.Center.RewWithAmount"/>
|
||||
</merge>
|
||||
|
@ -22,10 +22,14 @@
|
||||
android:addStatesFromChildren="true"
|
||||
style="@style/ExoStyledControls.Button.Center">
|
||||
<!-- View's don't have foreground until API 23 so we have to nest in a parent. -->
|
||||
<!-- Override of singleLine needed to avoid layout bugs with Material Design.
|
||||
See https://github.com/androidx/media/issues/511.
|
||||
-->
|
||||
<Button android:id="@id/exo_ffwd_with_amount"
|
||||
android:background="@drawable/exo_styled_controls_fastforward"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:singleLine="false"
|
||||
style="@style/ExoStyledControls.Button.Center.FfwdWithAmount"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
@ -22,10 +22,14 @@
|
||||
android:addStatesFromChildren="true"
|
||||
style="@style/ExoStyledControls.Button.Center">
|
||||
<!-- View's don't have foreground until API 23 so we have to nest in a parent. -->
|
||||
<!-- Override of singleLine needed to avoid layout bugs with Material Design.
|
||||
See https://github.com/androidx/media/issues/511.
|
||||
-->
|
||||
<Button android:id="@id/exo_rew_with_amount"
|
||||
android:background="@drawable/exo_styled_controls_rewind"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:singleLine="false"
|
||||
style="@style/ExoStyledControls.Button.Center.RewWithAmount"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user