Skip to content

Commit 20ccc08

Browse files
committed
Fix positioning of QR code status text
1 parent 333b09b commit 20ccc08

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/main/java/tech/httptoolkit/android/qrscan/QRScanScreen.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ fun QRScanScreen(
2525
barcodeView.decoderFactory = DefaultDecoderFactory(listOf(BarcodeFormat.QR_CODE))
2626
setStatusText("Scan HTTP Toolkit QR code to connect")
2727

28+
// Add extra padding to the status text to ensure it's well clear of the nav bar
29+
statusView?.setPadding(0, 0, 0, 48)
30+
2831
val callback = object : BarcodeCallback {
2932
override fun barcodeResult(result: BarcodeResult) {
3033
val resultText = result.text
@@ -50,7 +53,9 @@ fun QRScanScreen(
5053
resume()
5154
}
5255
},
53-
modifier = modifier.fillMaxSize(),
56+
modifier = modifier
57+
.fillMaxSize()
58+
.windowInsetsPadding(WindowInsets.systemBars),
5459
onRelease = { barcodeView ->
5560
barcodeView.pause()
5661
}

0 commit comments

Comments
 (0)