-
Notifications
You must be signed in to change notification settings - Fork 141
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
android: Add static color theme option #350
Conversation
colors: Fix names for the blue theme strings: Update stirngs and names to actually lol
It is needed because the black theme was having issues needing a app retsart for the activity to fully chnage colors
The hex codes were quickly generated so some of them look awful and i'm not sure how to go about on fixing them
Now the pop up has 2 steps 1 - Asking you for the preferred static theme color you would want 2 - Asking you if you want to enable material you / black backgrounds Than it recreates the activity if the user hits ok Also had to tweak the listener on ThemeUtil for this chnage
Testing before this has been implemented. The current themes work fine and don't bug out even when rapidly swapping between them. Also the Lime Green theme actually looks pretty good currently. I tested on Android 14. |
I ended up removing Indigo, as it was too similar to Blue Also removed some useless duplicates
I ended up just copying the tone of default blue theme for all new themes i added, it results on a bit more of muted tone for the themes in dark mode. I also tested the feature more on a virtual A11 device and it seems to work fine on my end Now the PR is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works fine. I can switch between themes without lag or crashes. The theme menu on the config screen also works well. The code is also well-implemented.
There is a bug i missed If the user updates from a previous version, the listener of ThemeUtil.kt never gets called meaning theme switching gets broken Good one You can also get the same effect by skipping the theme setup menu |
Fixed that Nothing left to do as far as I'm concerned |
src/android/app/src/main/java/io/github/lime3ds/android/features/settings/model/Settings.kt
Outdated
Show resolved
Hide resolved
src/android/app/src/main/java/io/github/lime3ds/android/utils/ThemeUtil.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Gamer64 <[email protected]>
Co-authored-by: Gamer64 <[email protected]>
Upon testing this PR, I've realized that this code appears to cause an instant crash on Android 9. I will continue to investigate the issue. |
I could spin up an Android 9 virtual device , weird that it even crashes in the first place |
Fixed it, it was caused by a typo. |
Ah fucking classic by me, sorry |
The Lime theme doesn't seem to be very... Lime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me outside of the prior comment.
Outstanding license header warnings are to be ignored.
White or Dark Mode? |
I tested using Dark Mode |
Actually now that I look at it again, the Green theme seems to be a little more blue than you would expect? I would perhaps suggest dropping the Green theme and renaming the Lime theme to Green to replace it. |
Ok, then I'll do it tomorrow |
No need, I'll do it now. Just wanted your confirmation |
Oops, meant to rebase the branch, not rebase and merge. 😜 |
This PR adds a new option on the Theme section with a list of pre-set colors
This might be useful for people stuck on Android 11 or earlier version of android and people who don't want to use Material You for whatever reason
What is left to do
Set proper theme color hex values
The ones i added are just generated placeholders and some of them don't look good at all
( help is needed for this as i am not sure how to approach this)
Test the new changes, especially on older Android versions
I only had the chance to test on Android 14 and a virtual Android 11 device. More testing is needed
Video showcase:
Settings:
Screen_Recording_20240812_173851_Lime3DS.mp4