mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-21 22:59:10 +00:00
Fix last item on main settings screen.
Fix floating button.
This commit is contained in:
parent
86d4d0dfaf
commit
19cbbae2da
2 changed files with 60 additions and 52 deletions
|
@ -2,8 +2,10 @@
|
||||||
package helium314.keyboard.settings.screens
|
package helium314.keyboard.settings.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
|
import androidx.compose.material3.Scaffold
|
||||||
import androidx.compose.material3.Surface
|
import androidx.compose.material3.Surface
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
@ -42,7 +44,11 @@ fun MainSettingsScreen(
|
||||||
settings = emptyList(),
|
settings = emptyList(),
|
||||||
) {
|
) {
|
||||||
val enabledSubtypes = SubtypeSettings.getEnabledSubtypes(true)
|
val enabledSubtypes = SubtypeSettings.getEnabledSubtypes(true)
|
||||||
Column(Modifier.verticalScroll(rememberScrollState())) {
|
Scaffold { innerPadding ->
|
||||||
|
Column(
|
||||||
|
Modifier.verticalScroll(rememberScrollState())
|
||||||
|
.then(Modifier.padding(bottom = innerPadding.calculateBottomPadding()))
|
||||||
|
) {
|
||||||
Preference(
|
Preference(
|
||||||
name = stringResource(R.string.language_and_layouts_title),
|
name = stringResource(R.string.language_and_layouts_title),
|
||||||
description = enabledSubtypes.joinToString(", ") { it.displayName(ctx) },
|
description = enabledSubtypes.joinToString(", ") { it.displayName(ctx) },
|
||||||
|
@ -98,6 +104,7 @@ fun MainSettingsScreen(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
|
|
|
@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.foundation.layout.wrapContentSize
|
import androidx.compose.foundation.layout.wrapContentSize
|
||||||
import androidx.compose.foundation.text.KeyboardOptions
|
import androidx.compose.foundation.text.KeyboardOptions
|
||||||
import androidx.compose.material3.ExtendedFloatingActionButton
|
import androidx.compose.material3.ExtendedFloatingActionButton
|
||||||
|
@ -176,7 +177,7 @@ fun PersonalDictionaryScreen(
|
||||||
onClick = { selectedWord = Word("", null, null) },
|
onClick = { selectedWord = Word("", null, null) },
|
||||||
text = { Text(stringResource(R.string.user_dict_add_word_button)) },
|
text = { Text(stringResource(R.string.user_dict_add_word_button)) },
|
||||||
icon = { Icon(painter = painterResource(R.drawable.ic_edit), stringResource(R.string.user_dict_add_word_button)) },
|
icon = { Icon(painter = painterResource(R.drawable.ic_edit), stringResource(R.string.user_dict_add_word_button)) },
|
||||||
modifier = Modifier.wrapContentSize(Alignment.BottomEnd).padding(all = 12.dp)
|
modifier = Modifier.wrapContentSize(Alignment.BottomEnd).padding(all = 12.dp).then(Modifier.systemBarsPadding())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue