Finish initial work
This commit is contained in:
parent
93067a4599
commit
fe491e44bf
3 changed files with 7 additions and 3 deletions
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
|
@ -28,5 +28,6 @@
|
||||||
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
<option name="composableFile" value="true" />
|
<option name="composableFile" value="true" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
|
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
|
@ -22,7 +22,7 @@ android {
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
named("release") {
|
named("release") {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = true
|
||||||
setProguardFiles(
|
setProguardFiles(
|
||||||
listOf(
|
listOf(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
@ -30,6 +30,10 @@ android {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
named("debug") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
applicationIdSuffix = ".debug"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
|
@ -9,7 +9,6 @@ import android.content.pm.PackageManager
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Size
|
import android.util.Size
|
||||||
import android.webkit.URLUtil
|
import android.webkit.URLUtil
|
||||||
import android.widget.Toast
|
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
|
@ -51,6 +50,7 @@ class MainActivity : ComponentActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun Screen() {
|
fun Screen() {
|
||||||
var code by remember { mutableStateOf("") }
|
var code by remember { mutableStateOf("") }
|
||||||
|
@ -95,7 +95,6 @@ fun Screen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
LaunchedEffect(key1 = code) {
|
LaunchedEffect(key1 = code) {
|
||||||
Toast.makeText(context, "Test $doNotAsk $code", Toast.LENGTH_LONG).show()
|
|
||||||
if (doNotAsk && URLUtil.isValidUrl(code)) {
|
if (doNotAsk && URLUtil.isValidUrl(code)) {
|
||||||
uriHandler.openUri(code)
|
uriHandler.openUri(code)
|
||||||
code = ""
|
code = ""
|
||||||
|
|
Reference in a new issue