diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..a77db37
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+RiderPro
\ No newline at end of file
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
index 127acd6..63137fc 100644
--- a/.idea/deploymentTargetSelector.xml
+++ b/.idea/deploymentTargetSelector.xml
@@ -4,29 +4,15 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7..35eb1dd 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/java/com/aiosman/riderpro/LocationDetail.kt b/app/src/main/java/com/aiosman/riderpro/LocationDetail.kt
index 428a94c..89f8236 100644
--- a/app/src/main/java/com/aiosman/riderpro/LocationDetail.kt
+++ b/app/src/main/java/com/aiosman/riderpro/LocationDetail.kt
@@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
@@ -33,22 +34,34 @@ import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.SheetValue
import androidx.compose.material3.Text
import androidx.compose.material3.rememberBottomSheetScaffoldState
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableIntStateOf
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.runtime.setValue
+import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.layout.onGloballyPositioned
+import androidx.compose.ui.layout.onSizeChanged
import androidx.compose.ui.platform.LocalConfiguration
+import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
+import kotlinx.coroutines.launch
data class OfficialGalleryItem(
val id: Int,
@@ -107,12 +120,10 @@ fun LocationDetail() {
val navController = LocalNavController.current
// 2/3 height of the screen
fun getPeekHeight(): Dp {
-
val screenHeight = configuration.screenHeightDp
val peekHeight = (screenHeight * 2 / 3).dp
return peekHeight
}
-
fun getNoPeekHeight(): Dp {
val screenHeight = configuration.screenHeightDp
val peekHeight = (screenHeight * 1 / 3).dp
@@ -121,26 +132,21 @@ fun LocationDetail() {
Box(
modifier = Modifier.fillMaxSize()
) {
- Box(
+ Image(
+ painter = painterResource(id = R.drawable.default_moment_img),
+ contentDescription = "Location Image",
modifier = Modifier
.fillMaxWidth()
- .height(getNoPeekHeight() + 32.dp),
- contentAlignment = Alignment.Center
- ) {
- Image(
- painter = painterResource(id = R.drawable.default_moment_img),
- contentDescription = "Location Image",
- modifier = Modifier
- .fillMaxWidth()
- .height(getNoPeekHeight() + 32.dp),
- contentScale = ContentScale.Crop
- )
- }
+ .height(getNoPeekHeight() + 100.dp),
+ contentScale = ContentScale.Crop
+ )
+ val bottomSheetScaffoldState = rememberBottomSheetScaffoldState()
BottomSheetScaffold(
scaffoldState = scaffoldState,
sheetPeekHeight = getPeekHeight(),
+ sheetShadowElevation = 0.dp,
sheetContainerColor = Color.Transparent,
- sheetShape = RoundedCornerShape(16.dp),
+ sheetShape = RoundedCornerShape(16.dp, 16.dp, 0.dp, 0.dp),
sheetDragHandle = null,
sheetContent = {
Column(
@@ -341,8 +347,8 @@ fun LocationDetail() {
}
- }
- ) { innerPadding ->
+ },
+ ) {
}
}