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
Add Dark Mode manual switch in application's settings #2919
Conversation
Thank you for your PR |
Please pass the real machine test and then PR |
Is a radio option like this OK?
|
You mean to build, test and confirm that it's working on my own device, right? |
I'm not an Android developer. That's why I didn't build it myself. Besides, I figured that the patch is relatively small and fairly simple for a quick review by anyone authorizing its merge. I might try to actually build v2rayNG myself out of curiosity, so I appreciate any tips on how to build the app for a complete (Android) newbie. But to anyone reading this, if you're inclined to add this feature, do not wait up on me! Just go ahead and do it, thanks! |
@wangwang-code |
我仍在测试,我在寻找更好的办法 视频中应该能看出,在重新启动时的一瞬间,它仍然跟随系统,直到执行 Translated by gpt-3.5-turbo: It should be visible in the video that at the moment of restarting, it still follows the system until AppCompatDelegate.setDefaultNightMode is executed. |
我尝试跳过启动的空白,但那样会造成闪烁(重新渲染活动造成的) |
I don't see it myself. But you're right, setting night mode in @2dust Surely can help you better with this. |
我在尝试用新的API setApplicationNightMode 它需要API等级 > 30 他的好处是持久化,直到用户更改它 |
Yes. I saw the changes you've made on your fork. Forgive me if I'm wrong somehow, I'm not an expert. I meant that perhaps you can call your |
抱歉,我还没有看懂setupViewModel,在我本地代码里 Utils.setDaynight()放到了MainActivity类中的onCreate() 目前遇到一个棘手问题 SettingsViewModel没有Context,我需要在其他地方实现立即更新暗黑模式,我正在理解setupViewModel |
需要寻找合适地方执行Utils.setDaynight,在选择后 我测试发现setApplicationNightMode会带来闪烁 |
@a-pav |
@wangwang-code Thank you for including me in this. Unfortunately your recent changes go a little above my head, and currently I don't have the time to study them. I hope someone from the core team will come along and help you with this. |
The documentation says |
First of all, thanks for the Dark Mode theme. I like it, although I haven't been able to use it yet!
The Dark Mode theme was added a while ago, but since its introduction, a lot of people (myself included) have been longing for a "manual toggle/switch" in comments and issues:
#2478 (comment) #2478 (comment) #2478 (comment) #2478 (comment)
close #2688, close #2720
This change adds a manual switch for Dark Mode theme. I don't have the environment to build and test this myself, but I tried my best to follow on the footsteps of similar settings and make a correct change. Please tell me if anything needs to be fixed.