Skip to content

Commit

Permalink
chore: add documentation that was missing
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgerardojacinto committed Dec 7, 2023
1 parent b9cf534 commit bfa1cad
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package com.outsystems.plugins.barcode.controller.helper

import android.graphics.Bitmap

/**
* Interface that provides the signature of the type's methods.
*/
interface OSBARCImageHelperInterface {
fun bitmapFromImageBytes(imageBytes: ByteArray): Bitmap
fun createSubsetBitmapFromSource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.google.mlkit.vision.barcode.BarcodeScannerOptions
import com.google.mlkit.vision.barcode.BarcodeScanning
import com.google.mlkit.vision.barcode.common.Barcode
import com.google.mlkit.vision.common.InputImage
import kotlinx.coroutines.runBlocking

/**
* Helper class that implements the OSBARCMLKitHelperInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ class OSBARCScannerActivity : ComponentActivity() {
/**
* Composable function, responsible for declaring the UI of the screen,
* as well as creating an instance of OSBARCBarcodeAnalyzer for image analysis.
* @param parameters the scan parameters
* @param windowSizeClass WindowSizeClass object to determine device type - phone or tablet
*/
@Composable
fun ScanScreen(parameters: OSBARCScanParameters, windowSizeClass: WindowSizeClass) {
Expand Down Expand Up @@ -294,6 +296,12 @@ class OSBARCScannerActivity : ComponentActivity() {
}
}

/**
* Composable function, responsible for determining which UI
* should be rendered: portrait or landscape
* @param parameters the scan parameters
* @param windowSizeClass WindowSizeClass object to determine device type - phone or tablet
*/
@Composable
fun ScanScreenUI(parameters: OSBARCScanParameters, windowSizeClass: WindowSizeClass) {
// actual UI on top of the camera stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ val ScanButtonCornerRadius = 4f.dp
val ScanButtonStrokeWidth = 1f.dp
val ActionButtonsDistance = 48f.dp

val SizeRatioWidth = 0.6
val SizeRatioHeight = 0.5
const val SizeRatioWidth = 0.6
const val SizeRatioHeight = 0.5

0 comments on commit bfa1cad

Please sign in to comment.