This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.tonyxlab.qrcraft.presentation.screens.scan.components | |
| import androidx.compose.foundation.Canvas | |
| import androidx.compose.foundation.layout.Arrangement | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.fillMaxHeight | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.foundation.layout.padding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.tonyxlab.qrcraft.presentation.screens.scan.components | |
| import android.view.ViewGroup | |
| import androidx.annotation.OptIn | |
| import androidx.camera.camera2.interop.ExperimentalCamera2Interop | |
| import androidx.camera.core.Camera | |
| import androidx.camera.core.CameraSelector | |
| import androidx.camera.core.FocusMeteringAction | |
| import androidx.camera.core.ImageAnalysis | |
| import androidx.camera.core.Preview |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun ScanOverlay( | |
| modifier: Modifier = Modifier, | |
| hint: String | |
| ) { | |
| val scrimColor = MaterialTheme.colorScheme.scrim.copy(alpha = 0.65f) | |
| Box(modifier = modifier) { | |
| Canvas( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| private fun DrawingsCounter( | |
| count: Int, | |
| modifier: Modifier = Modifier | |
| ) { | |
| Box( | |
| modifier = modifier | |
| .padding(start = MaterialTheme.spacing.spaceTen * 2) | |
| .wrapContentSize() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defaultConfig { | |
| applicationId = "com.uxstate.instantscore" | |
| minSdk = 21 | |
| targetSdk = 33 | |
| versionCode = 1 | |
| versionName = "1.0" | |
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | |
| vectorDrawables { | |
| useSupportLibrary = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*sending local broadcast*/ | |
| Intent broadcastIntent = new Intent("custom-intent"); | |
| LocalBroadcastManager.getInstance(context).sendBroadcast(broadcastIntent); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*inflating xml layout*/ | |
| LayoutInflater layoutInflater = LayoutInflater.from(MainActivity.this); | |
| layoutInflater.inflate(R.layout.activity_main,parent, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*creating a dynamic textview*/ | |
| TextView textView = new TextView(MainActivity.this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| File file = new File(context.getFilesDir(), filename); |
NewerOlder