Skip to content

Commit bf82f55

Browse files
committed
refactor: import compose Locale instead of using fully qualified name
1 parent 457ced3 commit bf82f55

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

maps-app/src/main/java/com/google/maps/android/compose/GroundOverlayActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package com.google.maps.android.compose
1616

1717
import android.os.Bundle
18-
import java.util.Locale
18+
import androidx.compose.ui.text.intl.Locale
1919
import androidx.activity.ComponentActivity
2020
import androidx.activity.compose.setContent
2121
import androidx.activity.enableEdgeToEdge
@@ -156,7 +156,7 @@ fun GroundOverlayControls(
156156
Text(text = "Visible", modifier = Modifier.weight(1f))
157157
Switch(checked = isVisible, onCheckedChange = onVisibilityChange)
158158
}
159-
Text(text = "Transparency: ${String.format(androidx.compose.ui.text.intl.Locale.current.platformLocale, "%.2f", transparency)}")
159+
Text(text = "Transparency: ${String.format(Locale.current.platformLocale, "%.2f", transparency)}")
160160
Slider(
161161
value = transparency,
162162
onValueChange = onTransparencyChange,

maps-app/src/main/java/com/google/maps/android/compose/markerexamples/MarkerClusteringActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package com.google.maps.android.compose.markerexamples
1818

1919
import android.os.Bundle
2020
import android.util.Log
21-
import java.util.Locale
21+
import androidx.compose.ui.text.intl.Locale
2222
import androidx.activity.ComponentActivity
2323
import androidx.activity.compose.setContent
2424
import androidx.activity.enableEdgeToEdge
@@ -205,7 +205,7 @@ private fun CustomUiClustering(items: List<MyItem>) {
205205
clusterContent = { cluster ->
206206
CircleContent(
207207
modifier = Modifier.size(40.dp),
208-
text = "%,d".format(androidx.compose.ui.text.intl.Locale.current.platformLocale, cluster.size),
208+
text = "%,d".format(Locale.current.platformLocale, cluster.size),
209209
color = Color.Blue,
210210
)
211211
},
@@ -252,7 +252,7 @@ fun CustomRendererClustering(items: List<MyItem>) {
252252
clusterContent = { cluster ->
253253
CircleContent(
254254
modifier = Modifier.size(40.dp),
255-
text = "%,d".format(androidx.compose.ui.text.intl.Locale.current.platformLocale, cluster.size),
255+
text = "%,d".format(Locale.current.platformLocale, cluster.size),
256256
color = Color.Green,
257257
)
258258
},

0 commit comments

Comments
 (0)