Update the map feature.
This commit is contained in:
parent
86b2054f0a
commit
53969a4174
122 changed files with 775 additions and 785 deletions
|
|
@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.navigationBarsPadding
|
|||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.shape.CutCornerShape
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Snackbar
|
||||
|
|
@ -20,9 +21,10 @@ import androidx.compose.material3.SnackbarHost
|
|||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.material3.surfaceColorAtElevation
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.compositionLocalOf
|
||||
import androidx.compose.runtime.derivedStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
|
|
@ -42,6 +44,8 @@ import com.pixelized.rplexicon.ui.theme.LexiconTheme
|
|||
import com.pixelized.rplexicon.utilitary.extentions.ddBorder
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
val NO_WINDOW_INSETS = WindowInsets(0, 0, 0, 0)
|
||||
|
||||
val LocalActivity = staticCompositionLocalOf<Activity> {
|
||||
error("Activity not available")
|
||||
}
|
||||
|
|
@ -51,7 +55,6 @@ val LocalSnack = staticCompositionLocalOf<SnackbarHostState> {
|
|||
val LocalRollOverlay = compositionLocalOf<BlurredRollOverlayHostState> {
|
||||
error("LocalRollOverlay not yet ready")
|
||||
}
|
||||
val NO_WINDOW_INSETS = WindowInsets(0, 0, 0, 0)
|
||||
|
||||
@AndroidEntryPoint
|
||||
class MainActivity : ComponentActivity() {
|
||||
|
|
@ -113,6 +116,15 @@ class MainActivity : ComponentActivity() {
|
|||
modifier = Modifier.navigationBarsPadding(),
|
||||
hostState = LocalSnack.current,
|
||||
) {
|
||||
val actionComposable: (@Composable () -> Unit)? =
|
||||
it.visuals.actionLabel?.let { actionLabel ->
|
||||
@Composable {
|
||||
TextButton(
|
||||
onClick = { it.performAction() },
|
||||
content = { Text(actionLabel) }
|
||||
)
|
||||
}
|
||||
}
|
||||
Snackbar(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp)
|
||||
|
|
@ -123,6 +135,7 @@ class MainActivity : ComponentActivity() {
|
|||
containerColor = MaterialTheme.colorScheme.surfaceColorAtElevation(
|
||||
elevation = elevation.value
|
||||
),
|
||||
action = actionComposable,
|
||||
content = {
|
||||
Text(
|
||||
modifier = Modifier.padding(vertical = 8.dp),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue