Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ buildscript {
}

plugins {
id("org.jetbrains.dokka") version "2.1.0"
alias(libs.plugins.dokka)
alias(libs.plugins.compose.compiler) apply false
id("com.autonomousapps.dependency-analysis") version "3.4.1"
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false

id("com.github.ben-manes.versions") version "0.54.0"
}

val projectArtifactId by extra { project: Project ->
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ agp = "9.2.1"
dokka = "2.2.0"
gradleMavenPublishPlugin = "0.36.0"
kotlin = "2.3.21"
kotlinxCoroutines = "1.10.2"
kotlinxCoroutines = "1.11.0"

# Android
activitycompose = "1.13.0"
androidx-core = "1.18.0"
androidx-startup = "1.2.0"
compose-bom = "2026.03.00"
compose-bom = "2026.05.01"
constraintlayout = "2.2.1"

# Material
material = "1.13.0"
material = "1.14.0"
material3 = "1.4.0"
materialIconsExtendedAndroid = "1.7.8"

Expand All @@ -40,7 +40,7 @@ mockk = "1.14.9"
org-jacoco-core = "0.8.14"
jacoco-plugin = "0.2.1"
robolectric = "4.16.1"
screenshot = "0.0.1-alpha14"
screenshot = "0.0.1-alpha15"
truth = "1.4.5"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down Expand Up @@ -93,7 +93,7 @@ class CustomControlsActivity : ComponentActivity() {
) {
CircularProgressIndicator(
modifier = Modifier
.background(MaterialTheme.colors.background)
.background(MaterialTheme.colorScheme.background)
.wrapContentSize()
)
}
Expand Down Expand Up @@ -134,12 +134,12 @@ class CustomControlsActivity : ComponentActivity() {
Button(
modifier = modifier.padding(4.dp),
colors = ButtonDefaults.buttonColors(
backgroundColor = MaterialTheme.colors.onPrimary,
contentColor = MaterialTheme.colors.primary
containerColor = MaterialTheme.colorScheme.onPrimary,
contentColor = MaterialTheme.colorScheme.primary
),
onClick = onClick
) {
Text(text = text, style = MaterialTheme.typography.body1)
Text(text = text, style = MaterialTheme.typography.bodyLarge)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.geometry.Offset // For MarkerComposable anchor
import androidx.compose.ui.platform.ComposeView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.MaterialTheme
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.lifecycle.lifecycleScope
Expand Down Expand Up @@ -137,7 +137,7 @@ class LocationTrackingActivity : ComponentActivity() {
) {
CircularProgressIndicator(
modifier = Modifier
.background(MaterialTheme.colors.background)
.background(MaterialTheme.colorScheme.background)
.wrapContentSize()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
Expand Down Expand Up @@ -93,7 +93,7 @@ fun MapInColumn(
) {
Surface(
modifier = modifier,
color = MaterialTheme.colors.background
color = MaterialTheme.colorScheme.background
) {
var isMapLoaded by remember { mutableStateOf(false) }

Expand Down Expand Up @@ -159,7 +159,7 @@ fun MapInColumn(
) {
CircularProgressIndicator(
modifier = Modifier
.background(MaterialTheme.colors.background)
.background(MaterialTheme.colorScheme.background)
.wrapContentSize()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.rememberScrollState
import androidx.compose.material.Card
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.LocalTextStyle
import androidx.compose.material.ProvideTextStyle
import androidx.compose.material.Text
import androidx.compose.material.TextButton
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -215,7 +214,7 @@ private fun MapCard(
) {
Card(
Modifier.padding(16.dp),
elevation = 4.dp
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp)
) {
var mapLoaded by remember { mutableStateOf(false) }
var buildingFocused: Boolean? by remember { mutableStateOf(null) }
Expand Down Expand Up @@ -270,7 +269,7 @@ private fun MapCard(
}
}

AnimatedVisibility(!mapLoaded, enter = fadeIn(), exit = fadeOut()) {
androidx.compose.animation.AnimatedVisibility(!mapLoaded, enter = fadeIn(), exit = fadeOut()) {
Box(
Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.MaterialTheme
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand Down Expand Up @@ -59,7 +59,7 @@ class ScaleBarActivity : ComponentActivity() {
position = defaultCameraPosition
}

val scaleBackground = MaterialTheme.colors.background.copy(alpha = 0.4f)
val scaleBackground = MaterialTheme.colorScheme.background.copy(alpha = 0.4f)
val scaleBorderStroke = BorderStroke(width = 1.dp, DarkGray.copy(alpha = 0.2f))

Box(
Expand Down Expand Up @@ -122,7 +122,7 @@ class ScaleBarActivity : ComponentActivity() {
) {
CircularProgressIndicator(
modifier = Modifier
.background(MaterialTheme.colors.background)
.background(MaterialTheme.colorScheme.background)
.wrapContentSize()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.material.Switch
import androidx.compose.material.Text
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalWindowInfo
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -235,17 +235,17 @@ private fun CustomUiClustering(items: List<MyItem>) {
@OptIn(MapsComposeExperimentalApi::class)
@Composable
fun CustomRendererClustering(items: List<MyItem>) {
val configuration = LocalConfiguration.current
val screenHeight = configuration.screenHeightDp.dp
val screenWidth = configuration.screenWidthDp.dp
val windowInfo = LocalWindowInfo.current
val screenWidth = windowInfo.containerSize.width
val screenHeight = windowInfo.containerSize.height
val clusterManager = rememberClusterManager<MyItem>()

// Here the clusterManager is being customized with a NonHierarchicalViewBasedAlgorithm.
// This speeds up by a factor the rendering of items on the screen.
clusterManager?.setAlgorithm(
NonHierarchicalViewBasedAlgorithm(
screenWidth.value.toInt(),
screenHeight.value.toInt()
screenWidth,
screenHeight
)
)
val renderer = rememberClusterRenderer(
Expand Down
2 changes: 1 addition & 1 deletion maps-app/src/main/res/layout/activity_fragment_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:layout_margin="16dp"
android:background="#80000000"
android:padding="16dp"
android:text="Swipe to switch between views"
android:text="@string/swipe_to_switch"
android:textColor="@android:color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
1 change: 1 addition & 0 deletions maps-app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@
<string name="markers_title">Markers</string>
<string name="ui_integration_title">UI Integration</string>
<string name="performance_title">Performance</string>
<string name="swipe_to_switch">Swipe to switch between views</string>
</resources>
Loading