-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No static method MonetCompatDynamicTheme With Jetpack Compose #11
Comments
The Compose implementation was done by @rozPierog, maybe they can help with this? I don't have much Compose knowledge unfortunately. |
只需要将MonetCompatDynamicTheme.kt提取出来,就可以了。 Then we just need to inherit our activity from MonetCompatActivity. |
Your activity should inherit from MonetCompatActivity.kt, sorry about not including it in any docs |
@rozPierog Thanks for the clarification. I changed my main activity to extend MonetCompatActivity instead of implementing it myself but I'm still getting the same error |
Can you send me your code? I could look into this. If not please refer to https://github.com/rozPierog/Cofi code to look at how I did it @owenlejeune |
Is error a theme error? |
@rozPierog Here is the code I'm using
|
@owenlejeune hey boy.If you still get No static method MonetCompatDynamicTheme With Jetpack Compose, I recommend you write one for the component function in the dependency library, like this.
But I have to warn you, if you report an error like this
This is because the open source library inherits appcompatActivities and can't use a material Theme, instead using Theme.AppCompat. This is when you change the theme for the activity in your Sse instructions, like this
|
@huaweikai Thanks for the suggestion! I tried
|
@owenlejeune I guess your Material version is the default for Android Studio |
@huaweikai this is so bizarre, added
|
@owenlejeune ok,i sent an email to you. |
I followed the setup guide (enable PaletteCompat in Application, implement custom MonetCompatActivity based on ComponentActivity, using MonetCompatDynamicTheme) but I'm getting this error when trying to run my application
I tried enabling Multidex but that didn't solve the issue either.
The text was updated successfully, but these errors were encountered: