fix: google bar code scanner for vpa

This commit is contained in:
Rajan Maurya 2024-04-11 06:41:53 -04:00 committed by Rajan Maurya
parent 0b98c34da6
commit 9568eb783f
5 changed files with 19 additions and 1 deletions

View File

@ -51,8 +51,11 @@ fun MfOutlinedTextField(
label: String,
isError: Boolean = false,
errorMessage: String = "",
singleLine: Boolean = false,
onValueChange: (String) -> Unit,
onKeyboardActions: (() -> Unit)? = null
onKeyboardActions: (() -> Unit)? = null,
trailingIcon: @Composable (() -> Unit)? = null,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default
) {
OutlinedTextField(
modifier = modifier,
@ -64,9 +67,12 @@ fun MfOutlinedTextField(
Text(text = errorMessage)
}
},
singleLine = singleLine,
trailingIcon = trailingIcon,
keyboardActions = KeyboardActions {
onKeyboardActions?.invoke()
},
keyboardOptions = keyboardOptions,
colors = OutlinedTextFieldDefaults.colors(
focusedBorderColor = Color.Black,
focusedLabelColor = Color.Black

View File

@ -62,6 +62,7 @@ androidxTracing = "1.3.0-alpha02"
coil = "2.6.0"
androidxMetrics = "1.0.0-beta01"
androidxBrowser = "1.8.0"
playServicesCodeScanner = "16.1.0"
[libraries]
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityVersion" }
@ -142,6 +143,7 @@ coil-kt-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "
coil-kt-svg = { group = "io.coil-kt", name = "coil-svg", version.ref = "coil" }
androidx-metrics = { group = "androidx.metrics", name = "metrics-performance", version.ref = "androidxMetrics" }
androidx-browser = { group = "androidx.browser", name = "browser", version.ref = "androidxBrowser" }
google-play-services-code-scanner = { group = "com.google.android.gms", name = "play-services-code-scanner", version.ref = "playServicesCodeScanner" }
# Dependencies of the included build-logic

View File

@ -96,6 +96,9 @@ dependencies {
implementation("androidx.compose.material:material:1.6.0")
implementation(libs.compose.country.code.picker) // remove after moving auth code to module
// Google Bar code scanner
implementation(libs.google.play.services.code.scanner)
//calender for date picking
implementation(libs.sheets.compose.dialogs.core)
implementation(libs.sheets.compose.dialogs.calender)

View File

@ -28,6 +28,10 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="barcode_ui"/>
<activity android:name=".standinginstruction.ui.SIDetailsActivity" />
<activity
android:name=".standinginstruction.ui.NewSIActivity"

View File

@ -354,5 +354,8 @@
<string name="permission_granted">Permission Granted</string>
<string name="permission_denied">Permission Denied</string>
<string name="storage_permission_is_required_to_access_gallery">Storage permission is required to access gallery.</string>
<string name="self_amount_transfer_is_not_allowed">Self Account transfer is not allowed</string>
<string name="insufficient_balance">Insufficient balance</string>
<string name="error_fetching_balance">Error fetching balance</string>
</resources>