Reputation: 73
How to support dark mode for In-App review flow (review pop up) when application is in dark mode?
I have implemented android play in-app review flow. Flow working correctly but review pop is shown in light mode when application is in dark mode.
Upvotes: 0
Views: 106
Reputation: 1171
You can customize it by providing a different theme via ContextThemeWrapper
, something like that:
val isNightMode = // code to check the current theme
val themeResId = if (isNightMode) {
// provide theme for dark
} else {
// provide theme for light
}
// create the contextWrapper with the theme
val themedContext = ContextThemeWrapper(context, themeResId)
val reviewManager = ReviewManagerFactory.create(themedContext)
val reviewInfoTask = reviewManager.requestReviewFlow()
I hope this helps!
Upvotes: 0