0
Column(modifier = Modifier.fillMaxSize().background(Color.DarkGray)) {
    if (isLocationPermissionGranted) {
        GoogleMap(
            modifier = Modifier
                .fillMaxWidth()
                .weight(1f),
            cameraPositionState = cameraPositionState,
            properties = MapProperties(isMyLocationEnabled = true)
        ) {
            ...
        }
    } else { // if displaying spacer instead then bottom content below is shown fine
        Spacer(modifier = Modifier.weight(1f))
    }
    Column( // bottom content below map
        modifier = Modifier
            .fillMaxWidth()
            .background(Color.White)
            .padding(16.dp)
    ) {
        Text(
            ...
        )
        Spacer(modifier = Modifier.padding(8.dp))
        Text(
            ...
        )
    }
}

if isLocationPermissionGranted is true:

enter image description here

the bottom content is not visible, why?

if isLocationPermissionGranted is false:

enter image description here

bottom content is visible, no issues

if I set weight for bottom content as well it ignores it, also it ignores any vertical arrangement setting for Column, even SpaceEvenly

user924
  • 8,146
  • 7
  • 57
  • 139

0 Answers0