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

Focus marker incorrectly drawn during fragment transitions #272

Closed
1 of 2 tasks
suarezu opened this issue Sep 21, 2018 · 6 comments
Closed
1 of 2 tasks

Focus marker incorrectly drawn during fragment transitions #272

suarezu opened this issue Sep 21, 2018 · 6 comments

Comments

@suarezu
Copy link

suarezu commented Sep 21, 2018

If you are trying to report a bug, please file the information below.
Prerequisites:

  • [ x] I am using the latest version
  • I can reproduce the bug in the demo app, and if not...
  • I have tried to reproduce the bug in the demo app

Detailed steps to reproduce the issue:

  1. in an androidx fragment's layout add a camera view, no specific attributes set, especially the gesture map:
    <com.otaliastudios.cameraview.CameraView android:id="@+id/camera" android:layout_width="match_parent" android:layout_height="match_parent" app:cameraJpegQuality="100" app:cameraPictureSizeMinHeight="1920" app:cameraPictureSizeMinWidth="1080" app:cameraSessionType="picture" />
  2. the fragment has a slide in/out transition in its parent activity
  3. when the back pressed and the fragment slides out, the focusMarker shows and slides off like a ghost

Expected behavior:

the focus marker should stay GONE if not mapped whenever it's focusing or not; even it's mapped, it should not slide along with the fragment's view hierarchy.

Actual behavior:

Screenshots:

Interesting logs:

You can use CameraLogger.setLogLevel(LEVEL_VERBOSE)
to add logs to logcat, and CameraLogger.registerLogger()
to handle logs yourself (e.g. export to file or a crash reporting service)
so you can collect data from your users.

@suarezu suarezu changed the title focusMarker slide off screen like a ghost focusMarker slides off screen like a ghost Sep 21, 2018
@natario1
Copy link
Owner

It will just follow your fragment wherever it goes. I think it is mapped by default, try mapping to none to disable

@natario1
Copy link
Owner

If you can, post a video here for us to see

@suarezu
Copy link
Author

suarezu commented Sep 25, 2018

sorry for the holiday off. I just turn TAP off but still the focusMarker shows when sliding. removing 2nd child of camera view doesnt work, now I have to reflect the mTapGestureLayout field to set it GONE.

The video is attached
ezgif-3-9220679412

@natario1
Copy link
Owner

You can set CameraView to invisible before animating. Anyway I will take a look at this!

@suarezu
Copy link
Author

suarezu commented Sep 25, 2018

thank you very much for investigating this little fault. wait for the update and use reflection for now; it works.

@natario1 natario1 changed the title focusMarker slides off screen like a ghost Focus marker incorrectly drawn during fragment transitions Dec 16, 2018
@natario1
Copy link
Owner

I'm closing this as we have a new way to draw markers and this edge case might be fixed now.
If you want to reopen please attach a GitHub repo where the issue is reproducible.

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

No branches or pull requests

2 participants