Last active
May 17, 2019 05:41
-
-
Save realpacific/4f7638f98df4a4c948b3c377e0ddb045 to your computer and use it in GitHub Desktop.
Layout for video player UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<data> | |
<variable | |
name="url" | |
type="String"/> | |
<variable | |
name="callback" | |
type="com.realpacific.videodemo.PlayerStateCallback"/> | |
</data> | |
<androidx.constraintlayout.widget.ConstraintLayout | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.google.android.exoplayer2.ui.PlayerView | |
android:id="@+id/item_video_exoplayer" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:resize_mode="fill" | |
app:video_url="@{url}" | |
app:on_state_change="@{callback}" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintBottom_toBottomOf="parent"/> | |
</androidx.constraintlayout.widget.ConstraintLayout> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment