August 2025
Intermediate to advanced
270 pages
6h 16m
English
Open MapFragment.kt and replace Text() with GoogleMap(). Sadly, Google Maps doesn’t work in the Compose Preview, so go ahead and remove the @Preview decoration on the function, too.
| | // ... |
| | import androidx.compose.ui.platform.ComposeView |
| » | import com.google.maps.android.compose.GoogleMap |
| | import com.masilotti.hikingjournal.R |
| | import dev.hotwire.navigation.destinations.HotwireDestinationDeepLink |
| | import dev.hotwire.navigation.fragments.HotwireFragment |
| | |
| | @HotwireDestinationDeepLink(uri = "hotwire://fragment/map") |
| | class MapFragment : HotwireFragment() { |
| | // ... |
| | } |
| | |
| | @Composable |
| | fun MapView() { |
| » | GoogleMap() ... |
Read now
Unlock full access