diff --git a/app/build.gradle b/app/build.gradle index d3d7dc217..8d1fc4d45 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -157,6 +157,10 @@ dependencies { implementation('com.google.code.gson:gson:2.9.0') implementation('androidx.webkit:webkit:1.4.0') + //lifecycle + def lifecycle_version = '2.4.1' + implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycle_version") + //compose // Integration with activities implementation 'androidx.activity:activity-compose:1.4.0' @@ -166,8 +170,6 @@ dependencies { implementation 'androidx.compose.animation:animation:1.1.1' // Tooling support (Previews, etc.) implementation 'androidx.compose.ui:ui-tooling:1.1.1' - // Integration with ViewModels - implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1' // UI Tests androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.1.1' @@ -187,10 +189,6 @@ dependencies { implementation("com.louiscad.splitties:splitties-systemservices:$splitties_version") implementation("com.louiscad.splitties:splitties-views:$splitties_version") - //lifecycle - def lifecycle_version = '2.4.1' - implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycle_version") - //room def room_version = '2.4.2' implementation("androidx.room:room-runtime:$room_version") diff --git a/app/src/main/java/io/legado/app/ui/widget/UrlOptionDialog.kt b/app/src/main/java/io/legado/app/ui/widget/UrlOptionDialog.kt new file mode 100644 index 000000000..7ef7fa167 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/widget/UrlOptionDialog.kt @@ -0,0 +1,27 @@ +package io.legado.app.ui.widget + +import androidx.compose.material.AlertDialog +import androidx.compose.material.Text +import androidx.compose.material.TextButton +import androidx.compose.runtime.Composable + + +@Composable +fun UrlOptionDialog(confirm: (String) -> Unit) { + AlertDialog( + onDismissRequest = {}, + confirmButton = { + TextButton(onClick = { + confirm.invoke("") + }) { + Text(text = "OK") + } + }, + dismissButton = { + TextButton(onClick = {}) { Text(text = "Cancel") } + }, + title = { + Text(text = "url参数") + } + ) +} \ No newline at end of file