view_ijk_lib_player.xml 4.68 KB
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000"
    tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">

    <SurfaceView
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:id="@+id/surfaceView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <ProgressBar
        android:id="@+id/loadingView"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@id/surfaceView"
        app:layout_constraintBottom_toBottomOf="@id/surfaceView"
        android:theme="@style/PlayerLoadingProgressBarStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
    <TextView
        android:visibility="gone"
        android:id="@+id/positionTextView"
        android:layout_marginLeft="10dp"
        android:layout_marginBottom="10dp"
        android:textColor="@android:color/white"
        android:text="00:00"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <SeekBar
        tools:visibility="visible"
        android:visibility="gone"
        app:layout_constraintStart_toEndOf="@id/positionTextView"
        app:layout_constraintEnd_toStartOf="@id/durationTextView"
        app:layout_constraintTop_toTopOf="@id/positionTextView"
        app:layout_constraintBottom_toBottomOf="@id/positionTextView"
        android:progressTint="@android:color/white"
        android:thumbTint="@android:color/white"
        android:progressBackgroundTint="#fff"
        android:id="@+id/seekBar"
        android:layout_width="0dp"
        android:layout_height="wrap_content" />

    <TextView
        tools:visibility="visible"
        android:visibility="gone"
        android:id="@+id/durationTextView"
        android:layout_marginRight="10dp"
        android:layout_marginBottom="10dp"
        android:textColor="@android:color/white"
        android:text="00:00"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/viewActionFullscreen"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <ImageView
        android:visibility="gone"
        android:padding="3dp"
        android:id="@+id/viewActionFullscreen"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/durationTextView"
        app:layout_constraintTop_toTopOf="@id/durationTextView"
        android:src="@drawable/selector_play_fullscreen"
        android:scaleType="fitXY"
        android:layout_width="35dp"
        android:layout_height="35dp"/>

    <ImageView
        android:visibility="gone"
        android:id="@+id/playButton"
        android:tint="@android:color/white"
        android:src="@drawable/ic_play_circle_ijklib"
        app:layout_constraintStart_toStartOf="@id/surfaceView"
        app:layout_constraintEnd_toEndOf="@id/surfaceView"
        app:layout_constraintTop_toTopOf="@id/surfaceView"
        app:layout_constraintBottom_toBottomOf="@id/surfaceView"
        android:layout_width="45dp"
        android:layout_height="45dp" />

    <ImageView
        android:visibility="gone"
        android:id="@+id/pauseButton"
        android:tint="@android:color/white"
        android:src="@drawable/ic_pause_circle_ijklib"
        app:layout_constraintStart_toStartOf="@id/surfaceView"
        app:layout_constraintEnd_toEndOf="@id/surfaceView"
        app:layout_constraintTop_toTopOf="@id/surfaceView"
        app:layout_constraintBottom_toBottomOf="@id/surfaceView"
        android:layout_width="45dp"
        android:layout_height="45dp" />
    <FrameLayout
        android:clickable="true"
        android:id="@+id/viewError"
        android:visibility="gone"
        android:background="@android:color/black"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <ImageView
            android:layout_gravity="center"
            android:src="@drawable/ic_error_ijklib"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </FrameLayout>
</merge>