material-components-android-compose-theme-adapter
material-components-android-compose-theme-adapter copied to clipboard
context.theme.key, getDeclaredMethod will always throw if we target SDK 32
If we target SDK32 the Resources.Theme::class.java.getDeclaredMethod("getKey")
will always throw so we can't use this method for re-compositions optimizations for createMdcTheme()
Thanks for raising this. Unfortunately SDK 32 has changed Resources.Theme.getKey
to a hidden method, so the current reflection implementation can't work. I'll think about this some more but perhaps the fallback of just using the theme directly as a key is fine.
Is this still a problem? Sounds like something which needs adressing, especially since we're at API 33 as a stable release already.