Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to set up a click or touch event for a UniversalVideoView ? #65

Open
BoumBam opened this issue Sep 4, 2020 · 0 comments

Comments

@BoumBam
Copy link

BoumBam commented Sep 4, 2020

I want to handle the click or touch event for the UniversalVideoView.
I tried the below:

`

    <FrameLayout
        android:id="@+id/video_layout"
        android:layout_width="0dp"
        android:layout_height="200dp"
        android:background="@android:color/black"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <com.universalvideoview.UniversalVideoView
            android:id="@+id/videoView"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_gravity="center"
            app:uvv_autoRotation="true"
            app:uvv_fitXY="false" />

        <com.universalvideoview.UniversalMediaController
            android:id="@+id/media_controller"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            app:uvv_scalable="true" />

    </FrameLayout>


videoView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(ImgVideoViewerActivity.this, "bien", Toast.LENGTH_SHORT).show();
            }
        });

        video_layout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(ImgVideoViewerActivity.this, "bien", Toast.LENGTH_SHORT).show();
            }
        });`

Bbut not work.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant