Skip to content

Commit

Permalink
Merge pull request #155 from newlogic/fix/mrz-landscape-crash
Browse files Browse the repository at this point in the history
Fix MRZ landscape crash
  • Loading branch information
jlduragos committed Oct 30, 2023
2 parents 4997f42 + f59c854 commit 507ce07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ class SmartScannerActivity : BaseActivity(), OnClickListener {
@SuppressLint("ClickableViewAccessibility", "UnsafeOptInUsageError")
private fun startCamera(analyzer: ImageAnalysis.Analyzer? = null, hasPDF417: Boolean = false) {
viewFinder.post {
if (viewFinder.display == null) return@post
this.getSystemService(Context.CAMERA_SERVICE) as CameraManager
val cameraProviderFuture = ProcessCameraProvider.getInstance(this)
cameraProviderFuture.addListener({
Expand Down
13 changes: 13 additions & 0 deletions core-lib/src/main/res/layout-land/activity_smart_scanner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/rect_guide"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="25dp"
android:layout_marginBottom="66dp"
android:contentDescription="@string/rectangle"
android:src="@drawable/rectangle_slim"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:adjustViewBounds="true" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/branding_image"
android:layout_width="64dp"
Expand Down

0 comments on commit 507ce07

Please sign in to comment.