Skip to content

Commit

Permalink
Fix adjust resize issue for bottom sheet
Browse files Browse the repository at this point in the history
Fix adjust resize issue for bottom sheet
  • Loading branch information
cp-megh-l authored Apr 26, 2024
2 parents 6305e7b + a7ece40 commit 9bb7262
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion countrypicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

ext {
PUBLISH_GROUP_ID = 'com.canopas.jetcountrypicker'
PUBLISH_VERSION = '1.1.0'
PUBLISH_VERSION = '1.1.1'
PUBLISH_ARTIFACT_ID = 'jetcountrypicker'
}
apply from: "${rootDir}/scripts/publish-module.gradle"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package com.canopas.campose.countrypicker

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.imeNestedScroll
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.BottomSheetDefaults
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalBottomSheet
Expand Down Expand Up @@ -50,7 +54,7 @@ import kotlinx.coroutines.launch
* @param countriesTextStyle The text style for the countries list.
* @param onDismissRequest Callback when the bottom sheet is dismissed.
*/
@OptIn(ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class)
@Composable
fun CountryPickerBottomSheet(
sheetState: SheetState = rememberModalBottomSheetState(skipPartiallyExpanded = false),
Expand Down Expand Up @@ -79,7 +83,8 @@ fun CountryPickerBottomSheet(
containerColor = containerColor,
contentColor = contentColor,
tonalElevation = tonalElevation,
scrimColor = scrimColor
scrimColor = scrimColor,
modifier = Modifier.fillMaxSize().imePadding().imeNestedScroll()
) {
bottomSheetTitle()

Expand Down Expand Up @@ -144,7 +149,7 @@ internal fun Countries(
style = textStyle
)
}
Divider(color = Color.LightGray, thickness = 0.5.dp)
HorizontalDivider(thickness = 0.5.dp, color = Color.LightGray)
}
}
}

0 comments on commit 9bb7262

Please sign in to comment.