Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package de.tillhub.scanengine.common

import android.os.Build

internal enum class Manufacturer(open val value: String) {
VERIFONE("Verifone"),
OTHER("OTHER");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.lifecycle.repeatOnLifecycle
import androidx.viewbinding.ViewBinding
import com.google.android.material.snackbar.Snackbar
import de.tillhub.scanengine.R
import de.tillhub.scanengine.common.Manufacturer
import de.tillhub.scanengine.databinding.ActivityGoogleScanningBinding
import kotlinx.coroutines.launch
import java.util.concurrent.Executor
Expand Down Expand Up @@ -120,6 +121,13 @@ internal class GoogleScanningActivity : AppCompatActivity() {
val preview: Preview = Preview.Builder()
.build()
.also {
binding.previewView.apply {
if (Manufacturer.matches(Manufacturer.VERIFONE)) {
scaleX = -1f
scaleY = -1f
}
}

it.setSurfaceProvider(binding.previewView.surfaceProvider)
}

Expand Down