Back to Exoplayer

AspectRatioFrameLayout.AspectRatioListener (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/ui/AspectRatioFrameLayout.AspectRatioListener.html

latest1.5 KB
Original Source

Package com.google.android.exoplayer2.ui

Interface AspectRatioFrameLayout.AspectRatioListener


public static interfaceAspectRatioFrameLayout.AspectRatioListener

Listener to be notified about changes of the aspect ratios of this view.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | onAspectRatioUpdated​(float targetAspectRatio, float naturalAspectRatio, boolean aspectRatioMismatch) | Called when either the target aspect ratio or the view aspect ratio is updated. |

Method Detail

- 

onAspectRatioUpdated

void onAspectRatioUpdated​(float targetAspectRatio,
                          float naturalAspectRatio,
                          boolean aspectRatioMismatch)

Called when either the target aspect ratio or the view aspect ratio is updated. Parameters:targetAspectRatio - The aspect ratio that has been set in AspectRatioFrameLayout.setAspectRatio(float)naturalAspectRatio - The natural aspect ratio of this view (before its width and height are modified to satisfy the target aspect ratio).aspectRatioMismatch - Whether the target and natural aspect ratios differ enough for changing the resize mode to have an effect.