Skip to content

Commit 18fd6df

Browse files
committed
#2007 fix: volume up/down action bottom sheet is cut off on some devices
1 parent 6375e39 commit 18fd6df

File tree

2 files changed

+38
-29
lines changed

2 files changed

+38
-29
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [4.0.1](https://github.com/sds100/KeyMapper/releases/tag/v4.0.1)
2+
3+
#### TO BE RELEASED
4+
5+
## Fixed
6+
- #2007 Volume up/down action bottom sheet is cut off on some devices
7+
18
## [4.0.0](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0)
29

310
#### 25 January 2026

base/src/main/java/io/github/sds100/keymapper/base/actions/VolumeActionBottomSheet.kt

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ private fun VolumeActionBottomSheet(
105105
dragHandle = null,
106106
) {
107107
Column(
108-
modifier = Modifier.verticalScroll(scrollState),
108+
modifier = Modifier
109+
.verticalScroll(scrollState)
110+
.weight(1f),
109111
) {
110112
Spacer(modifier = Modifier.height(16.dp))
111113

@@ -162,45 +164,45 @@ private fun VolumeActionBottomSheet(
162164
isChecked = state.showVolumeUi,
163165
onCheckedChange = onToggleShowVolumeUi,
164166
)
165-
}
166167

167-
Spacer(modifier = Modifier.height(16.dp))
168+
Spacer(modifier = Modifier.height(16.dp))
168169

169-
Row(
170-
modifier = Modifier
171-
.fillMaxWidth()
172-
.padding(horizontal = 16.dp),
173-
horizontalArrangement = Arrangement.SpaceBetween,
174-
verticalAlignment = Alignment.CenterVertically,
175-
) {
176-
OutlinedButton(
177-
modifier = Modifier.weight(1f),
178-
onClick = {
179-
scope.launch {
180-
sheetState.hide()
181-
onDismissRequest()
182-
}
183-
},
170+
Row(
171+
modifier = Modifier
172+
.fillMaxWidth()
173+
.padding(horizontal = 16.dp),
174+
horizontalArrangement = Arrangement.SpaceBetween,
175+
verticalAlignment = Alignment.CenterVertically,
184176
) {
185-
Text(stringResource(R.string.neg_cancel))
186-
}
177+
OutlinedButton(
178+
modifier = Modifier.weight(1f),
179+
onClick = {
180+
scope.launch {
181+
sheetState.hide()
182+
onDismissRequest()
183+
}
184+
},
185+
) {
186+
Text(stringResource(R.string.neg_cancel))
187+
}
187188

188-
Spacer(modifier = Modifier.width(16.dp))
189+
Spacer(modifier = Modifier.width(16.dp))
189190

190-
Button(
191-
modifier = Modifier.weight(1f),
192-
onClick = onDoneClick,
193-
) {
194-
Text(stringResource(R.string.pos_done))
191+
Button(
192+
modifier = Modifier.weight(1f),
193+
onClick = onDoneClick,
194+
) {
195+
Text(stringResource(R.string.pos_done))
196+
}
195197
}
196-
}
197198

198-
Spacer(Modifier.height(16.dp))
199+
Spacer(Modifier.height(16.dp))
200+
}
199201
}
200202
}
201203

202204
@OptIn(ExperimentalMaterial3Api::class)
203-
@Preview
205+
@Preview(heightDp = 400)
204206
@Composable
205207
private fun PreviewVolumeActionBottomSheet() {
206208
KeyMapperTheme {

0 commit comments

Comments
 (0)