Skip to content

Commit

Permalink
app: opt Fab
Browse files Browse the repository at this point in the history
  • Loading branch information
YuKongA committed Jul 23, 2024
1 parent f0afedf commit 6add0a5
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions composeApp/src/commonMain/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.displayCutoutPadding
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -225,23 +222,12 @@ fun FloatActionButton(fabOffsetHeight: Dp, updateRomInfo: MutableState<Int>) {
) {
ExtendedFloatingActionButton(
modifier = Modifier.offset(y = fabOffsetHeight),
text = { Text(text = stringResource(Res.string.submit)) },
icon = { Icon(imageVector = Icons.Filled.Check, contentDescription = stringResource(Res.string.submit)) },
onClick = {
hapticFeedback.performHapticFeedback(HapticFeedbackType.LongPress)
updateRomInfo.value++
}
) {
Icon(
imageVector = Icons.Filled.Check,
contentDescription = null,
modifier = Modifier.height(20.dp)
)
Spacer(
modifier = Modifier.width(8.dp)
)
Text(
text = stringResource(Res.string.submit),
modifier = Modifier.height(20.dp)
)
}
)
}
}

0 comments on commit 6add0a5

Please sign in to comment.