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
Unable to change theme #57
Comments
So you want to change the background colour? The colours you have changed only change the AppBar and status bar. Try |
Thanks for that, now I have half part done, ie window background is the color I want, but the card color is still set to some default value near "#212121" due to Theme.Mal.Dark.DarkActionBar, how do I change it. check this for more: Image |
Ah okay, well in that case you're going to want to set the theme to light as if you just changed the card background, the text will be the wrong colour. Try using a light theme and then manually overriding the status bar to make the text and button dark - check out the source code or let me know if you need help doing that. |
that didn't work, I still dont get that dark background with semi-dark cards. Check this default implementation.Image, and this is what I got after adding "android:background" Image, I need background to be dark and card to be medium dark, like the stock implementation, just with a different color scheme. may I know from where is the card background color fetched? |
The card background colour isn't actually fetched from a specific value - it's what AppCompat sets it in the theme. |
In that case, I need help. The moment I set Light theme, the background goes white, then is I use the windowBackground it doesn't update card background. To update card background I have to use android:background which works but then it also applies it to the activity background. I am not finding any way to add 2 different color one for background and another for card background. Any insight would be highly appreciated |
I find out card background can be changed by setting Better would be to apply custom style to the cards internally in MAL library and expose the background color via some custom attribute... You can try to provide pull request for that. |
Sorry again for the inactivity - been caught up in exams but am always happy for PRs! |
Man! this did the trick. You are amazing, thank a ton! |
@ujwalp15 Just make sure it works properly on devices with different Android APIs as Android Studio raises error/warning that it is supported only on API 23 and above. So I don't know how it will behave on older API versions... |
This is my current style which has the required colors.
<style name="AppTheme.MaterialAboutActivity" parent="Theme.Mal.Dark.DarkActionBar" > @color/colorPrimary @color/colorPrimaryDark @color/colorAccent </style>where,
Color primary is #2a2153
colorPrimaryDark is #221a45
colorAccent is #d1005b
Even though I have applied it, but my background color is not changing, its still set to some default value near "#212121". Am I doing anything wrong?
The text was updated successfully, but these errors were encountered: