Как уместить SimpleExoPlayerView
в повернутом RelativeLayout
?
Это код:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/BackgroundPrimary"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/videocontainer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:rotation="90"
android:layout_weight="1">
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/player_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true"
app:resize_mode="fit"
app:surface_type="texture_view" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/Videobuttons"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageButton
android:id="@+id/videopause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/TRANSPARENT"
android:src="@android:drawable/ic_media_pause" />
<ImageButton
android:id="@+id/videoplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/TRANSPARENT"
android:src="@android:drawable/ic_media_play"
android:visibility="gone" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
Как мы можем разместить SimpleExoPlayerView
в повернутом виде в Android ?
Когда для поворота задано значение 0, видео видно целиком, но когда для поворота установлено значение 90, края видео не видны.
Как мы можем разместить видео внутри RelativeLayout
, которое повернуто на 90 градусов?