Skip to content
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

Bug: background color of splash screen doesn't change with theme #2466

Open
ghost opened this issue Jan 1, 2024 · 43 comments
Open

Bug: background color of splash screen doesn't change with theme #2466

ghost opened this issue Jan 1, 2024 · 43 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jan 1, 2024

Summary:

splash screen reamins light mode even in dark mode.

Expected behaviour:

it should be in dark mode if the app is in dark mode

Screenshots:
Screen_recording_20240101_222318.webm

Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.

@ghost
Copy link
Author

ghost commented Jan 1, 2024

@PratyushSingh07 I will work on this

@PratyushSingh07 PratyushSingh07 assigned ghost Jan 1, 2024
@PratyushSingh07 PratyushSingh07 changed the title Issue : splash screen reamins light mode even in dark mode Bug: background color of splash screen doesn't change with theme Jan 1, 2024
@PratyushSingh07
Copy link
Collaborator

Hey @Thanush66 i just changed the issue title , hope you dont mind

@ghost
Copy link
Author

ghost commented Jan 1, 2024

Hey @Thanush66 i just changed the issue title , hope you dont mind

No Problem..!

@Maan-Sharma
Copy link

hey @PratyushSingh07 @Thanush66 guys can i work in it.

@PratyushSingh07
Copy link
Collaborator

Hey @Maan-Sharma you can work on it only If thanush permits. I don't really have a say in this

@ghost
Copy link
Author

ghost commented Jan 5, 2024

@Maan-Sharma I am working on this...!

@Maan-Sharma
Copy link

ooh nice!! @Thanush66

@PratyushSingh07
Copy link
Collaborator

PratyushSingh07 commented Jan 12, 2024

@Thanush66 are you still working on it ?

@ghost
Copy link
Author

ghost commented Jan 13, 2024

@PratyushSingh07 Ig its solved by @KUSHAL-RAJ-PAREEK you can Assign Him this issue

@KUSHAL-RAJ-PAREEK
Copy link

@Thanush66 please can you assign this issue to me.

@PratyushSingh07
Copy link
Collaborator

PratyushSingh07 commented Jan 13, 2024

You can work on it @KUSHAL-RAJ-PAREEK

Edit: I did say you could work on it but I forgot @Maan-Sharma . He did ask before you kushal so it is only fair to give him a chance. Even if he declines then you can work on it.

@KUSHAL-RAJ-PAREEK
Copy link

@Maan-Sharma if you are not currently working on it. so, please can you assign this issue to me.

@KUSHAL-RAJ-PAREEK
Copy link

@PratyushSingh07 he is not answering so can i make the pull request i already fix it.

@PratyushSingh07
Copy link
Collaborator

It's just been 4 hours since you put up your message. Don't try do anything in haste

@Maan-Sharma
Copy link

@PratyushSingh07 sorry for late but i also want to work on this issue

@KUSHAL-RAJ-PAREEK
Copy link

@PratyushSingh07 ok.

@PratyushSingh07
Copy link
Collaborator

Go ahead @Maan-Sharma

@Maan-Sharma
Copy link

Thanks @PratyushSingh07

@KUSHAL-RAJ-PAREEK
Copy link

@Maan-Sharma have you fixed it?

@Maan-Sharma
Copy link

@KUSHAL-RAJ-PAREEK I'm working on it

@Maan-Sharma
Copy link

Hey @PratyushSingh07 @KUSHAL-RAJ-PAREEK ...I Fixed the bug but , I have a doubt that i add a color.xml(night)file is this fine or I have to do somthing different

@PratyushSingh07
Copy link
Collaborator

No, this won't work. You need to use the mifos ui library.
I am not sure of the solution but I think you can solve the issue by changing the style in manifest file.

@KUSHAL-RAJ-PAREEK
Copy link

KUSHAL-RAJ-PAREEK commented Jan 15, 2024

yeah, in this case we have to do some change manifest.

@KUSHAL-RAJ-PAREEK
Copy link

adding night-values file is not correct or efficient way. beacuse mifos have its own ui library where all things are alredy setup.

@Maan-Sharma
Copy link

Maan-Sharma commented Jan 15, 2024

@KUSHAL-RAJ-PAREEK in manifest ? what i supposed to do.

@KUSHAL-RAJ-PAREEK
Copy link

KUSHAL-RAJ-PAREEK commented Jan 15, 2024

ok, i am telling you the steps just follow that there is only one line of change

@Maan-Sharma
Copy link

ok @KUSHAL-RAJ-PAREEK

@KUSHAL-RAJ-PAREEK
Copy link

  1. go to manifest and find the splash activity.
  2. change its theme to mifos base theme.
  3. now, you are done.

@KUSHAL-RAJ-PAREEK
Copy link

@PratyushSingh07 i guess it is correct way.

@KUSHAL-RAJ-PAREEK
Copy link

@Maan-Sharma is it work for you?

@Maan-Sharma
Copy link

no its shows blank screen @KUSHAL-RAJ-PAREEK
Screenshot (2)

@KUSHAL-RAJ-PAREEK
Copy link

KUSHAL-RAJ-PAREEK commented Jan 15, 2024

@Maan-Sharma @PratyushSingh07 i solved it by this please can you assign it to me

@Maan-Sharma
Copy link

@PratyushSingh07 I solve it but @KUSHAL-RAJ-PAREEK says his solution is more correct or efficient way

@PratyushSingh07
Copy link
Collaborator

PratyushSingh07 commented Jan 15, 2024

how am i supposed to judge an approach if none of you raise a PR? Just raise a PR and tag me , I will review it . Also make sure that you follow commit and PR guidelines this time

@Maan-Sharma
Copy link

ok @PratyushSingh07

@PratyushSingh07
Copy link
Collaborator

PratyushSingh07 commented Jan 15, 2024

@Maan-Sharma is your solution able to change the colour of splash screen even from inside of the app?

You too raise a PR , anyhow you were supposed to do it first.

@Maan-Sharma
Copy link

Maan-Sharma commented Jan 15, 2024

sorry , but I'm a Sturdent and currently ,Im in my collage... So please can You give a lIttle more time @PratyushSingh07 i will make Pr as soon as possible,I already solved it

@Vikashgathala
Copy link
Contributor

@PratyushSingh07 on creating the different values for day and values-night for colors.xml does the work by changing the background of the splash screen but does not depend on AppCompatDelegate.sDefaultNightMode but depend upon the system theme (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK).
I need a little help of yours for this.

@PratyushSingh07
Copy link
Collaborator

@PratyushSingh07 on creating the different values for day and values-night for colors.xml does the work by changing the background of the splash screen but does not depend on AppCompatDelegate.sDefaultNightMode but depend upon the system theme (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK). I need a little help of yours for this.

Well this is the problem in both the PRs that have been liked to this issue. The Idea is to change the theme based on the app theme as well and not just the system theme. The issue might lie in the Mifos Ui Library itself. However I wont be certain about the root cause until I start working on this issue.

@Vikashgathala
Copy link
Contributor

@PratyushSingh07 Should I migrate this to compose? this would fix this issue too.

@PratyushSingh07
Copy link
Collaborator

It only contains colors and other values and imo there is no point in migrating this to compose. Moreover if you go through our idea list for this year's GSoC you will come across a project that asks us to create a library in compose that can be easily shared and used across different Android applications

@Vikashgathala
Copy link
Contributor

currently we are unable to change the colour using issystemindarktheme. But in compose we will be able to use that and we can change background colour based on that ig.

@Vikashgathala
Copy link
Contributor

Tried it, doesn't work as intended. First there comes a white screen and then comes the splash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment