-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Show members on map * Add permission banner on home screen * Refactor permissions screen * Map dark theme * Minor fix * Onboard screen fixes * Fix onboard screen * Fix location permission * Add sign-out and delete account options * Lint fix
- Loading branch information
1 parent
4b54dbc
commit e62fcd6
Showing
44 changed files
with
1,329 additions
and
624 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
61 changes: 61 additions & 0 deletions
61
app/src/main/java/com/canopas/catchme/ui/component/AppAlertDialog.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,61 @@ | ||
package com.canopas.catchme.ui.component | ||
|
||
import androidx.compose.material3.AlertDialog | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TextButton | ||
import androidx.compose.runtime.Composable | ||
import com.canopas.catchme.ui.theme.AppTheme | ||
|
||
@Composable | ||
fun AppAlertDialog( | ||
title: String?, | ||
subTitle: String, | ||
confirmBtnText: String?, | ||
dismissBtnText: String?, | ||
onConfirmClick: (() -> Unit)? = null, | ||
onDismissClick: (() -> Unit)? = null, | ||
isConfirmDestructive: Boolean = false | ||
) { | ||
AlertDialog( | ||
onDismissRequest = {}, | ||
containerColor = AppTheme.colorScheme.containerNormalOnSurface, | ||
title = { | ||
if (title != null) { | ||
Text( | ||
text = title, | ||
style = AppTheme.appTypography.header3 | ||
) | ||
} | ||
}, | ||
text = { | ||
Text( | ||
text = subTitle, | ||
style = AppTheme.appTypography.body1 | ||
) | ||
}, | ||
confirmButton = { | ||
if (confirmBtnText != null && onConfirmClick != null) { | ||
TextButton( | ||
onClick = (onConfirmClick) | ||
) { | ||
Text( | ||
text = confirmBtnText, | ||
style = AppTheme.appTypography.subTitle2, | ||
color = if (isConfirmDestructive) AppTheme.colorScheme.alertColor else AppTheme.colorScheme.primary | ||
) | ||
} | ||
} | ||
}, | ||
dismissButton = { | ||
if (dismissBtnText != null && onDismissClick != null) { | ||
TextButton(onClick = (onDismissClick)) { | ||
Text( | ||
text = dismissBtnText, | ||
style = AppTheme.appTypography.subTitle2, | ||
color = if (isConfirmDestructive) AppTheme.colorScheme.textSecondary else AppTheme.colorScheme.primary | ||
) | ||
} | ||
} | ||
} | ||
) | ||
} |
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
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
Oops, something went wrong.