diff --git a/app/src/main/java/eu/darken/capod/common/settings/SettingsCategoryHeader.kt b/app/src/main/java/eu/darken/capod/common/settings/SettingsCategoryHeader.kt index 9e6991ac..57956e9f 100644 --- a/app/src/main/java/eu/darken/capod/common/settings/SettingsCategoryHeader.kt +++ b/app/src/main/java/eu/darken/capod/common/settings/SettingsCategoryHeader.kt @@ -1,5 +1,6 @@ package eu.darken.capod.common.settings +import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -13,15 +14,27 @@ import eu.darken.capod.common.compose.PreviewWrapper @Composable fun SettingsCategoryHeader( text: String, - modifier: Modifier = Modifier + modifier: Modifier = Modifier, + subtitle: String? = null, ) { - Text( - text = text, - style = MaterialTheme.typography.titleSmall, - color = MaterialTheme.colorScheme.primary, - fontWeight = FontWeight.Medium, + Column( modifier = modifier.padding(horizontal = 16.dp, vertical = 12.dp) - ) + ) { + Text( + text = text, + style = MaterialTheme.typography.titleSmall, + color = MaterialTheme.colorScheme.primary, + fontWeight = FontWeight.Medium, + ) + subtitle?.let { + Text( + text = it, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(top = 2.dp), + ) + } + } } @Preview2 @@ -29,3 +42,12 @@ fun SettingsCategoryHeader( private fun SettingsCategoryHeaderPreview() = PreviewWrapper { SettingsCategoryHeader(text = "Other") } + +@Preview2 +@Composable +private fun SettingsCategoryHeaderWithSubtitlePreview() = PreviewWrapper { + SettingsCategoryHeader( + text = "Compatibility options", + subtitle = "Don't touch if everything works ;)", + ) +} diff --git a/app/src/main/java/eu/darken/capod/main/ui/settings/general/GeneralSettingsScreen.kt b/app/src/main/java/eu/darken/capod/main/ui/settings/general/GeneralSettingsScreen.kt index 4150c37e..d650e601 100644 --- a/app/src/main/java/eu/darken/capod/main/ui/settings/general/GeneralSettingsScreen.kt +++ b/app/src/main/java/eu/darken/capod/main/ui/settings/general/GeneralSettingsScreen.kt @@ -220,7 +220,10 @@ fun GeneralSettingsScreen( ) } item { - SettingsCategoryHeader(text = stringResource(R.string.settings_category_compatibility_options_title)) + SettingsCategoryHeader( + text = stringResource(R.string.settings_category_compatibility_options_title), + subtitle = stringResource(R.string.settings_category_compatibility_options_description), + ) } item { SettingsBaseItem( diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2e99e670..b033652b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -35,7 +35,7 @@ Extra notification - Shows an extra notification when a device is connected. This lets you hide the permanent \"No devices\" notification by disabling the \"Device status\" channel. + Shows a second notification that only appears while a device is connected. With this on, you can hide the permanent \"No devices\" notification: turn off the \"Device status\" category in Android\'s notification settings for CAPod. Keep notification after disconnect Continue showing the last known battery levels even after your AirPods disconnect Auto pause @@ -61,9 +61,9 @@ Compatibility options Don\'t touch if everything works ;) Disable hardware filtering - Don\'t delegate data filtering to the system, instead get all data and filter within the app. + Try this if your AirPods are never detected. The app will look through all nearby Bluetooth signals itself, instead of letting your phone pre-select them. Disable hardware batching - Don\'t let the system group collected BLE data before forwarding it to us. + Try this if battery levels only update late or in bursts. Your phone will pass on each Bluetooth signal right away, instead of collecting them first. One pod mode Auto play/pause and auto-connect react to a single pod instead of requiring both. @@ -183,7 +183,7 @@ Green Red Indirect data delivery - Use an alternative method to receive BLE data from the system (broadcast instead of callback). + Try this if the other compatibility options didn\'t help. Android will hand Bluetooth signals to the app in the background, instead of the app listening for them directly. Troubleshooter Diagnose and fix Bluetooth connectivity issues.