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

Why the VideoView inside LensEnginePreview is always Stretched #77

Open
Ali-cryptoo opened this issue Jun 2, 2021 · 1 comment
Open

Comments

@Ali-cryptoo
Copy link

Ali-cryptoo commented Jun 2, 2021

Hi, I've noticed that the VideoView is always stretched, I tried to resize it with a custom height, but it doesn't work.

e.g. :

    <com.huawei.mlkit.sample.camera.LensEnginePreview
        android:id="@+id/preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/background"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="fitXY" />

        <VideoView
            android:id="@+id/video"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <com.huawei.mlkit.sample.views.overlay.GraphicOverlay
            android:id="@+id/graphic"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </com.huawei.mlkit.sample.camera.LensEnginePreview>
@Ali-cryptoo Ali-cryptoo changed the title Why the VideoView inside Lens Engine Preview is always Stretched Why the VideoView inside LensEnginePreview is always Stretched Jun 2, 2021
@SoftwareGift
Copy link

You may need to rotate it 90 degrees and resize it.Better landscape effect.

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

2 participants