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

Camera preview is not takin the entire screen #41

Open
radsen opened this issue Jan 11, 2018 · 4 comments
Open

Camera preview is not takin the entire screen #41

radsen opened this issue Jan 11, 2018 · 4 comments

Comments

@radsen
Copy link

radsen commented Jan 11, 2018

Hi I just want to start saying how much I like this library and how helpful it's been to me.

Let's get down to business:
I'm attaching the barcodeCapture to my activity but the camera preview is showing an empty space the size of the actionBar and the statusBar combined at the bottom.
How can I make the camera preview full screen?

@KingsMentor
Copy link
Owner

KingsMentor commented Jan 12, 2018

@radsen kindly post the snippet used and possibly screenshot.

@radsen
Copy link
Author

radsen commented Jan 22, 2018

Here is the image of how is looking

screen shot 2018-01-22 at 3 40 55 pm

This way I'm creating the fragment (Kotlin)
BarcodeCapture()
.setBarcodeFormat(Barcode.ALL_FORMATS)
.shouldAutoFocus(true)
.setSupportMultipleScan(false)
.setShowDrawRect(true)
.setRectColors(arrayOf(R.color.square_green))
.setShowFlash(false)

and I'm placing that fragment in this layout inside container:

<android.support.constraint.ConstraintLayout
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">

<include layout="@layout/view_toolbar"
    android:id="@+id/layout"
    app:layout_constraintTop_toBottomOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent"/>

<com.sothree.slidinguppanel.SlidingUpPanelLayout
    xmlns:sothree="http://schemas.android.com/apk/res-auto"
    android:id="@+id/slidingLayout"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:gravity="top"
    sothree:umanoPanelHeight="0dp"
    sothree:umanoShadowHeight="4dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toStartOf="@+id/verticalGuideline"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/layout">

    <LinearLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

    </LinearLayout>

    <TextView
        android:id="@+id/message"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center|top"
        android:text="The Awesome Sliding Up Panel"
        android:textSize="16sp" />

</com.sothree.slidinguppanel.SlidingUpPanelLayout>

<android.support.constraint.Guideline
    android:id="@+id/verticalGuideline"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    app:layout_constraintGuide_percent="0.5"/>

<LinearLayout
    android:id="@+id/actionContainer"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:orientation="vertical"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toEndOf="@id/verticalGuideline"
    app:layout_constraintTop_toBottomOf="@+id/layout">

</LinearLayout>

</android.support.constraint.ConstraintLayout>

@radsen
Copy link
Author

radsen commented Jan 22, 2018

And today I saw something new but I believe is coming from the GMV because with no QR in front is capturing values like these:

01-22 15:39:46.075 22561-23869/package D/Captured: 4121138737777
01-22 15:41:17.230 22561-24131/package D/Captured: 5907027698836

@seyidkanan
Copy link

+1

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

3 participants