Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyansh-Kedia committed Jul 30, 2021
1 parent 4b3bb5c commit 44225f1
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions customcamera/src/main/java/com/kedia/customcamera/CCMultiple.kt
Original file line number Diff line number Diff line change
Expand Up @@ -361,19 +361,13 @@ class CCMultiple: FrameLayout, CustomImageAdapter.CustomAdapterClick, LifecycleO
// Preview
cameraSelector = lensFacing

// surfaceView.preferredImplementationMode = PreviewView.ImplementationMode.SURFACE_VIEW
// surfaceView.implementationMode = PreviewView.ImplementationMode.COMPATIBLE

surfaceView.implementationMode = PreviewView.ImplementationMode.COMPATIBLE

val display = surfaceView.display
if (display == null) {
logE("called display")
// invalidate()
Thread.sleep(2000)
val rotation = if (surfaceView.display != null) {
surfaceView.display.rotation
} else {
surfaceView.rotation.toInt()
}
logE("called after slepp")
// val rotation = surfaceView.display.rotation
val rotation = surfaceView.rotation.toInt()

preview = Preview.Builder()
.setTargetRotation(rotation)
Expand Down

0 comments on commit 44225f1

Please sign in to comment.