|
@@ -748,6 +748,7 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
isSheetShown: Boolean
|
|
|
) {
|
|
|
var isSmartSheetOpen by remember { mutableStateOf(isSheetShown) }
|
|
|
+ var isAnySpecificSheetOpen by remember { mutableStateOf(false) }
|
|
|
val sheetState = rememberModalBottomSheetState()
|
|
|
val context = LocalContext.current
|
|
|
val basePreferenceHelper = BasePreferenceHelper(context)
|
|
@@ -899,6 +900,83 @@ fun ColumnScope.AddRowSettingsSmart(
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (isAnySpecificSheetOpen) {
|
|
|
+ ModalBottomSheet(
|
|
|
+ onDismissRequest = { isAnySpecificSheetOpen = false
|
|
|
+ BottomBarScreen.Settings.isTrue = false
|
|
|
+ },
|
|
|
+ sheetState = sheetState,
|
|
|
+ containerColor = MaterialTheme.colorScheme.background
|
|
|
+ ) {
|
|
|
+ Box(modifier = Modifier
|
|
|
+ .background(Color.Transparent)
|
|
|
+ .fillMaxWidth()
|
|
|
+ .height(550.dp)
|
|
|
+ .padding(start = 0.dp, top = 10.dp),
|
|
|
+ ) {
|
|
|
+ Column(
|
|
|
+ verticalArrangement = Arrangement.Top,
|
|
|
+ horizontalAlignment = Alignment.Start
|
|
|
+ ) {
|
|
|
+ AddTextSettings(
|
|
|
+ text = "Any Connect",
|
|
|
+ size = 18.sp,
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ bottomPadding = 20.dp,
|
|
|
+ startPadding = 16.dp,
|
|
|
+ style = MaterialTheme.typography.titleMedium
|
|
|
+ )
|
|
|
+ smartConnect.forEach { smart ->
|
|
|
+ Row(
|
|
|
+ modifier = Modifier
|
|
|
+ .fillMaxWidth()
|
|
|
+ .background(Color.Transparent)
|
|
|
+ .padding(start = 2.dp)
|
|
|
+ .selectable(
|
|
|
+ selected = selectedSmartConnect == smart,
|
|
|
+ onClick = {
|
|
|
+ selectedSmartConnect = smart
|
|
|
+ basePreferenceHelper.saveSmartList(smart)
|
|
|
+
|
|
|
+ if (smart == smartConnect[0]) {
|
|
|
+ Log.d("smartLocationList", "$smart")
|
|
|
+ }
|
|
|
+
|
|
|
+ isAnySpecificSheetOpen = false
|
|
|
+ },
|
|
|
+ )
|
|
|
+// .indication(
|
|
|
+// indication = null,
|
|
|
+// interactionSource = remember {
|
|
|
+// MutableInteractionSource()
|
|
|
+// }
|
|
|
+// )
|
|
|
+ ,
|
|
|
+ verticalAlignment = Alignment.CenterVertically
|
|
|
+ ) {
|
|
|
+ RadioButton(selected = smart == selectedSmartConnect,
|
|
|
+ onClick = {
|
|
|
+ selectedSmartConnect = smart
|
|
|
+ basePreferenceHelper.saveSmartList(smart)
|
|
|
+ isAnySpecificSheetOpen = false
|
|
|
+ },
|
|
|
+ colors = RadioButtonDefaults.colors(
|
|
|
+ selectedColor = colorResource(id = R.color.radio_button_blue),
|
|
|
+ unselectedColor = colorResource(id = R.color.gray_icon),)
|
|
|
+ )
|
|
|
+ Text(text = smart,
|
|
|
+ modifier = Modifier.padding(start = 12.dp),
|
|
|
+ color = MaterialTheme.colorScheme.primary,
|
|
|
+ style = MaterialTheme.typography.bodySmall
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Composable
|