-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Describe the bug
For some reason, the color of the text in buttons of dialogs opened via Customer Center are hard to read due to their color. It happens for dark theme.
Light Theme Example:
Dark Theme Example:
Here's the code I'm using to display the Customer Center inside an Activity:
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
// ...
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
configureWindowInsets(
statusBarDarkIcons = !isDarkTheme(),
navigationBarDarkIcons = !isDarkTheme()
)
setContent {
var isCustomerCenterVisible by remember { mutableStateOf(true) }
LaunchedEffect(key1 = isCustomerCenterVisible) {
if (!isCustomerCenterVisible) {
onBackPressedDispatcher.onBackPressed()
}
}
val colorScheme = if (isSystemInDarkTheme()) {
darkColorScheme()
} else {
lightColorScheme()
}
MaterialTheme(colorScheme = colorScheme) {
if (isCustomerCenterVisible) {
CustomerCenter(
modifier = Modifier
.fillMaxSize(),
onDismiss = {
isCustomerCenterVisible = false
}
)
}
}
}
}
// ...Obs.: This time around I can't use startActivity(ShowCustomerCenter().createIntent(requireContext(), Unit)). I have to use the composable version one.
- Environment
- Platform: Android
- SDK version: 8.19.2
- OS version: API 34
- Android Studio version: Android Studio Meerkat Feature Drop | 2024.3.2 Patch 1
- How widespread is the issue. Percentage of devices affected: 100%
Metadata
Metadata
Assignees
Labels
No labels

