-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
184 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
release | ||
fix: navigation |
This file contains 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
This file contains 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
51 changes: 51 additions & 0 deletions
51
app/src/main/java/com/k2fsa/sherpa/onnx/tts/engine/ui/ConfirmDeleteDialog.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.k2fsa.sherpa.onnx.tts.engine.ui | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.DeleteForever | ||
import androidx.compose.material3.AlertDialog | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TextButton | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.font.FontWeight | ||
import com.k2fsa.sherpa.onnx.tts.engine.R | ||
|
||
@Composable | ||
fun ConfirmDeleteDialog(onDismissRequest: () -> Unit, name: String, onConfirm: () -> Unit) { | ||
AlertDialog( | ||
onDismissRequest = onDismissRequest, | ||
title = { Text(stringResource(id = R.string.is_confirm_delete)) }, | ||
text = { | ||
Text( | ||
name, | ||
style = MaterialTheme.typography.titleMedium, | ||
fontWeight = FontWeight.Bold | ||
) | ||
}, | ||
confirmButton = { | ||
TextButton(onClick = { | ||
onConfirm() | ||
}) { | ||
Text( | ||
stringResource(id = R.string.delete), | ||
color = MaterialTheme.colorScheme.error, | ||
fontWeight = FontWeight.Bold | ||
) | ||
} | ||
}, | ||
dismissButton = { | ||
TextButton(onClick = onDismissRequest) { | ||
Text(stringResource(id = android.R.string.cancel)) | ||
} | ||
}, | ||
icon = { | ||
Icon( | ||
Icons.Default.DeleteForever, | ||
contentDescription = null, | ||
tint = MaterialTheme.colorScheme.error | ||
) | ||
} | ||
) | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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